1. chat格式
DeepRouter API文档
  • API聚合平台服务介绍
  • 快速开始(新手指南)
  • 令牌分组(模型ID及价格)
  • 在线调试说明
  • API 接口调用地址(额度查询)
  • 各种插件/软件使用教程
    • CC-Switch 使用教程
    • Claude Code 安装配置教程
    • Claude Code 桌面版接入API教程
    • Claude Code 原生安装教程
    • Codex CLI 配置教程
    • Codex App 桌面版安装与配置教程
    • TRAE Work 第三方API配置教程
    • WorkBuddy 第三方API配置教程
    • OpenClaw 配置接入 API 教程
    • Gemini CLI 配置使用教程
    • CherryStudio(Nano Banana Pro 绘画)
    • Hermes 安装及 API 配置教程
    • OpenCode 接入配置教程
    • N8N 工作流使用中转API 教程
    • CherryStudio调用cluade MCP
    • dify添加模型
    • cline 配置教程
    • aider 配置教程
    • lobechat 设置教程
    • ChatBox(推荐使用)
    • 开源gpt_academic
    • nextchat 设置教程
    • zotero gpt 配置方法
    • CLAUDE DEV 配置教程
    • 沉浸式翻译 设置gpt翻译
    • 浏览器插件ChatGPT Sidebar
    • chatgpt-on-wechat 配置教程
    • chatgpt GPT Academic 学术优化配置gpt教程
  • 聊天对话
    • ChatGPT聊天(Chat)
      • 创建聊天补全
      • 创建聊天补全 (非流)
      • 创建聊天识图 (流式)
      • 创建聊天识图 (流式) best64
      • 创建聊天识图 (非流)
      • 创建聊天创作图 (非流)
      • 官方Function calling调用
      • 官方N测试
      • 创建聊天函数调用
      • 创建结构化输出
      • 控制推理模型努力程度
      • 创建聊天补全 qwen-mt-turbo
      • 创建聊天补全 deepseek v3.1思考程度 (流式)
      • deepseek-ocr 识别
      • 创建聊天
      • 列出模型
    • ChatGPT音频(Audio)
      • GPT Audio 1.5 音频对话
      • 音频转文字 gpt-4o-mini-transcribe
      • 音频转文字 gpt-4o-transcribe
      • 创建语音 gpt-4o-mini-tts
      • 创建翻译 (不支持)
    • ChatGPT嵌入(Embeddings)
      • 创建嵌入
    • 聊天(Responses)
      • 创建模型响应
      • 创建函数调用
      • 创建模型响应(流式返回)
      • 创建模型响应 (控制思考长度)
      • 创建网络搜索
      • 创建模型响应 gpt-5.5 启用思考
      • 创建函数调用 Copy
      • gpt 上下文压缩
    • Gemini
      • 原生格式
        • 文本生成
        • 文本生成-流
        • 文本生成+思考-流
        • 图片生成
        • 图片生成 gemini-2.5-flash-image
        • 图片生成 gemini-2.5-flash-image 控制宽高比
        • 图片生成 gemini-3-pro-image-preview 控制宽高比 +清晰度
        • 图片编辑
        • 图片理解
        • 格式化输出
        • 函数调用
        • 文档理解
        • URL context [原生格式]
        • 代码执行
        • google search
        • 视频理解
        • URL context
        • 音频理解
        • Embeddings
        • TTS 文本转语音
        • 文本生成 gemini-3-pro-preview:generateContent
        • Imagen 生成图片
        • gemini-tts文本转语音
        • 文本嵌入
        • gemini-3.1-flash-image-preview 图片生成/编辑
      • chat兼容格式
        • gemini图片创作接口 [chat兼容格式]
        • 聊天接口 [chat兼容格式]
        • 聊天接口-思考1 [chat兼容格式]
        • 聊天接口-思考2 [chat兼容格式]
        • 识图接口 [chat兼容格式]
        • 聊天+读取文件接口 [chat兼容格式]
        • 文本嵌入 [chat兼容格式]
    • Claude
      • 原生格式
        • 创建格式化输出
        • 联网搜索
      • 创建聊天补全 (流式)
      • 创建思考聊天
      • 创建聊天补全 (流式) [原生格式]
      • 创建函数调用 (流式) [原生格式]
      • 创建思考聊天 [原生格式]
      • PDF支持 [原生格式]
      • PDF支持 [原生格式] base64格式
      • 创建聊天补全 (非流)
      • 创建聊天识图 (流式)
      • 创建聊天识图 (非流)
  • 图像生成
    • GPT-Image
      • 创建 gpt-image-1
      • 编辑 image
      • 蒙版 gpt-image-1
      • 创建 gpt-image-1.5
      • 编辑 gpt-image-1.5
      • 蒙版 gpt-image-1.5
      • 编辑 gpt-image-2
      • 创建 gpt-image-2
    • Midjourney
      • 上传图片
      • 提交Imagine任务
      • 根据任务ID 查询任务状态
      • 根据ID列表查询任务
      • 获取任务图片的seed
      • 执行Action动作
      • 提交Blend任务
      • 提交Describe任务
      • 提交Modal
    • DALL·E 3
      • 创建 DALL·E 3
    • FLUX
      • gpt 兼容格式
        • 创建/编辑 image
        • Flux编辑(OpenAI dall-e-3格式)
      • Replicate 官方格式
        • 创建任务 black-forest-labs/flux-kontext-dev
        • 查询任务
    • Grok
      • 创建 Image
      • 编辑 image
    • Doubao
      • 创建图片
      • doubao-seededit-3-0-i2i-250628
      • doubao-seedream-4-0-250828-文生图
      • doubao-seedream-4-0-250828-图生图
      • doubao-seedream-4-0-250828-多图生图
      • doubao-seedream-4-5-251128 文生图(纯文本输入单图输出)
      • doubao-seedream-4-5-251128 图文生图(单图输入单图输出)
      • doubao-seedream-4-5-251128 多图融合(多图输入单图输出)
      • doubao-seedream-4-5-251128 组图输出(多图输出)
      • doubao-seedream-4-5-251128 单张图生组图
      • doubao-seedream-4-5-251128 多参考图生组图
  • 视频生成
    • Veo
      • 视频统一格式
        • 创建视频
        • 创建视频,带图片
        • 查询任务
        • 创建视频(参考图)
      • OpenAI 视频格式
        • openai 创建视频,带图片
        • openai 查询任务
        • openai 下载视频
      • 3.1原生格式
        • 视频生成 veo-3.1-generate-preview
        • 查询任务
        • 视频生成 veo-3.1-fast-generate-preview
    • Doubao
      • 创建任务
      • 查询单个任务
      • 查询视频生成任务列表-默认
      • 查询视频生成任务列表-搜索多个任务 ID
      • seedance-1-5-pro-首尾帧
      • seedance-1-5-pro
      • Doubao Seedance 2.0 创建视频任务
      • doubao-2.0 查询视频生成任务 API
      • doubao-2.0 查询视频生成任务列表
    • sora
      • 统一视频格式
        • 查询任务
        • 创建视频,带图片 sora-2
        • 创建视频 sora-2
        • 创建视频 sora-2-pro
        • 创建视频 (带 Character)
        • 创建视频,带图片 sora-2 Copy
      • chat格式
        • 创建视频
          POST
        • 创建视频, 带图片
          POST
        • 连续修改生成视频
          POST
      • OpenAI官方视频格式
        • openai 创建视频,带图片
        • 创建一个来自上传视频的角色
        • 使用故事板创建视频
        • openai 创建视频,带图片 私有模式
        • openai 创建视频(带Character)
        • openai 编辑视频
        • openai 下载视频
        • openai 查询任务
      • 创建角色
        POST
    • grok
      • 视频统一格式
        • 创建视频
        • 查询任务
        • 创建视频
        • 查询任务
        • 扩展视频
      • OpenAI视频格式
        • openai 创建视频,图生,视频生视频
        • openai 创建视频,图生
        • 查询任务
      • 官方格式
        • 创建视频
        • 编辑视频
        • 查询视频
  • 系统管理
    • 获取令牌列表
    • 新增令牌
    • 获取令牌支持模型
    • 获取账号信息
    • 修改令牌
    • 搜索令牌
    • 获取令牌使用情况
    • 删除令牌
    • 批量修改令牌
  1. chat格式

