"The core OpenAI-compatible inference endpoints: chat completions, embeddings, images, audio (TTS/STT), moderations, rerank, and the Responses API. The primary integration surface for AI agents."
Resources
1Install
npx skillscat add cheaper-inference/omniroute/omni-inference Install via the SkillsCat registry.
Overview
The core OpenAI-compatible inference endpoints: chat completions, embeddings, images, audio (TTS/STT), moderations, rerank, and the Responses API. The primary integration surface for AI agents.
Authentication
All requests require a valid Bearer token or session cookie. Obtain a token via POST /api/auth/login or configure REQUIRE_API_KEY=false for local development.
Endpoints
- `POST /api/v1/session-leases`
- `GET /api/v1/search`
- `POST /api/v1/search`
- `POST /api/v1/chat/completions`
- `GET /api/v1/ws`
- `POST /api/v1/providers/{provider}/chat/completions`
- `POST /api/v1/api/chat`
- `POST /api/v1/messages`
- `POST /api/v1/messages/count_tokens`
- `POST /api/v1/responses`
- `POST /api/v1/embeddings`
- `GET /api/v1/multimodal-embeddings`
- `POST /api/v1/multimodal-embeddings`
- `POST /api/v1/providers/{provider}/embeddings`
- `POST /api/v1/images/generations`
- `POST /api/v1/providers/{provider}/images/generations`
- `POST /api/v1/audio/speech`
- `POST /api/v1/audio/transcriptions`
- `POST /api/v1/moderations`
- `POST /api/v1/rerank`
- `GET /api/v1`
- `GET /api/v1/providers/{provider}/models`
- `GET /api/v1/management/proxy-subscriptions`
- `POST /api/v1/management/proxy-subscriptions`
- `GET /api/v1/management/proxy-subscriptions/{id}`
- `PATCH /api/v1/management/proxy-subscriptions/{id}`
- `DELETE /api/v1/management/proxy-subscriptions/{id}`
- `GET /api/v1/management/proxy-subscriptions/{id}/nodes`
- `POST /api/v1/management/proxy-subscriptions/{id}/refresh`
- `POST /api/v1/ocr`
- `POST /api/v1/audio/translations`
- `GET /api/v1/voices`
- `POST /api/v1/speech-to-text`
- `POST /api/v1/text-to-speech/{voiceId}`
- `POST /api/v1/sound-generation`
- `POST /api/v1/music`
- `POST /api/v1/music/stream`
- `POST /api/v1/music/detailed`
- `POST /api/v1/music/detailed/stream`
- `POST /api/v1/music/plan`
- `GET /api/v1/explain/routing`
- `GET /api/v1/providers/suggested-models`
- `GET /api/v1/provider-plugin-manifest`
- `GET /api/v1/{omnirouteCatchAll}`
- `POST /api/v1/{omnirouteCatchAll}`
- `PUT /api/v1/{omnirouteCatchAll}`
- `PATCH /api/v1/{omnirouteCatchAll}`
- `DELETE /api/v1/{omnirouteCatchAll}`
- `GET /api/v1/accounts/{id}/limits`
- `PUT /api/v1/accounts/{id}/limits`
- `GET /api/v1/agents/credentials`
- `POST /api/v1/agents/credentials`
- `GET /api/v1/agents/health`
- `GET /api/v1/agents/tasks`
- `POST /api/v1/agents/tasks`
- `DELETE /api/v1/agents/tasks`
- `GET /api/v1/agents/tasks/{id}`
- `POST /api/v1/agents/tasks/{id}`
- `DELETE /api/v1/agents/tasks/{id}`
- `POST /api/v1/antigravity`
- `GET /api/v1/auto-combo/{channel}/candidates`
- `GET /api/v1/batches`
- `POST /api/v1/batches`
- `GET /api/v1/batches/{id}`
- `DELETE /api/v1/batches/{id}`
- `POST /api/v1/batches/{id}/cancel`
- `DELETE /api/v1/batches/delete-completed`
- `POST /api/v1/classify`
- `GET /api/v1/combos`
- `POST /api/v1/completions`
- `GET /api/v1/files`
- `POST /api/v1/files`
- `GET /api/v1/files/{id}`
- `DELETE /api/v1/files/{id}`
- `GET /api/v1/files/{id}/content`
- `POST /api/v1/images/edits`
- `GET /api/v1/images/upscale`
- `POST /api/v1/images/upscale`
- `GET /api/v1/media/{id}`
- `POST /api/v1/issues/report`
- `GET /api/v1/management/proxies`
- `POST /api/v1/management/proxies`
- `PATCH /api/v1/management/proxies`
- `DELETE /api/v1/management/proxies`
- `GET /api/v1/management/proxies/assignments`
- `PUT /api/v1/management/proxies/assignments`
- `PUT /api/v1/management/proxies/bulk-assign`
- `GET /api/v1/management/proxies/health`
- `GET /api/v1/me/status`
- `GET /api/v1/me/sessions`
- `GET /api/v1/me/sessions/{id}`
- `GET /api/v1/muse-code/models`
- `GET /api/v1/music/generations`
- `POST /api/v1/music/generations`
- `GET /api/v1/providers/{provider}/limits`
- `PUT /api/v1/providers/{provider}/limits`
- `GET /api/v1/quota-recoveries/{id}`
- `DELETE /api/v1/quota-recoveries/{id}`
- `GET /api/v1/quotas/check`
- `GET /api/v1/registered-keys`
- `POST /api/v1/registered-keys`
- `GET /api/v1/registered-keys/{id}`
- `DELETE /api/v1/registered-keys/{id}`
- `POST /api/v1/registered-keys/{id}/revoke`
- `POST /api/v1/relay/chat/completions`
- `POST /api/v1/relay/chat/completions/bifrost`
- `POST /api/v1/responses/{path}`
- `GET /api/v1/search/analytics`
- `POST /api/v1/segment`
- `GET /api/v1/systemone`
- `POST /api/v1/systemone`
- `GET /api/v1/video-bridge/drilldown`
- `DELETE /api/v1/video-bridge/drilldown`
- `GET /api/v1/videos/generations`
- `POST /api/v1/videos/generations`
- `GET /api/v1/vscode/{token}`
- `POST /api/v1/vscode/{token}/api/chat`
- `POST /api/v1/vscode/{token}/api/show`
- `GET /api/v1/vscode/{token}/api/tags`
- `GET /api/v1/vscode/{token}/api/version`
- `POST /api/v1/vscode/{token}/chat/completions`
- `GET /api/v1/vscode/{token}/combos`
- `GET /api/v1/vscode/{token}/models`
- `POST /api/v1/vscode/{token}/responses`
- `POST /api/v1/vscode/{token}/v1/chat/completions`
- `GET /api/v1/vscode/{token}/v1/models`
- `GET /api/v1/vscode/combos/{token}`
- `GET /api/v1/vscode/combos/{token}/api/version`
- `GET /api/v1/vscode/combos/{token}/api/tags`
- `POST /api/v1/vscode/combos/{token}/api/show`
- `GET /api/v1/vscode/raw/{token}`
- `POST /api/v1/vscode/raw/{token}/api/chat`
- `POST /api/v1/vscode/raw/{token}/api/show`
- `GET /api/v1/vscode/raw/{token}/api/tags`
- `GET /api/v1/vscode/raw/{token}/api/version`
- `POST /api/v1/vscode/raw/{token}/chat/completions`
- `GET /api/v1/vscode/raw/{token}/combos`
- `GET /api/v1/vscode/raw/{token}/models`
- `POST /api/v1/vscode/raw/{token}/responses`
- `POST /api/v1/vscode/raw/{token}/v1/chat/completions`
- `GET /api/v1/vscode/raw/{token}/v1/models`
- `POST /api/v1/web/fetch`
Payloads
See the full OpenAPI specification at GET /api/openapi/spec or docs/openapi.yaml for detailed request/response schemas.
Chat completions
Requires OMNIROUTE_URL and OMNIROUTE_KEY. See entry-point SKILL for setup.
Endpoints
POST $OMNIROUTE_URL/v1/chat/completions— OpenAI formatPOST $OMNIROUTE_URL/v1/messages— Anthropic Messages formatPOST $OMNIROUTE_URL/v1/responses— OpenAI Responses API
Discover
curl $OMNIROUTE_URL/v1/models | jq '.data[].id'Combos (e.g. auto, cost-optimized, subscription) auto-fallback through multiple providers.
OpenAI format example
curl -X POST $OMNIROUTE_URL/v1/chat/completions \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-7",
"messages": [{"role": "user", "content": "Refactor this function"}],
"stream": true
}'Anthropic format example
curl -X POST $OMNIROUTE_URL/v1/messages \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-7",
"max_tokens": 4096,
"messages": [{"role": "user", "content": "Hi"}]
}'Tool use
Supports OpenAI tools array and Anthropic tools block. Tool results
auto-compressed via RTK (47 filters: git-diff, grep, test-jest, terraform-plan,
docker-logs, etc.) — 20-40% token savings. Disable per-request withx-omniroute-compression: off header.
Reasoning / thinking
Anthropic extended thinking and OpenAI Responses reasoning blocks are forwarded
verbatim. Cached automatically via reasoning cache.
Errors
401→ invalid API key400 Invalid model format→ model string not parseable; check/v1/models503 provider_circuit_open→ provider circuit breaker tripped; honorRetry-Afteror use combo429 rate_limited→ honorRetry-After; consider using a combo for auto-fallback
Image generation
Requires OMNIROUTE_URL and OMNIROUTE_KEY. See entry-point SKILL for setup.
Endpoints
POST $OMNIROUTE_URL/v1/images/generations— Text-to-imagePOST $OMNIROUTE_URL/v1/images/edits— Image edit (mask)POST $OMNIROUTE_URL/v1/images/upscale— Upscale
Discover
curl "$OMNIROUTE_URL/v1/models?kind=image" | jq '.data[]'Generate example
curl -X POST $OMNIROUTE_URL/v1/images/generations \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "dall-e-3",
"prompt": "a red bicycle on a wet street, photoreal",
"n": 1,
"size": "1024x1024",
"response_format": "b64_json"
}'Response: { created, data: [{ url? or b64_json, revised_prompt }] }
Errors
400 content_policy_violation→ blocked by provider safety503→ provider unavailable; try another model from/v1/models?kind=image
Text-to-speech
Requires OMNIROUTE_URL and OMNIROUTE_KEY. See entry-point SKILL for setup.
Endpoint
POST $OMNIROUTE_URL/v1/audio/speech— returns binary audio (mp3/opus/wav/flac)
Discover
curl "$OMNIROUTE_URL/v1/models?kind=audio" | jq '.data[]'
curl "$OMNIROUTE_URL/v1/voices" | jqExample
curl -X POST $OMNIROUTE_URL/v1/audio/speech \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "tts-1",
"input": "Hello from OmniRoute.",
"voice": "alloy",
"response_format": "mp3"
}' --output speech.mp3Voices
Voice names vary by provider. List them with GET /v1/voices.
Common OpenAI voices: alloy, echo, fable, onyx, nova, shimmer.
Errors
503→ provider unavailable; try another model from/v1/models?kind=audio
Speech-to-text
Requires OMNIROUTE_URL and OMNIROUTE_KEY. See entry-point SKILL for setup.
Endpoints
POST $OMNIROUTE_URL/v1/audio/transcriptions— multipart upload, returns textPOST $OMNIROUTE_URL/v1/audio/translations— transcribe + translate to English
Discover
curl "$OMNIROUTE_URL/v1/models?kind=audio" | jq '.data[]'Example
curl -X POST $OMNIROUTE_URL/v1/audio/transcriptions \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-F "file=@audio.mp3" \
-F "model=whisper-1" \
-F "response_format=verbose_json"Response: { text, language, duration, segments?:[{ start, end, text }] }
Supported formats
Audio: mp3, mp4, mpeg, mpga, m4a, wav, webm.
Response formats: json, text, srt, verbose_json, vtt.
Errors
400 file_too_large→ exceeds provider limit (usually 25MB)503→ provider unavailable; try another model from/v1/models?kind=audio
Embeddings
Requires OMNIROUTE_URL and OMNIROUTE_KEY. See entry-point SKILL for setup.
Endpoint
POST $OMNIROUTE_URL/v1/embeddings
Discover
curl "$OMNIROUTE_URL/v1/models?kind=embedding" | jq '.data[]'Example
curl -X POST $OMNIROUTE_URL/v1/embeddings \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-3-large",
"input": ["first text", "second text"],
"encoding_format": "float"
}'Response: { data:[{ embedding:[...], index }], usage:{ prompt_tokens, total_tokens } }
Batch input
input accepts a string or array of strings (up to provider batch limit, typically 2048 items).
Errors
503→ provider unavailable; try another model from/v1/models?kind=embedding
Web search
Setup: see omni-auth. Search: POST $OMNIROUTE_URL/v1/search. List providers: GET $OMNIROUTE_URL/v1/search.
curl -X POST "$OMNIROUTE_URL/v1/search" \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"OmniRoute release notes","provider":"tavily","max_results":5,"search_type":"web"}'| Field | Notes |
|---|---|
query |
Required. 1 to 500 characters. |
provider |
Alias or id, for example tavily or tavily-search. If you omit it, OmniRoute walks the providers by cost and uses the first one that has credentials. |
max_results |
1 to 100. Default 5. |
search_type |
web (default), news, x, finance. Not every provider supports every type. |
time_range |
any, hour, day, week, month, year. |
filters |
include_domains, exclude_domains (20 each), safe_search. |
provider_options |
Passed to the provider. Tavily: {"tavily":{"search_depth":"advanced"}}. Google PSE needs {"cx":"<engine id>"}. |
Do not send model. OmniRoute ignores it. It does not select a provider.
Response (values are examples):
{ "provider": "tavily-search", "query": "...",
"results": [{ "title": "...", "url": "...", "snippet": "...", "position": 1, "score": 0.9,
"citation": { "provider": "tavily-search", "retrieved_at": "...", "rank": 1 } }],
"answer": null,
"usage": { "queries_used": 1, "search_cost_usd": 0.008 },
"metrics": { "response_time_ms": 850, "upstream_latency_ms": 700, "total_results_available": 12 },
"errors": [] }answer is always null today. Read results[].snippet. Top-level include_answer and search_depth are ignored.
Errors: 400 Unknown search provider: <id>, 400 ... does not support search_type: <type>,400 No credentials configured for search provider: <id>.
Web fetch
POST $OMNIROUTE_URL/v1/web/fetch
curl -X POST "$OMNIROUTE_URL/v1/web/fetch" \
-H "Authorization: Bearer $OMNIROUTE_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","provider":"jina-reader","format":"markdown","include_metadata":true}'| Field | Notes |
|---|---|
url |
Required. A valid http or https URL. |
provider |
firecrawl, jina-reader, tavily-search, tinyfish, anysearch-search, context7, nimble-search, parallel-search. If you omit it, OmniRoute uses the first provider that has credentials, in this order. context7 is never automatic. An explicit provider has no fallback. |
format |
markdown (default), html, links, screenshot. text returns 400. Some providers support only markdown. |
depth, wait_for_selector |
Used by Firecrawl. Other providers ignore them. |
include_metadata |
true adds metadata.title and metadata.description. |
Response (values are examples):
{ "provider": "jina-reader", "url": "https://example.com", "content": "# Example Domain ...",
"links": [], "metadata": { "title": "Example Domain", "description": null }, "screenshot_url": null }content is a string. Errors: 400 No credentials configured for web-fetch provider: <id>,401 Authentication required (only when a key is required),429 All configured web-fetch providers are rate limited or quota-exhausted,web_fetch_error with the upstream status (default 502). The /v1/models catalog has no web-fetch entries. The eight ids above are the full set.