Skip to content

API Reference

The Gatewyse gateway exposes a unified API for accessing 38 AI providers across 9 modalities. Most endpoints are drop-in compatible with the OpenAI HTTP API, and the Messages endpoint accepts the Anthropic request format.

All requests require an API key with the appropriate capability scope. See Authentication for credential setup.

Authentication

  • Authentication — API keys, JWT tokens, rate limiting, and capability scopes.

Chat & Text

Embeddings & Retrieval

  • Embeddings — Vector embeddings via POST /v1/embeddings.
  • Rerank — Document reranking via POST /v1/rerank.

Multimedia

  • Audio — Transcription, translation, and text-to-speech endpoints.
  • ImagesPOST /v1/images/generations.
  • VideoPOST /v1/video/generations.

Assistants & Stateful APIs

  • Files — Upload files for use in chat, batches, and vector stores. POST /v1/files (multipart or base64 JSON) + list / fetch / delete.
  • Batches — Async submission of large workloads at 50% discount. POST /v1/batches + status polling + cancel. Webhook-on-completion supported.
  • Responses — Stateful Responses API with continuation via previous_response_id.
  • Vector Stores — Gateway-owned vector stores for RAG. Attach files, run cosine-similarity search, and reference via file_search built-in tool in chat.
  • Realtime — Bidirectional voice + text sessions. POST /v1/realtime/sessions provisions a ticket; client connects via WebSocket at /v1/realtime/connect.

Discovery & Errors

  • ModelsGET /v1/models lists configured models for the authenticated tenant.
  • Errors — Error envelope shapes, HTTP status codes, and the full error code reference.

Base URL

All endpoints are mounted under /v1 on the gateway server. Point any OpenAI-compatible SDK at:

https://your-gateway.example.com/v1

with the API key passed as Authorization: Bearer <aigw_sk_...>.