GitHub Chat API

The simplest way for developers to chat and explore GitHub repositories programmatically

OR simply visit github-chat.com/owner/repo for instant access to any public repository

Repository Indexing

Index any public GitHub repository for analysis

AI Chat API

Ask questions about any indexed repository via API

Developer-First

Simple REST API with comprehensive documentation

GitHub Chat API

GitHub Chat API gives you programmatic access to chat with any public GitHub repository. Just two simple endpoints to integrate AI-powered code understanding into your workflow.

1. Repository Indexing

First, index a GitHub repository to analyze its codebase.

POST https://api.github-chat.com/verify

1curl -X POST https://api.github-chat.com/verify \
2  -H "Content-Type: application/json" \
3  -d '{"repo_url": "https://github.com/hacksider/Deep-Live-Cam"}'

This endpoint processes the repository and makes it available for chat interactions.

2. Chat with Repository

Ask questions about the repository and receive detailed AI responses.

POST https://api.github-chat.com/chat/completions/sync

1curl -X POST https://api.github-chat.com/chat/completions/sync \
2  -H "Content-Type: application/json" \
3  -d '{
4    "repo_url": "https://github.com/hacksider/Deep-Live-Cam",
5    "messages": [{"role": "user", "content": "What is the core tech stack?"}]
6  }'

The messages array can contain conversation history for multi-turn conversations.

3. Response Format

Responses from the API include detailed information structured in a way that separates the reasoning, answer, and source context.

API Response Example

1{
2  "rationale": "The user is asking about the backend technologies used in the Deep-Live-Cam project. I need to look through the files to identify the programming languages, libraries, and frameworks used for the backend functionality.",
3  "answer": "The Deep-Live-Cam project uses the following backend technologies:\n\n*   **Python**: The core logic and scripting are written in Python.\n*   **PyTorch**: Used for tensor computations and GPU acceleration.\n*   **ONNX Runtime**: Provides cross-platform machine learning model execution.\n*   **TensorFlow**: Used for machine learning tasks.\n*   **gfpgan**:  Used for face enhancement.\n*   **ffmpeg**: Used for video-related operations.",
4  "contexts": [
5    {
6      "text": "<h1 align=\"center\">Deep-Live-Cam</h1>\n\n<p align=\"center\">\n  Real-time face swap and video deepfake with a single click and only a single image.\n</p>\n\n<p align=\"center\">\n  <img src=\"media/demo.gif\" alt=\"Demo GIF\" width=\"800\">\n</p>",
7      "meta_data": {
8        "file_path": "README.md",
9        "type": "md",
10        "is_code": false,
11        "is_implementation": false,
12        "title": "README.md",
13        "token_count": 3790
14      }
15    },
16    // Additional contexts truncated for brevity
17  ]
18}

Rationale

The AI's explanation of how it approached the question, showing its reasoning process.

Answer

The formatted answer to the query, with Markdown support for rich text formatting.

Contexts

Repository content used by the AI to generate the response, with metadata about each file.