omni-models
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->
<!-- generated by src/lib/agentSkills/generator.ts; manual edits will be overwritten -->
Overview
概述
Query available AI models across all configured providers. List models, resolve model aliases, and browse the full model catalog including provider-specific variants.
查询所有已配置提供商中可用的 AI 模型。列出模型、解析模型别名,并浏览包括提供商专属变体在内的完整模型目录。
Authentication
身份验证
All requests require a valid Bearer token or session cookie. Obtain a token via or configure for local development.
POST /api/auth/loginREQUIRE_API_KEY=false所有请求都需要有效的 Bearer token 或 session cookie。可通过 获取 token,或在本地开发时配置 。
POST /api/auth/loginREQUIRE_API_KEY=falseEndpoints
端点
GET /api/v1/models
GET /api/v1/models
List available models
Returns all models available across configured providers. The discovery filters (, , , ) are opt-in: without them the response is unchanged. They narrow the caller's own (key-filtered) catalog and run before / paging.
capabilitymin_contextkindqlimitafterbash
curl http://localhost:20128/api/v1/models \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"列出可用模型
返回所有已配置提供商中可用的模型。发现筛选器(、、、)均为可选项:不使用这些筛选器时,响应保持不变。它们用于缩小调用者自身(按密钥过滤)的模型目录范围,并在 / 分页之前执行。
capabilitymin_contextkindqlimitafterbash
curl http://localhost:20128/api/v1/models \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"POST /api/v1/models/query
POST /api/v1/models/query
Query a model shortlist
Filtered shortlist over the same catalog as (same auth and per-key visibility). Results are ordered by , then , and capped by (default 20, maximum 100).
GET /v1/modelsowned_byidlimitbash
curl -X POST http://localhost:20128/api/v1/models/query \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'查询模型候选列表
基于与 相同的模型目录返回经过筛选的候选列表(采用相同的身份验证和按密钥可见性机制)。结果先按 排序,再按 排序,数量上限由 控制(默认 20,最大 100)。
GET /v1/modelsowned_byidlimitbash
curl -X POST http://localhost:20128/api/v1/models/query \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'GET /api/models
GET /api/models
List models (management)
bash
curl http://localhost:20128/api/models \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"列出模型(管理)
bash
curl http://localhost:20128/api/models \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"POST /api/models/alias
POST /api/models/alias
Create or update a model alias
bash
curl -X POST http://localhost:20128/api/models/alias \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'创建或更新模型别名
bash
curl -X POST http://localhost:20128/api/models/alias \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'GET /api/models/catalog
GET /api/models/catalog
Get full model catalog
bash
curl http://localhost:20128/api/models/catalog \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"获取完整模型目录
bash
curl http://localhost:20128/api/models/catalog \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"GET /api/models/openrouter-catalog
GET /api/models/openrouter-catalog
GET models › openrouter catalog
bash
curl http://localhost:20128/api/models/openrouter-catalog \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"GET models › OpenRouter 目录
bash
curl http://localhost:20128/api/models/openrouter-catalog \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"POST /api/models/test
POST /api/models/test
POST models › test
bash
curl -X POST http://localhost:20128/api/models/test \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'POST models › 测试
bash
curl -X POST http://localhost:20128/api/models/test \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'POST /api/models/test-all
POST /api/models/test-all
POST models › test all
bash
curl -X POST http://localhost:20128/api/models/test-all \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'POST models › 测试全部模型
bash
curl -X POST http://localhost:20128/api/models/test-all \
-H "Authorization: Bearer $OMNIROUTE_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'GET /api/v1/models/{model}
GET /api/v1/models/{model}
GET models › <model>
bash
curl http://localhost:20128/api/v1/models/{model} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"GET models › <model>
bash
curl http://localhost:20128/api/v1/models/{model} \
-H "Authorization: Bearer $OMNIROUTE_TOKEN"Payloads
载荷
See the full OpenAPI specification at or for detailed request/response schemas.
GET /api/openapi/specdocs/openapi.yaml有关详细的请求/响应 schema,请参阅 处的完整 OpenAPI 规范或 。
GET /api/openapi/specdocs/openapi.yaml