Build with repository intelligence.
Move from a repository overview to prepared, source-backed questions without leaving the Dandi workflow.
Repository intelligence flow
Summarize
Inspect structure, purpose, and key components immediately.
Prepare
Create or restore a durable completed preparation job for a public repository.
Ask
Query the prepared public repository and inspect associated evidence.
Preparation enables Ask; it is not required for Summary. Summary does not automatically prepare a repository.
Quickstart
curl -X POST https://dandi-orcin.vercel.app/api/github-summarizer \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"githubUrl":"https://github.com/facebook/react"}'Send your API key with every request
x-api-key: YOUR_API_KEY. Keep keys server-side; never place a live key in browser code or a public repository.| Header | Required | Value |
|---|---|---|
Content-Type | Yes | application/json |
x-api-key | Yes | Your Dandi API key |
Summary, Prepare, and Ask currently support public GitHub repositories only. A connected GitHub App is display-only integration metadata and does not authorize private repository reads.
/api/github-summarizerRepository Summary
Generate a README-grounded overview of a public repository's documented purpose, features, setup, and architecture when supported by the README. GitHub metadata is attached separately. This endpoint does not prepare the repository for later questions.
Request body
| Parameter | Required | Description |
|---|---|---|
githubUrl | Yes | Full public GitHub repository URL, such as https://github.com/owner/repo. |
Important behavior
The successful body is a streamed structured summary based on README evidence. Repository metadata is supplied in the x-github-metadata response header as base64-encoded JSON.
Invalid URLs return 400; unavailable or private repositories can return 404, 403, or 422 depending on visibility and metadata retrieval.
curl -X POST https://dandi-orcin.vercel.app/api/github-summarizer \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"githubUrl":"https://github.com/facebook/react"}'/api/rag/ingestPrepare repository
Index a public repository into retrieval-ready chunks. Prepare is required before asking source-backed questions; completed jobs may be restored rather than indexed again. Private repository preparation is not supported.
| Parameter | Required | Description |
|---|---|---|
githubUrl | Yes | Full public GitHub repository URL. |
curl -X POST https://dandi-orcin.vercel.app/api/rag/ingest \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"githubUrl":"https://github.com/facebook/react"}'{
"success": true,
"jobId": "JOB_ID",
"repoUrl": "https://github.com/facebook/react",
"status": "queued",
"currentStep": "queued"
}Use GET /api/rag/ingest?jobId=JOB_ID with the same API key to inspect a job. A completed job includes its status, current step, and available preparation summary such as file and chunk counts when returned.
/api/rag/chatAsk a repository
Retrieve relevant prepared public-repository context and generate a streamed answer. The response can attach source evidence for the matched repository content. Private repository chat is not supported.
| Parameter | Required | Description |
|---|---|---|
githubUrl | Yes | The prepared public GitHub repository URL. |
messages | Yes | Message objects with role (user or assistant) and content strings. |
curl -N -X POST https://dandi-orcin.vercel.app/api/rag/chat \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"githubUrl":"https://github.com/facebook/react",
"messages":[{"role":"user","content":"Where is state managed?"}]
}'Answers stream in the response body. The optional x-rag-sources header describes retrieved repository evidence; it is context associated with the prepared repository, not chain-of-thought or a promise of an exact source count.
Responses and source evidence
x-rag-sources: [{
"chunkId": "CHUNK_ID",
"filePath": "packages/react/src/ReactClient.js",
"preview": "…",
"similarity": 0.872
}]How to use sources
filePathidentifies the matching repository file.previewis a short excerpt and may be absent.similarityis retrieval metadata, not a confidence guarantee.chunkIdis a technical identifier for the matched chunk.
If no relevant evidence is returned, verify that the repository was prepared, refine the question, and retry only when appropriate. An empty source list does not expose internal model reasoning.
Errors and recovery
Invalid repository URL or request
Use a full GitHub repository URL and valid message payload. Correct the input before retrying.
Missing or invalid API key
Send x-api-key and verify the key is active. Create or select a valid key before retrying.
Repository access or request allowance
Summary, Prepare, and Ask require a public repository. Also check your plan allowance and repository URL.
Repository metadata failure
The repository could not be fetched or interpreted. Verify availability and retry later if the repository is temporarily unavailable.
Request limit exceeded
Wait before retrying. Summary, Prepare, and Ask have endpoint-specific limits.
Repository verification or retrieval unavailable
Dandi could not safely verify public access or retrieve prepared evidence. Wait briefly and retry without changing repository permissions.
Summary, ingestion, or chat failure
Retry only after checking the request. If it persists, use the safe error message when contacting support.