极客智坊支持图片对话,你可以通过在模型广场通过筛选来查看所有支持图片对话的模型: 支持图片对话的模型 以下是包含单张图片的对话请求示例:
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gpt-4o-mini",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "请提取中包含的文字,并以列表形式输出"
          },
          {
            "type": "image_url",
            "image_url": {
              "url": "https://static.geekai.co/storage/2025/03/08/1741444660440.jpg"
            }
          }
        ]
      }
    ]
}'
多张图片识别传入多个 image_url 对象到 content 列表即可:
"content": [
  {
    "type": "text",
    "text": "找出两张图片中的不同点"
  },
  {
    "type": "image_url",
    "image_url": {
      "url": "https://static.geekai.co/storage/2025/05/14/image1.jpg"
    }
  },
  {
    "type": "image_url",
    "image_url": {
      "url": "https://static.geekai.co/storage/2025/05/14/image2.jpg"
    }
  }
]