Comp AI API v1 Reference
Welcome to the Comp AI API v1 reference documentation. This section provides detailed information about our REST API endpoints, including request parameters, response formats, and example code.
Most API endpoints require authentication using an API key. You can manage your API keys in the Settings > API Keys section of the dashboard.
API keys can be passed in one of two ways:
Authorization
header as a Bearer token: Authorization: Bearer {api_key}
X-API-Key
header: X-API-Key: {api_key}
All API endpoints are relative to:
or, if you self-host:
The API provides access to the following resources:
All API responses follow a consistent JSON format:
Common error codes you might encounter:
Status Code | Description |
---|---|
400 | Bad Request - Often due to missing or invalid parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Valid API key but insufficient permissions |
404 | Not Found - The requested resource doesn’t exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Something went wrong on our end |
If you have questions or need assistance with the API, please contact our support team at support@trycomp.ai or join our Discord community.