API reference

OpenAI-compatible API

Point OpenAI-compatible SDKs at the gateway to access routed chat, Responses, embeddings, image, audio, realtime, rerank, and moderation APIs.

Base path

/v1

Authentication

Authorization: Bearer <key>

Chat Completions

Create a model response from an ordered list of conversation messages.

POST/v1/chat/completions
FieldTypeDescription
modelRequiredstringA model ID available to the calling API key.
messagesRequiredarrayThe ordered conversation messages to send to the model.
streambooleanWhen true, return server-sent event chunks as output is generated.
toolsarrayTool definitions the model may call when supported.
temperaturenumberSampling temperature supported by the selected model.
max_tokensintegerMaximum generated tokens for compatible models.
Request body · json
{
  "model": "gpt-4o",
  "messages": [
    {"role": "system", "content": "You are concise."},
    {"role": "user", "content": "What is token routing?"}
  ],
  "stream": false
}

Responses API

Use the unified Responses format for multimodal input, tools, reasoning models, and streaming events.

POST/v1/responses
Request body · json
{
  "model": "gpt-4.1-sol",
  "input": "Summarize the benefits of provider-independent routing.",
  "stream": true
}
POST/v1/responses/compact

Compact a response context

Reduce a compatible Responses conversation into a smaller context representation.

Embeddings

Create embeddings in the provider-compatible response shape while preserving gateway usage accounting.

POST/v1/embeddings
Request body · json
{
  "model": "text-embedding-3-small",
  "input": ["Routing", "Capacity", "Settlement"]
}

Realtime API

Connect with the OpenAI Realtime WebSocket subprotocol and send your API key through the supported protocol header.

WebSocket URL
wss://your-gateway.example.com/v1/realtime?model=gpt-realtime

Additional endpoints

These routes are relayed when the selected model and upstream adapter support the operation.

POST/v1/completions

Legacy completions

Generate text from a prompt for compatible completion models.

POST/v1/embeddings

Embeddings

Create vector representations from text or token inputs.

POST/v1/images/generations

Image generation

Generate images with a compatible image model.

POST/v1/images/edits

Image edits

Edit one or more images using a multipart request.

POST/v1/audio/transcriptions

Transcriptions

Transcribe uploaded audio into text.

POST/v1/audio/translations

Audio translations

Translate supported audio into English text.

POST/v1/audio/speech

Text to speech

Synthesize audio from text with a compatible voice model.

POST/v1/rerank

Rerank

Score and reorder documents against a query.

POST/v1/moderations

Moderations

Classify text or image inputs with a compatible moderation model.