跳转到主要内容

支持的模型

极客智坊支持图片对话,你可以在模型广场通过对话模型->图片识别筛选来查看所有支持图片分析的对话模型: 筛选极客智坊支持图片分析的对话模型

单张图片

以下是包含单张图片的对话请求示例:
curl --location --request POST 'https://geekai.co/api/v1/chat/completions' \
--header 'Authorization: Bearer $GEEKAI_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gpt-5-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 列表即可:
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-5-mini",
    "messages": [
      {
        "role": "user",
        "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"
            }
          }
        ]
      }
    ]
}'