Protocols and endpoints
Chat protocols and image, video, audio, embedding and rerank endpoints.
On this page
Endpoint reference
All endpoints live under /v1 and require authentication. Match the endpoint to the model category.
| Method and path | Purpose |
|---|---|
| POST /v1/chat/completions | OpenAI-compatible chat |
| POST /v1/messages | Anthropic Messages compatibility |
| POST /v1/messages/count_tokens | Input token estimate, no charge |
| POST /v1/responses | Responses compatibility, stateless turns |
| GET /v1/models | Models visible to this key |
| POST /v1/images/generations | Image generation |
| POST /v1/embeddings | Text embeddings |
| POST /v1/rerank | Document reranking |
| POST /v1/audio/speech | Speech synthesis, audio response |
| POST /v1/audio/transcriptions | Transcription, multipart upload |
| POST /v1/videos | Submit an async video job; duration field |
| GET /v1/videos/{id} | Poll job status |
| GET /v1/videos/{id}/content | Download using the submitting key |
Streaming and compatibility
Use stream: true for Chat Completions SSE; the gateway requests upstream usage. For completed streams with a report, read the usage chunk before the end. [DONE] is not JSON and some chunks have no choices. Missing upstream reports or interrupted streams may lack complete usage; check the console ledger.
A compatible endpoint is not a complete implementation of the vendor API. Messages and Responses are translated internally; see client guides for limits and model details for media parameters.