1. 对话
八秒API聚合 copy
  • 引言
  • 首页必看
    • 查看可用模型
      GET
  • 对话
    • 聊天对话(通用)
      POST
    • 识别图片
      POST
    • 克劳德(原生API格式请求)
      POST
  • 绘画
    • 任务查询
      • 查询所有任务
      • 根据ID列表查询任务
      • 根据ID列表查询任务-字段displays
      • 分页查询任务
      • 查询任务队列
      • 取消任务
      • 获取任务图片的seed(需设置mj或niji的私信ID)
      • 指定ID获取任务
    • 任务提交
      • 可选速度-提交绘画任务
      • 提交Imagine任务
      • 执行动作
      • 提交Describe任务
      • 上传文件到discord
      • 提交Blend任务
      • 提交Modal
      • 提交Shorten任务
    • InsightFace任务提交
      • 提交swap_face任务
  1. 对话

识别图片

POST
/v1/chat/completions

请求参数

Header 参数

Body 参数application/json

示例
{
  "model": "gpt-4o",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "这张图片是什么?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://github.com/dianping/cat/raw/master/cat-home/src/main/webapp/images/logo/cat_logo03.png"
          }
        }
      ]
    }
  ]
}

请求示例代码

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 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "gpt-4o",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "这张图片是什么?"
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://github.com/dianping/cat/raw/master/cat-home/src/main/webapp/images/logo/cat_logo03.png"
          }
        }
      ]
    }
  ]
}'

返回响应

🟢200成功
application/json
Body

示例
{}
修改于 2026-03-02 09:08:38
上一页
聊天对话(通用)
下一页
克劳德(原生API格式请求)
Built with