Skip to Content
API 参考OpenAI 兼容协议Models

Models API

列出和查询 OfoxAI 平台上所有可用的模型。返回的数据遵循 OpenRouter 标准,包含模型的完整元数据:架构、定价、支持参数等。

Models API 是公开接口,无需 API Key 即可调用。关于响应中各字段的详细说明,请参阅 模型目录 — Models API 标准。

列出所有模型

GET https://api.ofox.io/v1/models

请求示例

Terminal
curl https://api.ofox.io/v1/models

响应格式

{ "object": "list", "data": [ { "id": "anthropic/claude-sonnet-5.5", "object": "model", "created": 1790553600, "owned_by": "bedrock", "canonical_slug": "claude-sonnet-5-5", "name": "Anthropic: Claude Sonnet 5.5", "description": "Claude Sonnet 5.5 is Anthropic's Sonnet-tier model, offering a balance of speed and intelligence for coding, reasoning, and agentic workloads. It supports text, image, and file inputs with text output, with a 1M-token context window and up to 128K output tokens, at a lower per-token price than Claude Opus 5.5.", "context_length": 1000000, "architecture": { "modality": "text+image+file->text", "input_modalities": [ "text", "image", "file" ], "output_modalities": [ "text" ], "tokenizer": "claude", "instruct_type": null }, "pricing": { "prompt": "0.000002", "completion": "0.00001", "input_cache_read": "0.0000002", "input_cache_write_5m": "0.0000025", "input_cache_write_1h": "0.000004", "web_search": "0.015" }, "top_provider": { "context_length": 1000000, "max_completion_tokens": 128000, "is_moderated": false }, "per_request_limits": null, "supported_parameters": [ "temperature", "top_p", "max_tokens", "stop", "tools", "tool_choice", "response_format", "reasoning" ], "default_parameters": null, "expiration_date": null, "is_deprecated": false, "supported_endpoints": [ "/v1/chat/completions", "/v1/responses" ], "aliases": [ "claude-sonnet-5-5", "claude-sonnet-5.5" ] } ] }

响应字段说明

字段类型说明
idstring模型标识符,如 "anthropic/claude-sonnet-5.5"
canonical_slugstring永久标识符,不会变更
namestring模型显示名称
creatednumber添加时间(Unix 时间戳)
descriptionstring模型能力描述
context_lengthnumber最大上下文窗口(token)
architectureobject输入/输出模态、分词器信息
pricingobject定价(美元/token)
top_providerobject供应商配置(上下文限制、最大输出等)
supported_parametersstring[]支持的 API 参数

按供应商过滤模型

GET https://api.ofox.io/v1/models/{provider}

仅返回指定供应商的模型列表。

路径参数

参数类型说明
providerstring供应商标识,如 anthropic、openai、google、qwen、volcengine

请求示例

Terminal
# 列出所有 Anthropic 模型 curl https://api.ofox.io/v1/models/anthropic # 列出所有 OpenAI 模型 curl https://api.ofox.io/v1/models/openai

响应格式

返回格式与列出所有模型一致,data 数组仅包含指定供应商的模型。

获取模型详情

GET https://api.ofox.io/v1/models/{provider}/{model_id}

路径参数

参数类型说明
providerstring供应商标识,如 anthropic
model_idstring模型名称,如 claude-sonnet-5.5

请求示例

Terminal
curl https://api.ofox.io/v1/models/anthropic/claude-sonnet-5.5

响应格式

返回单个 Model 对象,结构与列表接口中的对象一致。

最后更新于