API reference
ARK exposes an OpenAI-compatible API and an Anthropic-compatible API on the same host, with the same keys and models. This reference lists every route, field and response object; the guides in this documentation show how to use them.
| API | Base URL |
|---|---|
| OpenAI-compatible | https://api.ark-labs.cloud/api/v1 |
| Anthropic-compatible | https://api.ark-labs.cloud/api/anthropic/v1 |
Requests and responses are JSON (application/json), except transcription uploads (multipart/form-data) and streams (text/event-stream). Every response carries an x-request-id header; the Anthropic routes add request-id with the same value.
Endpoints
| Reference | Routes |
|---|---|
| Chat completions | POST /api/v1/chat/completions |
| Embeddings | POST /api/v1/embeddings |
| Audio transcriptions | POST /api/v1/audio/transcriptions |
| Models and status | GET /api/v1/models, GET /api/v1/status, GET /api/anthropic/v1/models |
| Messages | POST /api/anthropic/v1/messages |
| Count tokens | POST /api/anthropic/v1/messages/count_tokens |
Authentication
Send your API key as a bearer token, Authorization: Bearer $ARK_API_KEY, on every inference request; the model listings and the status route need no key. The authentication guide covers the Anthropic SDKs and key handling.
Errors
Errors use the envelope of the API you called. Validation errors are always 400, never 422; capacity refusals are 429 and can be retried with backoff. The errors guide lists every status and both envelopes.