Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, 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 900+ contributors

27.7 KB
Raw Blame

Endpoint reference

Table of contents

GET /api/providers

List provider connections

curl http://localhost:20128/api/providers \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers

Create provider connection

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

GET /api/providers/{id}

Get provider connection

curl http://localhost:20128/api/providers/{id} \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

PATCH /api/providers/{id}

Update provider connection

curl -X PATCH http://localhost:20128/api/providers/{id} \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

DELETE /api/providers/{id}

Delete provider connection

curl -X DELETE http://localhost:20128/api/providers/{id} \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/{id}/test

Test provider connection

curl -X POST http://localhost:20128/api/providers/{id}/test \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/{id}/test-message

Read an account's saved test model and the global test message

Requires management authentication. Returns modelId and prompt without credentials.

curl http://localhost:20128/api/providers/{id}/test-message \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/{id}/test-message

Send one real test message through the selected account

Requires management authentication. Uses the account's saved model and the global connectionTestPrompt setting (default: What is 1 + 1? Reply with only the number.). The prompt is configurable through PATCH /api/settings and limited to 500 characters. This manual request bypasses the response cache, uses only this connection and never falls back to another account. It consumes quota; usage-window behavior is determined by the provider. Saving settings does not schedule requests.

curl -X POST http://localhost:20128/api/providers/{id}/test-message \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

PUT /api/providers/{id}/test-message

Save the chat model used by this account's test-message button

Requires management authentication. Saving never sends an inference request.

curl -X PUT http://localhost:20128/api/providers/{id}/test-message \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/{id}/models

List models for a provider

curl http://localhost:20128/api/providers/{id}/models \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

GET /api/providers/cursor/agent-availability

Check cursor-agent availability

Credential-free, informational check for whether cursor-agent is installed and authenticated on this host — backs the dashboard's dismissible install-nudge banner. Returns only cursorAgentAvailable (boolean); never tokens or machineId.

curl http://localhost:20128/api/providers/cursor/agent-availability \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/test-batch

Test multiple providers at once

curl -X POST http://localhost:20128/api/providers/test-batch \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/validate

Validate provider credentials

