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
- Chat Completions — OpenAI-format
POST /v1/chat/completions. - Messages — Anthropic-format
POST /v1/messages. - Completions — Legacy text-completion
POST /v1/completions.
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.
- Images —
POST /v1/images/generations. - Video —
POST /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_searchbuilt-in tool in chat. - Realtime — Bidirectional voice + text sessions.
POST /v1/realtime/sessionsprovisions a ticket; client connects via WebSocket at/v1/realtime/connect.
Discovery & Errors
- Models —
GET /v1/modelslists 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/v1with the API key passed as Authorization: Bearer <aigw_sk_...>.