Skip to content
Development
Skill

/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.

From plugin
omniroute
44k45 skills
Install
$ npx -y skills add diegosouzapw/OmniRoute --skill omni-inference --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/omni-inference

Context preview

The summary Claude sees to decide when to auto-load this skill.

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.

SKILL.md

omni-inference.SKILL.md
name: omni-inference
description: "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."

<!-- 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/chat/completions

Create chat completion

OpenAI-compatible chat completions endpoint. Routes to configured providers.

curl -X POST https://localhost:20128/api/v1/chat/completions \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

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.

curl https://localhost:20128/api/v1/ws \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/v1/providers/{provider}/chat/completions

Create chat completion (provider-specific)

Routes to a specific provider by name.

curl -X POST https://localhost:20128/api/v1/providers/{provider}/chat/completions \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/api/chat

Ollama-compatible chat endpoint

Provides compatibility with Ollama's /api/chat format.

curl -X POST https://localhost:20128/api/v1/api/chat \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/messages

Create message (Anthropic-compatible)

Anthropic Messages API endpoint. Routes to Claude providers.

curl -X POST https://localhost:20128/api/v1/messages \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/messages/count_tokens

Count tokens for a message

curl -X POST https://localhost:20128/api/v1/messages/count_tokens \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/responses

Create response (OpenAI Responses API)

OpenAI Responses API endpoint.

curl -X POST https://localhost:20128/api/v1/responses \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/embeddings

Create embeddings

curl -X POST https://localhost:20128/api/v1/embeddings \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/providers/{provider}/embeddings

Create embeddings (provider-specific)

curl -X POST https://localhost:20128/api/v1/providers/{provider}/embeddings \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/images/generations

Generate images

curl -X POST https://localhost:20128/api/v1/images/generations \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/providers/{provider}/images/generations

Generate images (provider-specific)

curl -X POST https://localhost:20128/api/v1/providers/{provider}/images/generations \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/audio/speech

Generate speech audio

Text-to-speech endpoint. Routes to configured TTS providers.

curl -X POST https://localhost:20128/api/v1/audio/speech \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/audio/transcriptions

Transcribe audio

Audio-to-text transcription endpoint.

curl -X POST https://localhost:20128/api/v1/audio/transcriptions \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/moderations

Create moderation

Content moderation endpoint. Routes to configured moderation providers.

curl -X POST https://localhost:20128/api/v1/moderations \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/v1/rerank

Rerank documents

Document reranking endpoint.

curl -X POST https://localhost:20128/api/v1/rerank \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/v1

API v1 root endpoint

Returns basic API info and status.

curl https://localhost:20128/api/v1 \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

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.

curl https://localhost:20128/api/v1/providers/{provider}/models \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

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 subscr

Read more
Ships withomniroute

Never stop coding. Free MIT AI gateway: one endpoint, 290+ providers (90+ free), 500+ models — Kimi, Claude, GPT, OpenAI, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 500+ contributors

Get the whole plugin
Stats
44,359
Stars
5,961
Forks
Active
Maintenance
TypeScript
Language
MIT
License
7m ago
Last commit
5mo ago
Created

Repo: diegosouzapw/OmniRoute