Validates provider credentials over HTTP. The devin CLI-spawn fallback is call-site gated on the trusted peer-locality header (loopback/LAN only, Hard Rules #15/#17, audit #15159 S-01, #15766 shape); the route itself is management-auth remote-reachable.

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

GET /api/providers/client

Get client-side provider info

curl http://localhost:20128/api/providers/client \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/agy-auth/import

Import an Antigravity CLI (agy) token file as an agy connection

curl -X POST http://localhost:20128/api/providers/agy-auth/import \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/agy-auth/import-bulk

Bulk-import multiple Antigravity CLI (agy) token files (up to 50)

curl -X POST http://localhost:20128/api/providers/agy-auth/import-bulk \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/agy-auth/zip-extract

Extract .json token files from an uploaded ZIP for agy bulk import

curl -X POST http://localhost:20128/api/providers/agy-auth/zip-extract \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/agy-auth/apply-local

Auto-detect and import the local Antigravity CLI (agy) login from disk

curl -X POST http://localhost:20128/api/providers/agy-auth/apply-local \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/provider-nodes

List provider nodes

curl http://localhost:20128/api/provider-nodes \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/provider-nodes

Create provider node

Optional providerIdSuffix (letters, digits, -, _, .; max 64; must start with a letter or digit) replaces the random UUID in the generated node id (openai-compatible-<apiType>-<suffix>, anthropic-compatible-<suffix>, anthropic-compatible-cc-<suffix>). Blank keeps the UUID.

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

PATCH /api/provider-nodes/{id}

Update provider node

curl -X PATCH http://localhost:20128/api/provider-nodes/{id} \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

DELETE /api/provider-nodes/{id}

Delete provider node

curl -X DELETE http://localhost:20128/api/provider-nodes/{id} \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/provider-nodes/validate

Validate a provider node

curl -X POST http://localhost:20128/api/provider-nodes/validate \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/provider-models

List provider models

With a provider query parameter, includes modelOutputOverrides for manual output-token caps, including synced models without a custom-model row.

curl http://localhost:20128/api/provider-models \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

PUT /api/provider-models

Update model metadata or per-model overrides

Requires management authentication. maxOutputTokenOverride sets a manual max_output_tokens capability without creating a custom-model row when it is the only change. A null value clears that override. Existing metadata fields remain available on this operation.

curl -X PUT http://localhost:20128/api/provider-models \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/provider-models/validate-and-add

Validate and add a custom chat model on one exact connection

Always requires management authentication and explicit inference consent. Runs bounded generation, streamed synthetic tool-call and continuation proofs through the chat core; no real tool is executed. Configuration changes, alternate connections, retries and proxy executor fallback fail closed. Only after all proofs pass is a previously absent custom model inserted and read back atomically. Every response is Cache-Control no-store. Requests can incur upstream charges. The validation receipt is informational, not redeemable. Initial strict support is limited to native Base/Default execution for OpenAI and canonical OpenAI-compatible nodes using a single Bearer credential and an exact JSON model field. Specialized executors and other providers are unsupported; session pools, extra-key rotation, HTTP redirects and credential refresh are refused. Active runtime plugins also fail closed; plugin policies are not silently skipped.

curl -X POST http://localhost:20128/api/provider-models/validate-and-add \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/{id}/cc-alias

GET providers › › cc alias

curl http://localhost:20128/api/providers/{id}/cc-alias \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

PUT /api/providers/{id}/cc-alias

PUT providers › › cc alias

curl -X PUT http://localhost:20128/api/providers/{id}/cc-alias \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/{id}/chatgpt-web-codex-doctor

GET providers › › chatgpt web codex doctor

curl http://localhost:20128/api/providers/{id}/chatgpt-web-codex-doctor \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/{id}/claude-auth/apply-local

POST providers › › claude auth › apply local

curl -X POST http://localhost:20128/api/providers/{id}/claude-auth/apply-local \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/{id}/claude-auth/export

POST providers › › claude auth › export

curl -X POST http://localhost:20128/api/providers/{id}/claude-auth/export \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/{id}/codex-auth/apply-local

POST providers › › codex auth › apply local

curl -X POST http://localhost:20128/api/providers/{id}/codex-auth/apply-local \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/{id}/codex-auth/export

POST providers › › codex auth › export

curl -X POST http://localhost:20128/api/providers/{id}/codex-auth/export \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/{id}/interception-rules

GET providers › › interception rules

curl http://localhost:20128/api/providers/{id}/interception-rules \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

PUT /api/providers/{id}/interception-rules

PUT providers › › interception rules

curl -X PUT http://localhost:20128/api/providers/{id}/interception-rules \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

DELETE /api/providers/{id}/interception-rules

DELETE providers › › interception rules

curl -X DELETE http://localhost:20128/api/providers/{id}/interception-rules \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/{id}/login

POST providers › › login

curl -X POST http://localhost:20128/api/providers/{id}/login \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/{id}/param-filters

GET providers › › param filters

curl http://localhost:20128/api/providers/{id}/param-filters \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

PUT /api/providers/{id}/param-filters

PUT providers › › param filters

curl -X PUT http://localhost:20128/api/providers/{id}/param-filters \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

DELETE /api/providers/{id}/param-filters

DELETE providers › › param filters

curl -X DELETE http://localhost:20128/api/providers/{id}/param-filters \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/{id}/refresh

POST providers › › refresh

curl -X POST http://localhost:20128/api/providers/{id}/refresh \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/{id}/refresh-cursor

POST providers › › refresh cursor

curl -X POST http://localhost:20128/api/providers/{id}/refresh-cursor \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/{id}/refresh-token

POST providers › › refresh token

curl -X POST http://localhost:20128/api/providers/{id}/refresh-token \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/{id}/sync-models

POST providers › › sync models

curl -X POST http://localhost:20128/api/providers/{id}/sync-models \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/bulk

POST providers › bulk

The devin CLI-spawn fallback (webProvidersB.ts) is call-site gated on the trusted peer-locality header — loopback/LAN only (Hard Rules #15/#17, audit #15159 S-01, #15766 shape); the route is management-auth remote-reachable.

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

POST /api/providers/bulk-web-session

POST providers › bulk web session

curl -X POST http://localhost:20128/api/providers/bulk-web-session \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/claude-auth/import

POST providers › claude auth › import

curl -X POST http://localhost:20128/api/providers/claude-auth/import \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/claude-auth/import-bulk

POST providers › claude auth › import bulk

curl -X POST http://localhost:20128/api/providers/claude-auth/import-bulk \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/claude-auth/zip-extract

POST providers › claude auth › zip extract

curl -X POST http://localhost:20128/api/providers/claude-auth/zip-extract \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/codex-auth/import

POST providers › codex auth › import

curl -X POST http://localhost:20128/api/providers/codex-auth/import \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/codex-auth/import-bulk

POST providers › codex auth › import bulk

curl -X POST http://localhost:20128/api/providers/codex-auth/import-bulk \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/codex-auth/zip-extract

POST providers › codex auth › zip extract

curl -X POST http://localhost:20128/api/providers/codex-auth/zip-extract \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/command-code/auth/apply

POST providers › command code › auth › apply

curl -X POST http://localhost:20128/api/providers/command-code/auth/apply \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/command-code/auth/callback

POST providers › command code › auth › callback

curl -X POST http://localhost:20128/api/providers/command-code/auth/callback \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/command-code/auth/start

POST providers › command code › auth › start

curl -X POST http://localhost:20128/api/providers/command-code/auth/start \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/command-code/auth/status

GET providers › command code › auth › status

curl http://localhost:20128/api/providers/command-code/auth/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/command-code/auth/status

POST providers › command code › auth › status

curl -X POST http://localhost:20128/api/providers/command-code/auth/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/expiration

GET providers › expiration

curl http://localhost:20128/api/providers/expiration \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

GET /api/providers/free-onboarding

GET providers › free onboarding

curl http://localhost:20128/api/providers/free-onboarding \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/free-onboarding

POST providers › free onboarding

curl -X POST http://localhost:20128/api/providers/free-onboarding \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/health-autopilot

GET providers › health autopilot

curl http://localhost:20128/api/providers/health-autopilot \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/health-autopilot/actions

POST providers › health autopilot › actions

curl -X POST http://localhost:20128/api/providers/health-autopilot/actions \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/health-matrix

GET providers › health matrix

curl http://localhost:20128/api/providers/health-matrix \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/import

POST providers › import

The devin CLI-spawn fallback (webProvidersB.ts) is call-site gated on the trusted peer-locality header — loopback/LAN only (Hard Rules #15/#17, audit #15159 S-01, #15766 shape); the route is management-auth remote-reachable.

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

GET /api/providers/openrouter-stats

GET providers › openrouter stats

curl http://localhost:20128/api/providers/openrouter-stats \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

GET /api/providers/quota-windows

GET providers › quota windows

curl http://localhost:20128/api/providers/quota-windows \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/volcengine-plan/connect

POST providers › volcengine plan › connect

curl -X POST http://localhost:20128/api/providers/volcengine-plan/connect \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/volcengine-plan/connect/{sessionId}/cancel

POST providers › volcengine plan › connect › › cancel

curl -X POST http://localhost:20128/api/providers/volcengine-plan/connect/{sessionId}/cancel \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/volcengine-plan/connect/{sessionId}/code

POST providers › volcengine plan › connect › › code

curl -X POST http://localhost:20128/api/providers/volcengine-plan/connect/{sessionId}/code \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/volcengine-plan/connect/{sessionId}/identity

POST providers › volcengine plan › connect › › identity

curl -X POST http://localhost:20128/api/providers/volcengine-plan/connect/{sessionId}/identity \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/volcengine-plan/connect/{sessionId}/resend

POST providers › volcengine plan › connect › › resend

curl -X POST http://localhost:20128/api/providers/volcengine-plan/connect/{sessionId}/resend \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

GET /api/providers/volcengine-plan/connect/{sessionId}/status

GET providers › volcengine plan › connect › › status

curl http://localhost:20128/api/providers/volcengine-plan/connect/{sessionId}/status \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

GET /api/providers/web-session-contract

GET providers › web session contract

curl http://localhost:20128/api/providers/web-session-contract \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN"

POST /api/providers/zed/discover

POST providers › zed › discover

curl -X POST http://localhost:20128/api/providers/zed/discover \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/zed/import

POST providers › zed › import

curl -X POST http://localhost:20128/api/providers/zed/import \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

POST /api/providers/zed/manual-import

POST providers › zed › manual import

curl -X POST http://localhost:20128/api/providers/zed/manual-import \
  -H "Authorization: Bearer $OMNIROUTE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'