Authorization: Bearer ********************
{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "这张图片里有什么?请详细描述。"
},
{
"type": "image_url",
"image_url": {
"url": "https://api.apifox.com/api/v1/projects/4444182/resources/439706/image-preview"
}
}
]
}
]
}
curl --location --request POST 'http://n1n.ai/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "这张图片里有什么?请详细描述。"
},
{
"type": "image_url",
"image_url": {
"url": "https://api.apifox.com/api/v1/projects/4444182/resources/439706/image-preview"
}
}
]
}
]
}'
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "\n\nHello there, how may I assist you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}