Manage provider connections, API keys, OAuth flows, and connection tests via the REST API. List, add, update, remove, and test AI provider integrations across O
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-omni-providers-3f9bebe99ebc ,按照其中的说明把「omni-providers」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Manage provider connections, API keys, OAuth flows, and connection tests via the REST API. List, add, update, remove, and test AI provider integrations across OmniRoute's 327-provider catalog.
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.
List provider connections
curl https://localhost:20128/api/providers \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
Create provider connection
curl -X POST https://localhost:20128/api/providers \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Get provider connection
curl https://localhost:20128/api/providers/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
Update provider connection
curl -X PATCH https://localhost:20128/api/providers/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Delete provider connection
curl -X DELETE https://localhost:20128/api/providers/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
Test provider connection
curl -X POST https://localhost:20128/api/providers/{id}/test \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
List models for a provider
curl https://localhost:20128/api/providers/{id}/models \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
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 https://localhost:20128/api/providers/cursor/agent-availability \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
Test multiple providers at once
curl -X POST https://localhost:20128/api/providers/test-batch \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Validate provider credentials
curl -X POST https://localhost:20128/api/providers/validate \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Get client-side provider info
curl https://localhost:20128/api/providers/client \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
Import an Antigravity CLI (agy) token file as an agy connection
curl -X POST https://localhost:20128/api/providers/agy-auth/import \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Bulk-import multiple Antigravity CLI (agy) token files (up to 50)
curl -X POST https://localhost:20128/api/providers/agy-auth/import-bulk \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Extract .json token files from an uploaded ZIP for agy bulk import
curl -X POST https://localhost:20128/api/providers/agy-auth/zip-extract \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Auto-detect and import the local Antigravity CLI (agy) login from disk
curl -X POST https://localhost:20128/api/providers/agy-auth/apply-local \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
List provider nodes
curl https://localhost:20128/api/provider-nodes \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
Create provider node
curl -X POST https://localhost:20128/api/provider-nodes \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Update provider node
curl -X PATCH https://localhost:20128/api/provider-nodes/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Delete provider node
curl -X DELETE https://localhost:20128/api/provider-nodes/{id} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
Validate a provider node
curl -X POST https://localhost:20128/api/provider-nodes/validate \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
List provider models
curl https://localhost:20128/api/provider-models \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
GET providers › › cc alias
curl https://localhost:20128/api/providers/{id}/cc-alias \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
PUT providers › › cc alias
curl -X PUT https://localhost:20128/api/providers/{id}/cc-alias \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET providers › › chatgpt web codex doctor
curl https://localhost:20128/api/providers/{id}/chatgpt-web-codex-doctor \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST providers › › claude auth › apply local
curl -X POST https://localhost:20128/api/providers/{id}/claude-auth/apply-local \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › › claude auth › export
curl -X POST https://localhost:20128/api/providers/{id}/claude-auth/export \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › › codex auth › apply local
curl -X POST https://localhost:20128/api/providers/{id}/codex-auth/apply-local \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › › codex auth › export
curl -X POST https://localhost:20128/api/providers/{id}/codex-auth/export \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET providers › › interception rules
curl https://localhost:20128/api/providers/{id}/interception-rules \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
PUT providers › › interception rules
curl -X PUT https://localhost:20128/api/providers/{id}/interception-rules \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
DELETE providers › › interception rules
curl -X DELETE https://localhost:20128/api/providers/{id}/interception-rules \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST providers › › login
curl -X POST https://localhost:20128/api/providers/{id}/login \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET providers › › param filters
curl https://localhost:20128/api/providers/{id}/param-filters \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
PUT providers › › param filters
curl -X PUT https://localhost:20128/api/providers/{id}/param-filters \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
DELETE providers › › param filters
curl -X DELETE https://localhost:20128/api/providers/{id}/param-filters \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST providers › › refresh
curl -X POST https://localhost:20128/api/providers/{id}/refresh \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › › refresh cursor
curl -X POST https://localhost:20128/api/providers/{id}/refresh-cursor \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › › refresh token
curl -X POST https://localhost:20128/api/providers/{id}/refresh-token \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › › sync models
curl -X POST https://localhost:20128/api/providers/{id}/sync-models \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › bulk
curl -X POST https://localhost:20128/api/providers/bulk \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › bulk web session
curl -X POST https://localhost:20128/api/providers/bulk-web-session \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › claude auth › import
curl -X POST https://localhost:20128/api/providers/claude-auth/import \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › claude auth › import bulk
curl -X POST https://localhost:20128/api/providers/claude-auth/import-bulk \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › claude auth › zip extract
curl -X POST https://localhost:20128/api/providers/claude-auth/zip-extract \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › codex auth › import
curl -X POST https://localhost:20128/api/providers/codex-auth/import \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › codex auth › import bulk
curl -X POST https://localhost:20128/api/providers/codex-auth/import-bulk \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › codex auth › zip extract
curl -X POST https://localhost:20128/api/providers/codex-auth/zip-extract \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › command code › auth › apply
curl -X POST https://localhost:20128/api/providers/command-code/auth/apply \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › command code › auth › callback
curl -X POST https://localhost:20128/api/providers/command-code/auth/callback \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › command code › auth › start
curl -X POST https://localhost:20128/api/providers/command-code/auth/start \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET providers › command code › auth › status
curl https://localhost:20128/api/providers/command-code/auth/status \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST providers › command code › auth › status
curl -X POST https://localhost:20128/api/providers/command-code/auth/status \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET providers › expiration
curl https://localhost:20128/api/providers/expiration \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
GET providers › free onboarding
curl https://localhost:20128/api/providers/free-onboarding \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST providers › free onboarding
curl -X POST https://localhost:20128/api/providers/free-onboarding \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET providers › health autopilot
curl https://localhost:20128/api/providers/health-autopilot \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST providers › health autopilot › actions
curl -X POST https://localhost:20128/api/providers/health-autopilot/actions \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET providers › health matrix
curl https://localhost:20128/api/providers/health-matrix \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST providers › import
curl -X POST https://localhost:20128/api/providers/import \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET providers › openrouter stats
curl https://localhost:20128/api/providers/openrouter-stats \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
GET providers › quota windows
curl https://localhost:20128/api/providers/quota-windows \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST providers › volcengine plan › connect
curl -X POST https://localhost:20128/api/providers/volcengine-plan/connect \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › volcengine plan › connect › › cancel
curl -X POST https://localhost:20128/api/providers/volcengine-plan/connect/{sessionId}/cancel \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › volcengine plan › connect › › code
curl -X POST https://localhost:20128/api/providers/volcengine-plan/connect/{sessionId}/code \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › volcengine plan › connect › › identity
curl -X POST https://localhost:20128/api/providers/volcengine-plan/connect/{sessionId}/identity \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › volcengine plan › connect › › resend
curl -X POST https://localhost:20128/api/providers/volcengine-plan/connect/{sessionId}/resend \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
GET providers › volcengine plan › connect › › status
curl https://localhost:20128/api/providers/volcengine-plan/connect/{sessionId}/status \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
GET providers › web session contract
curl https://localhost:20128/api/providers/web-session-contract \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
POST providers › zed › discover
curl -X POST https://localhost:20128/api/providers/zed/discover \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › zed › import
curl -X POST https://localhost:20128/api/providers/zed/import \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
POST providers › zed › manual import
curl -X POST https://localhost:20128/api/providers/zed/manual-import \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
See the full OpenAPI specification at GET /api/openapi/spec or docs/openapi.yaml for detailed request/response schemas.
Rotate / refresh OAuth tokens or re-validate credentials for a provider connection. Useful after token expiration or when credentials need to be renewed without deleting the connection.
curl -X POST https://localhost:20128/api/providers/{id}/refresh \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Retrieve aggregated usage and performance metrics for all provider connections (request counts, error rates, latency percentiles, token usage). Used by dashboards and Auto-Combo scoring.
curl https://localhost:20128/api/provider-metrics \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"
Response example:
{
"providers": [
{
"id": "my-openai",
"requestCount": 1240,
"errorRate": 0.02,
"p50LatencyMs": 340,
"p99LatencyMs": 1200,
"tokensIn": 500000,
"tokensOut": 250000
}
]
}
Returns a health-matrix view of all providers with per-connection status, circuit-breaker state, and cooldown expiry. Useful for debugging routing decisions.
curl https://localhost:20128/api/providers/health-matrix \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"