创建视频

POST
/v1/chat/completions
给定一个提示,该模型将返回一个或多个预测的完成,并且还可以返回每个位置的替代标记的概率。
为提供的提示和参数创建完成
官方文档:https://platform.openai.com/docs/api-reference/chat/create

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数

Body 参数application/json

示例
{
  "model": "sora-2",
  "max_tokens": 1000,
  "messages": [
    {
      "role": "user",
      "content": "an astronaut golden retriever named Sora levitates around an intergalactic pup-themed space station with a tiny jet back that propels him. gorgeous specular lighting and comets fly through the sky, retro-future astro-themed music plays in the background. light glimmers off the dog's eyes. the dog initially propels towards the space station with the doors opening to let him in. the shot then changes. now inside the space station, many tennis balls are flying around in zero gravity. the dog's astronaut helmet opens up so he can grab one. 35mm film, the intricate details and texturing of the dog's hair are clearly visible and the light of the comets shimmers off the fur."
    }
  ],
  "stream": true
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://deeprouter.top/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "model": "sora-2",
  "max_tokens": 1000,
  "messages": [
    {
      "role": "user",
      "content": "an astronaut golden retriever named Sora levitates around an intergalactic pup-themed space station with a tiny jet back that propels him. gorgeous specular lighting and comets fly through the sky, retro-future astro-themed music plays in the background. light glimmers off the dog'\''s eyes. the dog initially propels towards the space station with the doors opening to let him in. the shot then changes. now inside the space station, many tennis balls are flying around in zero gravity. the dog'\''s astronaut helmet opens up so he can grab one. 35mm film, the intricate details and texturing of the dog'\''s hair are clearly visible and the light of the comets shimmers off the fur."
    }
  ],
  "stream": true
}'

返回响应

🟢200OK
application/json
Bodyapplication/json

示例
{
    "id": "chatcmpl-123",
    "object": "chat.completion",
    "created": 1677652288,
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "\n\nHello there, how may I assist you today?"
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 9,
        "completion_tokens": 12,
        "total_tokens": 21
    }
}
修改于 2026-07-17 10:01:31
上一页
创建视频,带图片 sora-2 Copy
下一页
创建视频, 带图片
Built with