API Reference
This section documents the current public endpoints under:
https://api.codeer.ai/api/v1
Authentication
Use API key header on every request:
x-api-key: YOUR_API_KEY
Response Envelope
{
"data": {},
"message": null,
"error_code": 0,
"pagination": {
"limit": 50,
"offset": 0,
"total_records": 100,
"total_pages": 2,
"current_page": 1,
"next_page": "...",
"prev_page": null
}
}
Chat Endpoints
| Method | Endpoint |
|---|---|
| GET | /chats/published-agents |
| POST | /chats |
| GET | /chats |
| PUT | /chats/{chat_id} |
| GET | /chats/{chat_id}/messages |
| POST | /chats/{chat_id}/messages |
| POST | /chats/{chat_id}/regenerate |
| POST | /chats/{chat_id}/form-requests/{form_request_id}/submit |
| POST | /chats/upload-file |
| POST | /chats/{chat_id}/messages/{message_id}/feedbacks |
See Chat API and SSE Streaming.
Batch Endpoints
| Method | Endpoint |
|---|---|
| POST | /batches |
| GET | /batches |
| GET | /batches/{batch_id} |
| GET | /batches/{batch_id}/results |
| POST | /batches/{batch_id}/cancel |
See Batch API.
external_user_id Notes
- Some workspaces enforce whitelist mode.
- In whitelist mode, requests for non-whitelisted users return
403witherror_code=14103. - For API-key integrations, pass
external_user_idconsistently to keep user data partitioned.
Common Error Codes
| HTTP | error_code | Meaning |
|---|---|---|
| 400 | 10006 |
Bad request |
| 403 | 10001 |
Permission denied |
| 403 | 14103 |
Client user not allowed |
| 404 | 10003 |
Resource not found |
| 500 | 10005 |
Server error |