{
"model": "gpt-4.1-mini",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "图片中有什么?"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,{base64}"
}
}
]
}
]
}curl --location -g --request POST 'http://api.example.com/v1/chat/completions' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4.1-mini",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "图片中有什么?"
},
{
"type": "image_url",
"image_url": {
"url": "data:image/png;base64,{base64}"
}
}
]
}
]
}'{
"choices": [
{
"content_filter_results": {},
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"annotations": [],
"content": "图片是一张卫星视角的图像,显示了农村或农田地区。有几台风力发电机(风车)分布在农田中,田地被分割成多个小块,颜色各异,可能是不同作物或不同的耕作阶段。左上角还有一片建筑群,可能是村庄或农场的房屋。整体来看,这是一块利用风力发电的农业区域。",
"refusal": null,
"role": "assistant"
}
}
],
"created": 1764342551,
"id": "chatcmpl-CguNrgKLreWXEbjCaTbpg2QILem77",
"model": "gpt-4.1-mini-2025-04-14",
"object": "chat.completion",
"prompt_filter_results": [
{
"prompt_index": 1,
"content_filter_result": {
"custom_blocklists": {
"filtered": false,
"details": []
}
}
},
{
"prompt_index": 0,
"content_filter_result": {}
}
],
"system_fingerprint": "fp_3dcd5944f5",
"usage": {
"completion_tokens": 99,
"completion_tokens_details": {
"accepted_prediction_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 0,
"rejected_prediction_tokens": 0
},
"prompt_tokens": 588,
"prompt_tokens_details": {
"audio_tokens": 0,
"cached_tokens": 0
},
"total_tokens": 687
}
}