Endpoints¶
Every path your program can call on the gateway, grouped by what the gateway does with it. Base address:
https://<your-gateway> (OpenAI SDKs add /v1 to it themselves; see Connect your app).
Translated across providers¶
These reach any model your key may call, whichever provider serves it. Answers and streams come back in the format you called in (Any SDK to any provider).
| Format | Path |
|---|---|
| OpenAI | POST /v1/chat/completions |
| Anthropic | POST /v1/messages |
| Gemini | POST /v1beta/models/{model}:generateContent, POST /v1beta/models/{model}:streamGenerateContent |
| Vertex AI | POST /v1/projects/{project}/locations/{location}/publishers/{publisher}/models/{model}:generateContent (and :streamGenerateContent) |
| Called in ↓ / served by → | OpenAI | Azure OpenAI | Anthropic | Bedrock | Gemini | Vertex AI |
|---|---|---|---|---|---|---|
| OpenAI SDK | ✅ | ✅ | ✅ | ✅ Claude; ⚠️ others, text only | ✅ | ✅ |
| Anthropic SDK | ✅ | ✅ | ✅ | ✅ Claude | ✅ | ✅ |
| Google Gen AI SDK | ✅ | ✅ | ✅ | ✅ Claude; ⚠️ others, text only | ✅ | ✅ |
✅ works as your SDK documents it · ⚠️ works, with the limit named
Same format only¶
These work with a provider that speaks the same API. Sent to a model behind a provider of another format, they get a
clear 400 bad_request saying so; the call is never quietly sent somewhere that would reject it.
| Format | Paths | Served by |
|---|---|---|
| OpenAI | /v1/responses, /v1/completions, /v1/embeddings, /v1/moderations |
OpenAI, Azure OpenAI |
| OpenAI | /v1/audio/transcriptions, /v1/audio/translations, /v1/audio/speech |
OpenAI, Azure OpenAI |
| OpenAI | /v1/images/generations, /v1/images/edits, /v1/images/variations |
OpenAI, Azure OpenAI |
| OpenAI | /v1/video/generations, /v1/videos, /v1/ocr, /v1/rerank, /v1/predictions |
A provider that offers them |
| OpenAI | /v1/files, /v1/batches, /v1/fine_tuning, /v1/uploads (and their sub-paths) |
OpenAI, Azure OpenAI |
| Anthropic | /v1/files (with the Anthropic SDK's headers) |
Anthropic |
| Gemini | /v1beta/models/{model}:embedContent |
Gemini, Vertex AI |
| Gemini | /v1beta/files, POST /upload/v1beta/files |
Gemini |
Paths are matched exactly: a near miss (/v1/audio/transcription without the s) is 404 endpoint_not_found, while
a known path with a model name nobody has is 404 model_not_found.
Answered by the gateway itself¶
| Path | Answers |
|---|---|
GET /v1/models |
The models your key may call, in OpenAI's shape, under the names you'd send |
GET /v1beta/models |
The same, in Gemini's shape |
POST /v1/messages/count_tokens, Gemini /v1beta/models/{model}:countTokens |
Sent to the provider when it speaks the same format; for a model of another format, the gateway counts the tokens itself, without calling the provider, and x-vidai-token-count says how far to trust the number |
GET /health |
Whether the gateway is up. No key needed |
Files, batches and uploads¶
A file call names no model, so the gateway can't choose a provider from it, and a file must always reach the provider that holds it. The gateway picks deterministically, never by guessing:
x-provider, if you send it, names the provider.- Otherwise, the provider your organisation marked to serve files.
- Otherwise, the one provider of your SDK's format that can serve files, when there's exactly one.
- Otherwise,
400naming the candidates. Sendx-providerwith one of them.
With one OpenAI or Azure provider, a standard SDK works with no header at all.
- Files are shared by every key on that provider account: the provider can't tell keys apart, so any key can list, read and delete them.
- Anthropic files go only to an Anthropic provider, never to another vendor.
- Gemini uploads are two steps: the start call goes through the gateway; the bytes go to the address Google returns (Google's own SDKs send them to the gateway's host instead, and the gateway passes them on).
- On Vertex AI, use Cloud Storage. Vertex has no files API: put the media in a bucket in the same project and
reference it as a
gs://address; it passes through unchanged.
Every upload is recorded with its name, type, size and checksum, never its content. Guardrails don't scan file content.
Good to know¶
/v1/responsesworks with OpenAI and Azure OpenAI only.- Anthropic message batches (
/v1/messages/batches) don't work through the gateway. - Bedrock models other than Claude take text only: images and documents are left out and named in
x-vidai-adapted.