Skip to main content
The DeepWiki-Open API provides programmatic access to all wiki generation and repository analysis features. Built with FastAPI, it offers high-performance endpoints for integration into your development workflows.

API Base URL

For production deployments, replace with your actual API server URL.

API Architecture

The DeepWiki API is organized into several key areas:

Wiki Generation

Generate comprehensive documentation wikis from repository URLs

Chat & RAG

Interactive Q&A with repository content using RAG

Model Management

Configure and manage AI model providers

WebSocket API

Real-time streaming for generation progress and chat

Quick Start

Authentication

Most endpoints require authentication via environment-configured API keys. The API validates your configured providers automatically.

Basic Wiki Generation

Core Endpoints

Wiki Generation

Generate a comprehensive wiki from a repository URL.Request Body:
  • repo_url (string, required): Repository URL
  • model_provider (string): AI provider (google, openai, openrouter, azure, ollama)
  • model_name (string): Specific model to use
  • force_regenerate (boolean): Force regeneration even if cached
  • access_token (string): Repository access token for private repos
  • auth_code (string): Authorization code (if auth mode enabled)
Response: Complete wiki structure with pages and metadata
List all processed repositories and their wiki status.Query Parameters:
  • limit (integer): Number of results to return
  • offset (integer): Pagination offset
Response: Array of processed projects with generation status
Retrieve a specific generated wiki by project ID.Path Parameters:
  • project_id (string): Unique project identifier
Response: Complete wiki data including all pages

Chat & RAG

Stream chat responses using RAG on repository content.Request Body:
  • message (string, required): User question
  • repo_url (string, required): Repository URL for context
  • conversation_history (array): Previous conversation messages
  • model_provider (string): AI provider for responses
  • deep_research (boolean): Enable multi-turn research mode
Response: Server-sent events with streaming chat responses

Model Configuration

Get available model providers and configurations.Response: Available providers, models, and their parameters
Validate API keys and model availability.Request Body:
  • provider (string): Provider to validate
  • model_name (string): Specific model to test
Response: Validation status and model information

Data Models

WikiPage

string
required
Unique identifier for the wiki page
string
required
Human-readable page title
string
required
Full page content in Markdown format with Mermaid diagrams
array
required
Source file paths that contributed to this page
string
required
Page importance level: high, medium, or low
Array of related page IDs for cross-references

RepoInfo

string
required
Full repository URL
string
required
Repository name
string
required
Repository owner/organization
string
required
Git platform: github, gitlab, or bitbucket
boolean
Whether the repository is private
string
Default branch name (usually main or master)

Error Handling

The API uses standard HTTP status codes and returns detailed error information:

Common Error Codes

Common causes:
  • Invalid repository URL format
  • Missing required parameters
  • Invalid model provider/name combination
Example:
Common causes:
  • Missing or invalid API keys
  • Repository access token required but not provided
  • Invalid authorization code
Example:
Common causes:
  • Repository doesn’t exist
  • Repository is private and requires access token
  • Wiki not found for the given project ID
Example:
Common causes:
  • API rate limits exceeded
  • AI provider rate limits reached
Example:
Common causes:
  • AI model generation failures
  • Repository processing errors
  • Configuration issues
Example:

Rate Limits

Rate limits depend on your AI provider’s limits. DeepWiki doesn’t impose additional rate limits.

Provider Rate Limits

  • GPT-4: 500 requests/minute, 30,000 tokens/minute
  • GPT-3.5: 3,500 requests/minute, 90,000 tokens/minute
  • Varies by usage tier and model

WebSocket API

For real-time updates during wiki generation and chat:

SDK Examples

Python SDK Usage

Node.js SDK Usage

Next Steps

Wiki Endpoints

Detailed wiki generation and management endpoints

Chat API

Interactive chat and RAG endpoints for repository Q&A

WebSocket API

Real-time streaming APIs for live updates

Authentication

API authentication and security configuration