Documentation Index
Fetch the complete documentation index at: https://to11.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
API Reference
The gateway exposes chat ingress endpoints, model discovery, embeddings, token counting, image generation, audio (transcription + TTS), and file management. Each chat endpoint accepts requests in its native SDK format, normalises them internally, and responds in the caller’s format.Health check
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v1/chat/completions | POST | OpenAI / xAI chat completions |
/v1/messages | POST | Anthropic messages API |
/v1/responses | POST | Canonical gateway endpoint (OpenAI / xAI / Anthropic) |
/v1/models | GET | List all configured models |
/v1/models/{model_id} | GET | Get single model info |
/v1/embeddings | POST | Embeddings (OpenAI-compatible providers only) |
/v1/messages/count_tokens | POST | Token counting (Anthropic only) |
/v1/images/generations | POST | Image generation (OpenAI-compatible providers only) |
/v1/audio/transcriptions | POST | Audio transcription (OpenAI, multipart/form-data) |
/v1/audio/speech | POST | Text-to-speech (OpenAI-compatible providers only) |
/v1/files | POST | File upload (OpenAI-compatible providers only) |
/v1/files | GET | List files |
/v1/files/{file_id} | GET | Retrieve file metadata |
/v1/files/{file_id}/content | GET | Download file content |
/v1/files/{file_id} | DELETE | Delete a file |
model field determines which upstream provider handles the request. In addition to plain model names (e.g. gpt-4o), the model field supports namespace prefixes for explicit routing:
function::name— route to a named function defined in your gateway configroute::name— route to a named routeprovider::model— route to a specific provider (e.g.anthropic::claude-sonnet-4-6)
Headers
Authorization
The gateway passes your API key through to the upstream provider. Use theAuthorization header as you normally would with the provider:
SDK detection
The gateway auto-detects the caller’s SDK format from the endpoint. Override with:Provider hints
Force routing to a specific provider:provider::model prefix in the model field:
Chat completions
OpenAI format
Anthropic format
Cross-format routing
Send an OpenAI-format request to an Anthropic model — the gateway translates the request and returns an OpenAI-format response:{"role": "system"} messages and passes them as Anthropic’s top-level system field.
Streaming
Add"stream": true to any request to receive Server-Sent Events:
Structured output
Theresponse_format field is supported for OpenAI models:
text, json_object, json_schema. Anthropic models do not support json_object or json_schema — requests with these formats routed to Anthropic return 400 Bad Request.
Tool calls
Thetools field is forwarded to the upstream provider. For Anthropic models, tool definitions are automatically translated to the input_schema format:
Models
List all configured models or retrieve a single model. These are synthetic responses built from the gateway config — no upstream call is made. No authentication required.Embeddings
Passthrough proxy to OpenAI-compatible providers. The request is routed by model name. Anthropic models return400 Bad Request.
models config array.
Token counting
Passthrough proxy to Anthropic’s/messages/count_tokens endpoint. Only Anthropic models are supported — OpenAI models return 400 Bad Request.
{"input_tokens": 14}
Image generation
Passthrough proxy to OpenAI-compatible providers’ DALL-E endpoint. Anthropic models return400 Bad Request.
prompt field is scanned by the security pipeline when enabled. Image model names must be listed in the provider’s models config array.
Audio transcription
Passthrough proxy to OpenAI’s Whisper endpoint. The request must bemultipart/form-data containing an audio file. No security scanning is applied (binary audio input).
Audio speech (TTS)
Passthrough proxy to OpenAI’s text-to-speech endpoint. Anthropic models return400 Bad Request.
input field is scanned by the security pipeline when enabled.
Files
Passthrough proxy to OpenAI’s file management endpoints. Supports upload (multipart), list, retrieve, download, and delete. Anthropic models return400 Bad Request. No security scanning is applied.
Error responses
| Scenario | Status |
|---|---|
| Unknown model | 404 Not Found |
| Security violation (input PII, blocklist, or output guardrail) | 400 Bad Request |
| Provider returned an error | 502 Bad Gateway |
| Unsupported response_format for provider | 400 Bad Request |