Reference · API
OpenAI vision chat
Last updated
Same **chat completions** endpoint with image parts in messages.
Same **chat completions** endpoint with image parts in messages.
Endpoint
POST https://api.openai.com/v1/chat/completionsVision-capable models
Use `gpt-4o`, `gpt-4o-mini`, or current vision model IDs from provider docs.
Message with image
{
"model": "gpt-4o-mini",
"messages": [{
"role": "user",
"content": [
{ "type": "text", "text": "What error code is shown?" },
{ "type": "image_url", "image_url": { "url": "https://..." } }
]
}]
}