Developers / Docs / API reference

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.

APIBase URL
OpenAI-compatiblehttps://api.ark-labs.cloud/api/v1
Anthropic-compatiblehttps://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

ReferenceRoutes
Chat completionsPOST /api/v1/chat/completions
EmbeddingsPOST /api/v1/embeddings
Audio transcriptionsPOST /api/v1/audio/transcriptions
Models and statusGET /api/v1/models, GET /api/v1/status, GET /api/anthropic/v1/models
MessagesPOST /api/anthropic/v1/messages
Count tokensPOST /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.