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.

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.

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:

Need Help?