DeepWiki Open’s backend exposes a FastAPI server (default port 8001) with REST endpoints and a WebSocket route. All REST endpoints return JSON unless a file download is requested. CORS is configured to allow all origins. The base URL isDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AsyncFuncAI/deepwiki-open/llms.txt
Use this file to discover all available pages before exploring further.
http://localhost:8001 unless overridden by the SERVER_BASE_URL environment variable.
Authentication
GET /auth/status
Returns whether authorization mode is currently enabled on this DeepWiki instance. The frontend calls this on load to decide whether to show the authorization code input. Responsetrue when DEEPWIKI_AUTH_MODE is set to true or 1; otherwise false.POST /auth/validate
Validates an authorization code against the server-configuredDEEPWIKI_AUTH_CODE. Returns whether the submitted code is correct.
Request
The authorization code to validate.
true if the submitted code matches DEEPWIKI_AUTH_CODE; false otherwise.Language Configuration
GET /lang/config
Returns the full language configuration used by the UI, including supported language codes and the default language. ResponseA map of language code to display name (e.g.
"en": "English").The default language code (e.g.
"en").Model Configuration
GET /models/config
Returns the list of available LLM providers and their models, read fromgenerator.json. The frontend uses this to populate the provider and model selector dropdowns.
Response
Array of provider objects, each with an
id, name, supportsCustomModel flag, and a list of model objects.Provider identifier (e.g.
"google", "openai", "openrouter", "ollama", "bedrock", "azure", "dashscope").Human-readable provider name (e.g.
"Google").Whether this provider allows specifying a model ID that is not in the predefined list.
Array of model objects, each with an
id and name.Model identifier (e.g.
"gemini-2.5-flash").Display name for the model (same as
id by default).ID of the default provider as set in
generator.json (e.g. "google").Local Repository
GET /local_repo/structure
Returns the file tree and README content for a local filesystem path. Used when a user provides a local directory instead of a remote repository URL. Query ParametersAbsolute path to the local repository directory.
Newline-separated list of relative file paths found under
path. Hidden files, __pycache__, node_modules, and .venv directories are excluded.Contents of the first
README.md found in the repository (case-insensitive). Empty string if no README is found or it cannot be read.Wiki Export
POST /export/wiki
Exports generated wiki pages as a downloadable Markdown (.md) or JSON (.json) file. Returns a file download response with an auto-generated filename based on the repository name and current timestamp.
Request
URL of the repository (used to derive the export filename).
Array of wiki page objects to include in the export.
Unique identifier for the page.
Page title.
Page content in Markdown format.
Source file paths referenced by this page.
Importance level:
"high", "medium", or "low".IDs of related wiki pages.
Export format:
"markdown" or "json".Content-Disposition header is set to attachment; filename=<repo>_wiki_<timestamp>.<ext>.
- For
"markdown":Content-Type: text/markdown - For
"json":Content-Type: application/json
Streaming Chat Completions
POST /chat/completions/stream
Streams a RAG-powered chat completion response for a given repository. The server retrieves relevant code context and generates a response using the configured model provider. The response is a Server-Sent Events (SSE) stream. RequestURL of the repository to query (GitHub, GitLab, Bitbucket, or local path).
Conversation history. Each message has a
role ("user" or "assistant") and a content string.Model provider:
"google", "openai", "openrouter", "ollama", "bedrock", "azure", or "dashscope".Model identifier for the specified provider. If omitted, the provider’s
default_model from generator.json is used.Optional path to a specific file in the repository to include in the prompt context.
Personal access token for private repositories.
Repository type:
"github", "gitlab", or "bitbucket".Language code for content generation (e.g.
"en", "ja", "zh", "es", "kr", "vi").Newline-separated list of directory paths to exclude from processing.
Newline-separated list of file patterns to exclude from processing.
Newline-separated list of directories to include exclusively.
Newline-separated list of file patterns to include exclusively.
text/event-stream response. Each SSE event contains a chunk of the generated response text.
Example
WebSocket Wiki Generation
WebSocket /ws/chat
WebSocket endpoint for streaming wiki generation. The client connects, sends aChatCompletionRequest JSON object, and receives streamed response chunks as text frames until generation is complete. This is the primary transport used for interactive wiki generation in the frontend.
Connection
ChatCompletionRequest:
URL of the repository to generate a wiki for.
Conversation messages. Each has
role ("user" or "assistant") and content.Model provider:
"google", "openai", "openrouter", "ollama", "bedrock", "azure", or "dashscope".Model name. Defaults to the provider’s configured default if omitted.
Personal access token for private repositories.
Repository type:
"github", "gitlab", or "bitbucket".Language code for generated content.
Newline-separated directories to exclude.
Newline-separated file patterns to exclude.
Newline-separated directories to include exclusively.
Newline-separated file patterns to include exclusively.
Wiki Cache
Wiki cache files are stored on disk under~/.adalflow/wikicache/. The cache key is derived from repo_type, owner, repo, and language.
GET /api/wiki_cache
Retrieves cached wiki data for a repository. Returnsnull (with HTTP 200) if no cache entry exists.
Query Parameters
Repository owner (GitHub username or organization).
Repository name.
Repository host:
"github", "gitlab", or "bitbucket".Language code of the cached wiki (e.g.
"en").The cached wiki structure, containing
id, title, description, pages, sections, and rootSections.Map of page
id to WikiPage objects.Repository metadata:
owner, repo, type, and optionally token, localPath, repoUrl.The model provider used to generate this cache entry.
The model used to generate this cache entry.
POST /api/wiki_cache
Stores generated wiki structure and pages to the server-side cache. RequestRepository info:
owner (string), repo (string), type (string), and optionally token, localPath, repoUrl.Language code for the cached wiki.
Full wiki structure to cache.
Map of page
id to WikiPage for all generated pages.Provider used for generation (e.g.
"google").Model used for generation (e.g.
"gemini-2.5-flash")."Wiki cache saved successfully" on success.DELETE /api/wiki_cache
Deletes a specific wiki cache entry from disk. WhenDEEPWIKI_AUTH_MODE is enabled, a valid authorization_code is required.
Query Parameters
Repository owner.
Repository name.
Repository host:
"github", "gitlab", or "bitbucket".Language code of the wiki to delete.
Required when
DEEPWIKI_AUTH_MODE is enabled.Confirmation message including the repository name and language deleted.
Processed Projects
GET /api/processed_projects
Lists all projects that have been processed and cached locally. Projects are identified by scanning the~/.adalflow/wikicache/ directory for files matching the deepwiki_cache_<repo_type>_<owner>_<repo>_<language>.json naming pattern.
Response
ProcessedProjectEntry[]
Array of project entries sorted by most recently processed first.
Cache filename (e.g.
deepwiki_cache_github_AsyncFuncAI_deepwiki-open_en.json).Repository owner.
Repository name.
Combined
owner/repo string.Repository host (e.g.
"github").File modification time as a Unix timestamp in milliseconds.
Language code of the cached wiki.
Health Check
GET /health
Returns the current health status of the API server. Used by Docker and monitoring systems. ResponseAlways
"healthy" when the server is running.ISO 8601 timestamp of the health check response.
Always
"deepwiki-api".