聚合API对接文档
  1. ChatGPT聊天(Chat)
聚合API对接文档
  • 服务简介
  • 发出请求
  • 🎉Claude Code 安装使用教程【最新】
  • 快速上手
    • 上手指南
    • 免费AI聊天项目导航
    • 联系客服
  • 聊天(Chat)
    • 所有对话模型均兼容 OpenAI 格式
    • ChatGPT聊天(Chat)
      • 聊天完成对象
      • 聊天完成块对象
      • 创建绘画
        POST
      • Stable-Diffusion
        POST
      • 提交视频生成任务-chat格式
        POST
      • 获取令牌支持模型
        GET
      • 聊天接口-思考2 [chat兼容格式]
        POST
      • 识图接口 [chat兼容格式]
        POST
      • 聊天+读取文件接口 [chat兼容格式]
        POST
      • 官方Function calling调用
        POST
      • 官方N测试
        POST
      • 创建聊天函数调用 (只能非流)
        POST
      • 创建结构化输出
        POST
      • 控制推理模型努力程度
        POST
    • ChatGPT音频(Audio)
      • GPT-4O-audio
      • 创建语音
      • 创建转录
      • 创建翻译
    • ChatGPT自动补全(Completions)
      • 完成对象
      • 创建完成
    • ChatGPT嵌入(Embeddings)
      • 嵌入对象
      • 创建嵌入
    • Anthropic Claude 接口
      • 聊天完成对象
      • 聊天完成块对象
      • 创建聊天补全 (流式) [原生格式]
      • 创建聊天补全 (流式)
      • 创建聊天补全 (非流)
      • 创建聊天识图 (流式)
      • 创建聊天识图 (非流)
    • GPTs 对接
      • gpt-4-all(分析图片)
      • gpt-4-all(生成图片)
      • GPTs对话
    • 谷歌Gemini 接口
      • 原生格式
        • 聊天接口 [原生格式]
        • 聊天接口-流 [原生格式]
        • 聊天接口+思考-流 [原生格式]
        • 图片创作[原生格式]
        • 图片编辑 [原生格式] gemini-2.5-flash-image-preview
        • 图片编辑 [原生格式]
        • 图片理解 [原生格式]
        • 格式化输出 [原生格式]
        • 函数调用 [原生格式]
        • 文档理解 [原生格式]
        • 视频理解-base64 [原生格式]
        • 聊天接口 - 阅读网页 [原生格式] 开发中
        • 视频理解-url [原生格式] 开发中
        • Imagen 3 生成图片 [原生格式] 开发中
      • chat兼容格式
  • 聊天(Responses)
    • 创建模型响应
    • 创建模型响应(流式返回)
    • 创建模型响应 (控制思考长度)
    • 创建深度搜索 (巨贵,一次几十刀,慎用)
    • 创建网络搜索
    • 创建模型响应-gpt-5启用思考
  • Rerank 重排序模型
    • 重排序
  • 绘图模型
    • 图像对象
    • Midjourney绘画
      • 上传图片
      • 提交Imagine任务
      • 根据任务ID 查询任务状态
      • 根据ID列表查询任务
      • 获取任务图片的seed
      • 执行Action动作
      • 提交Blend任务
      • 提交Describe任务
      • 提交Shorten任务
      • 提交Modal
      • 提交swap_face任务
    • Ideogram 绘画
      • Generate 3.0(文生图)Generate
      • Generate 3.0(图片编辑)Edit
      • Generate 3.0(图片重制)Remix
      • Generate 3.0(图片重构)Reframe
      • Generate 3.0(替换背景) Replace Background
      • Remix(混合图)
      • Upscale(放大高清)
      • ideogram(文生图)
      • Describe(描述)
      • ideogram(文生图)
    • FLUX系列
      • gpt 兼容格式
        • Flux 创建(OpenAI dall-e-3格式)
        • Flux编辑(OpenAI dall-e-3格式)
      • OpenAI Dalle3格式
        • 编辑 gpt-image-1
      • Replicate 官方格式
        • 创建任务 black-forest-labs/flux-kontext-dev
        • 查询任务
      • Fal.ai 官方格式
        • /fal-ai/flux-pro/kontext
        • /fal-ai/nano-banana 文生图
        • /fal-ai/flux-pro/kontext/max
        • /fal-ai/nano-banana/edit 图片编辑
        • /fal-ai/flux-pro/kontext/max/multi(实验性多图编辑)
        • FLUX.1 [Dev] 文本生成图片
        • FLUX.1 [Dev] 图片生成图片
        • FLUX.1 [Dev] Redux
        • FLUX.1 [Schell] Redux
        • FLUX.1 Kontext [Pro]
        • FLUX.1 Kontext [Max] 文本转图像
        • FLUX.1 Kontext [Multi](实验性多图编辑)
        • FLUX.1 Kontext [Max]
        • FLUX.1 Kontext [Max] 文本转图像
        • 获取请求结果
        • FLUX.1 Kontext [Max Multi](实验性多图编辑)
    • Replicate 聚合平台
      • 创建任务 stability-ai/stable-diffusion
      • 创建任务 stability-ai/sdxl
      • 创建任务 stability-ai/stable-diffusion-inpainting
      • 创建任务 stability-ai/stable-diffusion-img2img
      • 创建任务 lucataco/flux-schnell-lora
      • 创建任务 lucataco/flux-dev-lora
      • 创建任务 ideogram-ai/ideogram-v2-turbo
      • 创建任务 andreasjansson/stable-diffusion-animation
      • 创建任务 lucataco/animate-diff
      • 创建任务 sujaykhandekar/object-removal
      • 创建任务 cjwbw/rembg
      • 创建任务 minimax/video-01-live
      • 创建任务 minimax/video-01
      • 创建任务 recraft-ai/recraft-v3
      • 创建任务 recraft-ai/recraft-v3-svg
      • 创建任务 black-forest-labs/flux-1.1-pro-ultra
      • 创建任务 black-forest-labs/flux-kontext-pro
      • 创建任务 black-forest-labs/flux-kontext-max
      • 创建任务 flux-kontext-apps/multi-image-kontext-max
      • 创建任务 flux-kontext-apps/multi-image-kontext-pro
      • 创建任务 lucataco/remove-bg
      • 创建任务 riffusion/riffusion
      • 创建任务 black-forest-labs/flux-fill-dev
      • 创建任务 black-forest-labs/flux-fill-pro
      • 创建任务 google/imagen-4-fast
      • 创建任务 google/imagen-4-ultra
      • 创建任务 google/imagen-4
      • 创建任务 prunaai/vace-14b
    • 豆包系列
      • 即梦4-文生图
      • 即梦4-图生图
      • doubao-seedream-3-0-t2i-250415
      • doubao-seededit-3-0-i2i-250628
    • DALL·E 3
      • 创建 DALL·E 3
    • GPT Image-1
      • 创建 gpt-image-1
      • 蒙版 gpt-image-1
    • recraftv3
    • Stable-Diffusion
  • 视频模型
    • veo视频生成
      • 视频统一格式
        • 创建视频
        • 创建视频,带图片
        • 查询任务
    • luma 视频生成
      • 官方API格式
        • 提交生成视频任务
        • 扩展视频
      • 查询任务
        • 查询单个任务
        • 批量获取任务
    • 快手可灵
      • Callback协议
      • 图像生成
      • 文生视频
      • 图生视频
      • 查询任务(免费)
    • Runway 视频生成
      • 提交视频生成任务
      • 查询视频任务(免费)
      • 提交视频生成任务-chat格式
    • 即梦 视频生成
      • 提交视频生成任务
      • 查询视频任务(免费)
    • 海螺 视频生成
      • 提交视频生成任务
      • 视频任务状态查询
    • 豆包 视频生成
      • 文生视频示例
      • 图生视频-首帧
      • seedance-lite-首尾帧
      • 图生视频-base64编码
      • seedance-lite-参考图
      • 查询单个任务
      • 查询视频生成任务列表-默认
      • 查询视频生成任务列表-搜索多个任务 ID
    • veo 视频生成
      • 视频统一格式
    • Kling 快手可灵
      • 查询任务(免费)
    • sora 视频生成
      • 异步格式
        • 查询任务
        • 创建视频,带图片 sora-2
        • 创建视频 sora-2
        • 创建视频 sora-2-pro
      • chat格式
        • 创建绘画
    • 通义万象
      • 生成视频
      • 视频查询
  • 文生音乐 Suno
    • 说明
    • 参数
    • 任务提交
      • 生成歌曲(灵感模式)
      • 生成歌曲(自定义模式)
      • 生成歌曲(续写模式)
      • 生成歌曲(歌手风格)
      • 生成歌曲(上传歌曲二次创作)
      • 生成歌曲(拼接歌曲)
      • 生成歌词
      • 歌曲拼接
    • 查询接口
      • 批量获取任务
      • 查询单个任务
  • 系统API
    • 获取令牌列表
    • 新增令牌
    • 获取账号信息
    • Models(列出模型)
  • 帮助中心
    • AI返回字段: 思考相关
    • HTTP状态码及其含义
  • 数据模型
    • 示例数据模型
      • Pet
      • Category
      • Tag
  1. ChatGPT聊天(Chat)

创建绘画

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

请求参数

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 --request POST '/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Accept;' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
  "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
Body

示例
{
    "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
    }
}
修改于 2025-10-12 12:09:01
上一页
聊天完成块对象
下一页
Stable-Diffusion
Built with