# 01Router — 网关 API 文档 > 一个 REST API 统一调用 fal.ai、Replicate、WaveSpeedAI、KIE AI、APIMart、EvoLink、AtlasCloud、Vercel AI Gateway、OpenRouter 上的图片、视频、音频与对话模型。 Base URL: https://01router.com/api/v1 Documentation: https://01router.com/zh/docs Index: https://01router.com/docs/llms.txt?locale=zh Full reference: https://01router.com/docs/llms-full.txt?locale=zh 生成、任务记录、取消与对话需要密钥;模型目录、提示词和报价公开可读。请将 API Key 保存在服务端。 响应仅用于说明结构;ID、用量、价格和结果以实际请求为准。 ## 模型文档 Source: https://01router.com/zh/docs/models/gpt-5.6-terra # GPT-5.6 Terra API OpenAI GPT-5.6 Terra: mid GPT-5.6 tier balancing quality and cost. `POST /api/v1/chat/completions` 需要 Bearer API Key ## 输入参数 | Field | Type | Required | Description | Constraints | | --- | --- | --- | --- | --- | | model | string | yes | 模型目录中的 slug;项目密钥也可使用项目自定义的模型 slug。 | options: [ "gpt-5.6-terra" ] | | messages | object[] | yes | 非空消息数组,每项包含 role 和 content;content 可包含模型支持的多模态内容。 | | | provider | string | no | 可选供应商 slug。不传时自动路由;项目配置可能固定供应商。 | | | project | string | no | 可选项目 ID,使用该项目公开的模型目录和路由配置。 | | | stream | boolean | no | 默认 false;true 返回 text/event-stream 数据流,以 data: [DONE] 结束。 | default: false | | max_tokens | integer | no | 正整数,默认 4096,不可与 max_completion_tokens 同时传入。 | default: 4096; min: 1 | | max_completion_tokens | integer | no | 正整数,默认 4096,不可与 max_completion_tokens 同时传入。 | | | temperature | number | no | OpenAI 兼容的采样、工具调用与结构化输出能力取决于模型和供应商。仅支持 n = 1。 | | | tools | object[] | no | OpenAI 兼容的采样、工具调用与结构化输出能力取决于模型和供应商。仅支持 n = 1。 | | | response_format | object | no | OpenAI 兼容的采样、工具调用与结构化输出能力取决于模型和供应商。仅支持 n = 1。 | | ## 输出字段 | Field | Type | Required | Description | Constraints | | --- | --- | --- | --- | --- | | id | string | — | 创建任务返回的生成 ID。 | | | object | string | — | chat.completion / chat.completion.chunk | | | model | string | — | 模型目录中的 slug;项目密钥也可使用项目自定义的模型 slug。 | | | choices | array | — | 回答列表。非流式使用 choices[].message,流式数据块使用 choices[].delta。 | | | usage | object | — | 包含 prompt_tokens、completion_tokens、total_tokens。流式响应在供应商提供时包含用量。 | | ## cURL ```bash curl 'https://01router.com/api/v1/chat/completions' \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-5.6-terra", "messages": [ { "role": "user", "content": "Hello!" } ], "max_tokens": 512, "stream": false }' ``` ## 200 · application/json ```json { "id": "chat_example", "object": "chat.completion", "model": "gpt-5.6-terra", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello!" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 8, "completion_tokens": 2, "total_tokens": 10 } } ``` ## SSE · stream: true ```text data: {"id":"chat_example","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"Hello!"},"finish_reason":null}]} data: [DONE] ``` ## 使用说明 - OpenAI 兼容的采样、工具调用与结构化输出能力取决于模型和供应商。仅支持 n = 1。 ## 此模型使用的接口 - [POST /api/v1/chat/completions](https://01router.com/docs/llms-full.txt?locale=zh§ion=chat): 对话补全 - [GET /api/v1/models/{slug}](https://01router.com/docs/llms-full.txt?locale=zh§ion=model-detail): 查询单个模型 调用 /generations 和 /quote 时,将以下参数放入 input;调用 /images/generations 时放在顶层;对话参数放在 /chat/completions 顶层。 选择供应商可查看其实际参数限制。自动路由会选择支持所传参数的供应商。示例包含默认值和必填输入,请将示例媒体地址替换为可访问的文件。 ### Provider parameter schemas ```json [ { "provider": "replicate", "params": [] }, { "provider": "wavespeed", "params": [] }, { "provider": "kie", "params": [] }, { "provider": "apimart", "params": [] }, { "provider": "evolink", "params": [] }, { "provider": "atlascloud", "params": [] }, { "provider": "vercel", "params": [] }, { "provider": "openrouter", "params": [] } ] ``` ---