Skip to content

OpenAI API, endpoint by endpoint

Code written for the OpenAI API keeps working when you point it at the gateway. This section takes each endpoint in turn: what reaches which provider, what the gateway records, and the errors you can meet.

The settings are the same for every endpoint: the base address https://<your-gateway>/v1 and a Vidai key. See OpenAI SDK for Python for how to set them.

Which endpoint reaches which provider

Chat Completions is translated: one request shape reaches every provider. Every other endpoint goes only to a provider that speaks the OpenAI API itself: OpenAI, Azure OpenAI, and providers added with the OpenAI kind of API (Mistral, Groq, Together AI and others) where that provider offers the endpoint. Sent to a Claude or Gemini model, such a call gets a clear 400 and is never sent somewhere else.

Endpoint Path Which providers Page
Chat Completions POST /v1/chat/completions All: OpenAI, Azure OpenAI, Anthropic, Gemini, Vertex AI, AWS Bedrock and OpenAI-compatible providers Chat Completions
Responses POST /v1/responses and /v1/responses/{id} OpenAI and Azure OpenAI (and OpenAI-compatible providers that offer it) Responses
Completions (legacy) POST /v1/completions OpenAI and Azure OpenAI (and OpenAI-compatible providers that offer it) Completions
Embeddings POST /v1/embeddings OpenAI-format providers Embeddings
Moderations POST /v1/moderations OpenAI and Azure OpenAI Moderations
Images POST /v1/images/generations, /edits, /variations OpenAI-format providers Images
Audio POST /v1/audio/transcriptions, /translations, /speech OpenAI-format providers Audio
Video POST /v1/video/generations, /v1/videos OpenAI-format providers that still offer video (OpenAI itself retired it) Video
OCR, rerank, predictions POST /v1/ocr, /v1/rerank, /v1/predictions Providers that offer them OCR, rerank and predictions
Files and uploads /v1/files, /v1/uploads The one provider that serves files Files and uploads
Batches /v1/batches The one provider that serves files Batches
Fine-tuning /v1/fine_tuning/jobs The one provider that serves files Fine-tuning
Models GET /v1/models Answered by the gateway: the models your key may call Chat Completions
Assistants /v1/assistants, /v1/threads, /v1/vector_stores Not served Assistants
Realtime /v1/realtime (WebSocket) Not served Realtime

The same on every endpoint

  • Every answer carries x-vidai-request-id. Paste it into Request logs › Request reference to find the call (it shows within seconds).
  • Errors carry x-vidai-error-code. Match on it, not on the message. The full list is in Headers and errors.
  • Paths are exact. A near miss, such as /v1/audio/transcription for /v1/audio/transcriptions, gets 404 endpoint_not_found.
  • Cost is never in the answer. Find it in Request logs.