Skip to main content

Welcome to CodeAlive API

CodeAlive provides a powerful REST API that enables you to integrate deep code intelligence into your applications and workflows. Our API supports contextual code understanding, semantic search, and AI-powered interactions across your entire codebase.

API Playground

Explore and test API endpoints interactively

Get API Key

Sign up to get your API access key

Base URL

All API requests should be made to:
https://app.codealive.ai/api

Authentication

CodeAlive API uses Bearer token authentication. Include your API key as a Bearer token in the request headers:
Authorization: Bearer YOUR_API_KEY

Getting Your API Key

  1. Sign up at app.codealive.ai
  2. Navigate to your dashboard
  3. Generate an API key from the settings
  4. Store your API key securely
Never expose your API key in client-side code or public repositories. Always use it as a Bearer token in the Authorization header.

Key Concepts

An artifact is any indexed unit of content in CodeAlive. Depending on the data source, an artifact can be:
  • Symbol — a code element such as a class, function, interface, field, or enum
  • File — a source code file, markdown document, configuration file, etc.
  • Folder — a directory in a repository
  • Chunk — a section of a text-based file (e.g., a markdown heading block or subtitle segment)
  • Project / Solution — a project or solution file (e.g., .csproj, .sln)
  • Repository — an entire indexed repository
Every artifact has a unique identifier, a kind, and optionally its content and metadata. Search and retrieval endpoints return artifacts.

Core Endpoints

Chat Completions

Stream AI responses with full codebase context for intelligent code discussions and analysis.

Data Sources

Manage and query your indexed repositories and workspaces.

Knowledge Retrieval

Perform semantic searches across your entire codebase to find relevant code snippets and patterns. Execute advanced queries to locate specific code elements, functions, and implementations.

Rate Limits

API rate limits vary by plan:
  • Free: 100 requests per hour
  • Pro: 1,000 requests per hour
  • Enterprise: Custom limits
Rate limit information is included in response headers.

Response Formats

CodeAlive API endpoints use different response formats depending on the operation:
  • Data Source APIs: Return arrays or objects directly
  • Chat Completions: Return JSON objects or Server-Sent Events (SSE) for streaming
  • Search API: Returns structured results with metadata
Refer to each endpoint’s documentation for specific response schemas.

Error Handling

API errors use standard HTTP status codes with error messages:
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API key"
  }
}
For Dify Knowledge Retrieval API, errors follow the Dify External Knowledge API format:
{
  "error_code": 1004,
  "error_msg": "Authentication failed. Please provide a valid API key."
}
Common status codes:
  • 200: Success
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 404: Not Found
  • 429: Rate Limited
  • 500: Internal Server Error

SDK Support

CodeAlive provides official SDKs and integrations:

MCP Server

Model Context Protocol for AI assistants

Python SDK

Coming soon

Node.js SDK

Coming soon

REST API

Direct HTTP integration

Need Help?

Support

Contact our support team

GitHub

Check our repositories for examples