Skip to Content

Models API

列出和查詢 OfoxAI 平台上所有可用的模型。回傳的資料遵循 OpenRouter 標準,包含模型的完整元資料:架構、定價、支援參數等。

Models API 是公開介面,無需 API Key 即可呼叫。關於回應中各欄位的詳細說明,請參閱 模型目錄 — Models API 標準

列出所有模型

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

請求範例

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

回應格式

{ "object": "list", "data": [ { "id": "anthropic/claude-sonnet-4.5", "object": "model", "created": 1759104000, "owned_by": "bedrock", "canonical_slug": "claude-sonnet-4-5-20250929", "name": "Claude Sonnet 4.5", "description": "Anthropic's balanced model with state-of-the-art performance...", "context_length": 200000, "architecture": { "modality": "text+image+file->text", "input_modalities": ["text", "image", "file"], "output_modalities": ["text"], "tokenizer": "claude", "instruct_type": null }, "pricing": { "prompt": "0.000003", "completion": "0.000015", "input_cache_read": "0.0000003", "input_cache_write_5m": "0.00000375", "input_cache_write_1h": "0.000006" }, "top_provider": { "context_length": 200000, "max_completion_tokens": 16384, "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 } ] }

回應欄位說明

欄位類型說明
idstring模型識別碼,如 "anthropic/claude-sonnet-4.5"
canonical_slugstring永久標識符,不會變更
namestring模型顯示名稱
creatednumber添加時間(Unix 時間戳)
descriptionstring模型能力描述
context_lengthnumber最大上下文窗口(token)
architectureobject輸入/輸出模態、分詞器資訊
pricingobject定價(美元/token)
top_providerobject供應商設定(上下文限制、最大輸出等)
supported_parametersstring[]支援的 API 參數

按供應商過濾模型

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

僅回傳指定供應商的模型列表。

路徑參數

參數類型說明
providerstring供應商標識,如 anthropicopenaigooglebailianvolcengine

請求範例

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

回應格式

回傳格式與列出所有模型一致,data 陣列僅包含指定供應商的模型。

取得模型詳情

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

路徑參數

參數類型說明
providerstring供應商標識,如 anthropic
model_idstring模型名稱,如 claude-sonnet-4.5

請求範例

Terminal
curl https://api.ofox.ai/v1/models/anthropic/claude-sonnet-4.5

回應格式

回傳單個 Model 物件,結構與列表介面中的物件一致。

Last updated on