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"
}
}
]