Build powerful applications with our comprehensive API
Sign up at the console and get your API key from the API settings page
POST /knowledge-basesPOST /documents → POST /queryAll API requests require authentication using your API key in the X-API-Key header:
curl -X GET "API_BASE_URL/tenants/me" \ -H "X-API-Key: YOUR_API_KEY"
/tenants/meGet current tenant information including subscription details and limits
Response:
{
"tenant_id": "string",
"name": "string",
"subscription_tier": "string",
"created_at": "timestamp"
}Example Request:
curl -X GET "API_BASE_URL/tenants/me" \ -H "X-API-Key: YOUR_API_KEY"
/tenants/me/usageGet usage statistics for the current tenant
Response:
{
"documents_count": "number",
"qa_pairs_count": "number",
"queries_count": "number",
"storage_bytes": "number"
}Example Request:
curl -X GET "API_BASE_URL/tenants/me/usage" \ -H "X-API-Key: YOUR_API_KEY"
The API uses standard HTTP status codes to indicate success or failure. All error responses include a JSON body with an error message.
Invalid request parameters or missing required fields.
{
"error": "Missing required field: knowledge_base_id"
}Invalid or missing API key.
{
"error": "Invalid API key"
}The requested resource does not exist.
{
"error": "Knowledge base not found"
}Rate limit exceeded. Check your subscription tier.
{
"error": "Rate limit exceeded. Try again in 60 seconds"
}An unexpected error occurred on the server.
{
"error": "Internal server error. Please try again later"
}Rate limits are applied per tenant based on your subscription tier. Exceeding these limits will result in a 429 error response.
All API requests should be made to the following base URL:
API_BASE_URLReplace API_BASE_URL with your actual API endpoint. You can find this in your dashboard settings or contact support for your specific endpoint URL.
Long-running operations like document processing, video generation, and batch operations are handled asynchronously through workflows.
After initiating a workflow, you'll receive a workflow_id. Use the status endpoint to poll for completion:
GET /workflows/{workflow_id}/status
Response:
{
"id": "wf_abc123",
"status": "completed" | "running" | "failed",
"progress": 75,
"result": { ... }
}