Authorization: Bearer ********************
{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://osscn.ecovai.cn/file/upload/2024/12/02/1863472692464717824.png"
}
},
{
"type": "text",
"text": "这几道题目答案是什么?"
}
]
}
]
}
curl --location --request POST 'https://api.ecovai.cn/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://osscn.ecovai.cn/file/upload/2024/12/02/1863472692464717824.png"
}
},
{
"type": "text",
"text": "这几道题目答案是什么?"
}
]
}
]
}'
{
"id": "chatcmpl-AZuWloAjU9va7iWJsE34mtXOCB1z3",
"object": "chat.completion",
"created": 1733122135,
"model": "gpt-4o-2024-08-06",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "这几道题目的答案是:\n\n1. B. ±3\n2. C. 30°\n3. C. 乙队身高更整齐"
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 652,
"completion_tokens": 34,
"total_tokens": 686
},
"system_fingerprint": "fp_04751d0b65"
}