Skip to Content
Launching the open-source gateway

Other APIs

Media, embeddings, realtime, and passthrough endpoints, on the same base URL and key.

Every endpoint lives on https://gateway.respan.ai and takes your Respan API key: Authorization: Bearer for OpenAI-shaped endpoints, x-api-key for Anthropic’s, x-goog-api-key for Google’s. Each one is routed, billed, and logged like a chat request, and answers with X-Respan-Log-Id. Respan params work on all of them.

The main API formats have their own pages: OpenAI Chat Completions, OpenAI Responses, Anthropic Messages, Google GenerateContent, and TypeSafe Decisions.

Media

EndpointMethod and pathBilled perGuide
Image generationPOST /v1/images/generationsImageImages
Image editsPOST /v1/images/editsImageImages
VideosPOST /v1/videos, GET /v1/videos/{id}, GET /v1/videos/{id}/content, POST /v1/videos/{id}/remixSecond of videoVideo
SpeechPOST /v1/audio/speechMinute of audioAudio
TranscriptionsPOST /v1/audio/transcriptionsMinute of audioAudio

Embeddings

EndpointMethod and pathBilled perGuide
EmbeddingsPOST /v1/embeddingsInput tokenEmbeddings

Realtime

Realtime sessions run over WebSocket. Each session is billed and logged once it ends.

EndpointURLGuide
OpenAI Realtimewss://gateway.respan.ai/v1/realtime?model=...Realtime
Gemini Livewss://gateway.respan.ai/ws/google.ai.generativelanguage.v1beta.GenerativeService.BidiGenerateContent?model=...Realtime
Mistral realtime transcriptionwss://gateway.respan.ai/v1/audio/transcriptions/realtime?model=...Realtime

OpenAI decisions

EndpointMethod and pathGuide
OpenAI decisionsPOST /openai/v1/decisionsDecisions

The same decisions models answer OpenAI’s decisions contract (input, ordered questions and answers) and Respan’s System One contract.

Provider passthrough

These paths send the provider’s own body as is. With a key of your own for that provider, nothing is translated, routed, or charged to Respan credits; the call is only logged, with X-Respan-Log-Id and the provider’s X-Respan-Upstream-Request-Id. Without one, the request runs on Respan credits on the provider the path names, routed and billed like any other call. Use them when you need a provider field the API formats can’t translate, or a tool expects the provider’s exact responses.

PathProviderRespan key inProvider key from
POST /api/{provider}/v1/chat/completionsAn OpenAI-shaped provider, such as openai, azure_openai, xai, groq, mistral, deepseek, togetherai, fireworks, or perplexityAuthorization: BearerA key sent with the request, else your saved key for that provider, else Respan credits
POST /api/openrouter/v1/chat/completionsOpenRouterAuthorization: BearerThe x-openrouter-api-key header
POST /api/anthropic/passthrough/v1/messagesAnthropicx-api-key or Authorization: BearerA key sent with the request, else your saved Anthropic key, else Respan credits
POST /api/google/gemini/v1beta/models/{model}:{action}, POST /api/google/models/{model}:{action}Google Gemini APIx-goog-api-keyA key sent with the request, else your saved Gemini key, else Respan credits

Save provider keys with BYOK, or send one with the request in customer_credentials or credential_override (see Send a key with the request). A credential_override that names no key is refused rather than sent on Respan’s key. OpenRouter passthrough needs x-openrouter-api-key and is refused with 400 without it.

Respan params go in respan_params in the body, or in metadata.respan_params, and are removed before sending.

Python
import os import anthropic client = anthropic.Anthropic( base_url="https://gateway.respan.ai/api/anthropic/passthrough", api_key=os.environ["RESPAN_API_KEY"], ) message = client.messages.create( model="claude-sonnet-4-5-20250929", max_tokens=1024, messages=[{"role": "user", "content": "Hello!"}], )

On an OpenAI-shaped passthrough, send respan_params as an object through extra_body. The OpenAI SDK types metadata as strings, and a respan_params string inside metadata is ignored.