omni-inference
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.
By diegosouzapw · 448 installs
npx skills add diegosouzapw/omniroute --skill omni-inference
Source repository · Upstream listing
<! generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten
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
Acquire, renew, or release an exclusive managed connection lease
Requires an API key with lease:exclusive and an explicit non empty
allowedConnections policy. The opaque owner is bound to the authenticated API key;
the lease owns an eligible connection, not a provider or model. Managed inference
requests present the owner and exact generation headers. Temporary foreign occupancy
returns 429 WAITING FOR CAPACITY with Retry After .
POST /api/v1/chat/completions
Create chat completion
OpenAI compatible chat completions endpoint. Routes to configured providers.
GET /api/v1/ws
Chat completion over WebSocket (handshake + upgrade)
OpenAI compatible chat over a WebSocket connection. GET with ?handshake=1 returns the connection descriptor (auth path, message protocol and live event channels) as JSON; a plain GET without an Upgrade returns 426 Upgrade Required . After upgrading, the client exchanges JSON frames — {type:"request", id, payload:{model, messages}} to start a completion and {type:"cancel", id} to abort it. A separate live channel (default port LIVE WS PORT=20129 , path /live ) streams dashboard events on the requests , combo and credentials topics with a 15s heartbeat. Requires an API key.
POST /api/v1/providers/{provider}/chat/completions
Create chat completion (provider specific)
Routes to a specific provider by name.
POST /api/v1/api/chat
Ollama compatible chat endpoint
Provides compatibility with Ollama's /api/chat format.
POST /api/v1/messages
Create message (Anthropic compatible)
Anthropic Messages API endpoint. Routes to Claude providers.
POST /api/v1/messages/count tokens
Count tokens for a message
POST /api/v1/responses
Create response (OpenAI Responses API)
OpenAI Responses API endpoint.
POST /api/v1/embeddings
Create embeddings
GET /api/v1/multimodal embeddings
List embedding models (Jina multimodal embeddings alias)
POST /api/v1/multimodal embeddings
Create embeddings (Jina multimodal embeddings alias)
Same handler as POST /api/v1/embeddings . Provided so Jina compatible clients that call /v1/multimodal embeddings do not receive HTTP 404 unknown route .
POST /api/v1/providers/{provider}/embeddings
Create embeddings (provider specific)
POST /api/v1/images/generations
Generate images
POST /api/v1/providers/{provider}/images/generations
Generate images (provider specific)
POST /api/v1/audio/speech
Generate speech audio
Text to speech endpoint. Routes to configured TTS providers.
POST /api/v1/audio/transcriptions
Transcribe audio
Audio to text transcription endpoint.
POST /api/v1/moderations
Create moderation
Content moderation endpoint. Routes to configured moderation providers.
POST /api/v1/rerank
Rerank documents
Document reranking endpoint.
GET /api/v1
API v1 root endpoint
Returns basic API info and status.
GET /api/v1/providers/{provider}/models
List models for a specific provider
Returns only models for the selected provider with provider prefix removed from each model id.
GET /api/v1/management/proxy subscriptions
List proxy subscriptions
Lists all operator supplied proxy subscription links. Also starts the background auto refresh scheduler (idempotent) so enabled subscriptions stay in sync. Credentials embedded in url are redacted in the response.
POST /api/v1/management/proxy subscriptions
Create a proxy subscription
Creates a subscription record. If mode is rule , at least one entry in ruleProviders is required. updateIntervalMinutes defaults to 60 and enabled defaults to false when omitted or not exactly true .
GET /api/v1/management/proxy subscriptions/{id}
Get a proxy subscription
PATCH /api/v1/management/proxy subscriptions/{id}
Update a proxy subscription
Partial update — only fields present in the body are changed (name/url/mode/ruleProviders/localCoreEndpoint/updateIntervalMinutes/enabled).
DELETE /api/v1/management/proxy subscriptions/{id}
Delete a proxy subscription
Removes the subscription record and unbinds/drops its synced proxy registry rows.
GET /api/v1/management/proxy subscriptions/{id}/nodes
Get a subscription's last parsed node summary
Returns the last parsed node list without re fetching the (possibly slow) subscription URL.
POST /api/v1/management/proxy subscriptions/{id}/refresh
Refresh a proxy subscription
Re fetches and re parses the subscription URL, syncs its nodes into proxy registry , and (re)binds the pool.
POST /api/v1/ocr
Document OCR
Multi provider document OCR endpoint (Mistral OCR–compatible request and response shape). Accepts a JSON body referencing a document/image and returns extracted text. model selects the provider via a provider/model prefix (e.g. mistral/mistral ocr latest , azure document intelligence/prebuilt read , vertex deepseek ocr/deepseek ocr maas ); a bare model id (e.g. mistral ocr latest ) resolves to its registered provider, and an omitted model defaults to Mistral. Azure Document Intelligence is asynchronous upstream — the handler polls the returned operation until it succeeds or fails before responding, so this endpoint can take longer to return for that provider. Success responses carry the X OmniRoute cost telemetry headers.
POST /api/v1/audio/translations
Translate audio to English
OpenAI Whisper–compatible audio translation (multipart/form data). Unlike /api/v1/audio/transcriptions , output is always English regardless of the source language. Success responses carry the X OmniRoute cost telemetry headers.
GET /api/v1/voices
List ElevenLabs voices
Proxies GET https://api.elevenlabs.io/v1/voices using the stored elevenlabs provider credentials (the caller never sends xi api key ). The incoming query string is forwarded unchanged.
POST /api/v1/speech to text
ElevenLabs speech to text
Streams the request body to POST https://api.elevenlabs.io/v1/speech to text using the stored elevenlabs provider credentials. content type and accept are forwarded; the upstream body is relayed unchanged.
POST /api/v1/text to speech/{voiceId}
ElevenLabs text to speech
Streams the request body to POST https://api.elevenlabs.io/v1/text to speech/{voiceId} using the stored elevenlabs provider credentials. voiceId must match ^[A Za z0 9 ]+$ or the request is rejected with 400 before any upstream call.
GET /api/v1/explain/routing
Routing explainability snapshot
Returns the most recent routing events (bounded in memory ring buffer) plus the per provider/model quality snapshot from open sse/services/routing . Routing metadata only — never prompts, bodies, headers or credentials. Auth mirrors /api/v1/combos : a valid Bearer API key or a dashboard session; with REQUIRE API KEY=false anonymous reads are allowed.
GET /api/v1/providers/suggested models
Suggested media models
Read only server side proxy to the public HuggingFace Hub models search API, used by the dashboard to suggest models for a media provider kind without exposing an HF token client side. Never accepts or returns credentials.
GET /api/v1/provider plugin manifest
Provider plugin manifest
Returns the manifest describing installed provider plugins.
Payloads
See the full OpenAPI specification at GET /api/openapi/spec or docs/openapi.yaml for detailed request/response schemas.
<! skill:custom start
<! Aggregated from: omniroute chat, omniroute image, omniroute tts, omniroute stt, omniroute embeddings, omniroute web search, omniroute web fetch
Chat completions
Requires OMNIROUTE URL and OMNIROUTE KEY . See [entry point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup.
Endpoints
POST $OMNIROUTE URL/v1/chat/completions — OpenAI format
POST $OMNIROUTE URL/v1/messages — Anthropic Messages format
POST $OMNIROUTE URL/v1/responses — OpenAI Responses API
Discover
Combos (e.g. auto , cost optimized , subscription ) auto fallback through multiple providers.
OpenAI format example
Anthropic format example
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 with
X Omniroute Rtk: off header.
Reasoning / thinking
Anthropic extended thinking and OpenAI Responses reasoning blocks are forwarded
verbatim. Cached automatically via reasoning cache.
Errors
401 → invalid API key
400 invalid model → model not in registry; check /v1/models
503 circuit open → provider circuit breaker tripped; retry later or use combo
429 rate limited → honor Retry After ; consider using a combo for auto fallback
Image generation
Requires OMNIROUTE URL and OMNIROUTE KEY . See [entry point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup.
Endpoints
POST $OMNIROUTE URL/v1/images/generations — Text to image
POST $OMNIROUTE URL/v1/images/edits — Image edit (mask)
POST $OMNIROUTE URL/v1/images/variations — Variations
Discover
Returns { id, owned by, sizes:[...], capabilities:[...] } per model.
Generate example
Response: { created, data: [{ url? or b64 json, revised prompt }] }
Errors
400 invalid size → not supported by this model; check /v1/models/image
400 content policy violation → blocked by provider safety
503 → provider unavailable; try another model in /v1/models/image
Text to speech
Requires OMNIROUTE URL and OMNIROUTE KEY . See [entry point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup.
Endpoint
POST $OMNIROUTE URL/v1/audio/speech — returns binary audio (mp3/opus/wav/flac)
Discover
Each entry includes voices:[...] for the available voice names per provider.
Example
Voices
Voice names vary by provider. Check /v1/models/tts — each entry has voices:[...] .
Common OpenAI voices: alloy , echo , fable , onyx , nova , shimmer .
Errors
400 invalid voice → voice not supported by this model
400 input too long → input exceeds model character limit
503 → provider unavailable; try another model in /v1/models/tts
Speech to text
Requires OMNIROUTE URL and OMNIROUTE KEY . See [entry point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup.
Endpoints
POST $OMNIROUTE URL/v1/audio/transcriptions — multipart upload, returns text
POST $OMNIROUTE URL/v1/audio/translations — transcribe + translate to English
Discover
Example
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 invalid file format → unsupported audio format
400 file too large → exceeds provider limit (usually 25MB)
503 → provider unavailable; try another model in /v1/models/stt
Embeddings
Requires OMNIROUTE URL and OMNIROUTE KEY . See [entry point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup.
Endpoint
P