Hi everyone,
I recently made a request to the GPT-4o API with the following cURL command, where I provided a text prompt and an image URL with the low
detail setting:
curl https://api.openai.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_OPENAI_API_KEY" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are an assistant that analyzes images and text."
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image:"
},
{
"type": "image_url",
"image_url": {
"url": "https://images.pexels.com/photos/9729585/pexels-photo-9729585.jpeg",
"detail": "low"
}
}
]
}
]
}'
According to the documentation, the low
detail setting for image processing should only consume around 85 tokens. However, the API response indicates that usage.prompt_tokens=2862
, which is significantly higher than expected.
I’m trying to understand why the token usage is so high. Has anyone encountered similar behavior or know what might be causing this discrepancy? Is there something wrong with how I’m structuring my request, or is it a known issue?
Any insights would be appreciated!
Thanks!