Skip to main content
The Arbytra API is OpenAI-compatible. You can use the OpenAI SDK with a base URL change.

Base URL

Make a request

Send a chat completion request:
To stream the response, set stream to true:
To optimize for cost, add routing options:

Endpoints

OpenAI compatibility

Arbytra supports the same request/response format as OpenAI. Switch to Arbytra by changing two values:
  1. Base URL: https://api.openai.com/v1https://api.arbytra.com/v1
  2. API Key: Use your Arbytra API key (starts with ak_)

Arbytra extensions

Arbytra responses carry additional fields beyond the OpenAI format.

Response extensions

Every chat completion response includes a routing_metadata object with routing and cost details:
When the gateway had to modify or ignore part of the request, warnings carries one or more structured entries:
See Response metadata for the full field reference.

Request extensions

Pass routing options to optimize your requests via the gateway field:

Request metadata

Attach custom metadata to requests for tracking and observability via gateway.metadata. Arbytra strips this metadata before forwarding to the provider.

Response headers

Every response carries custom headers. See Response headers for the full reference.

Authentication

Learn how to authenticate your requests