Skip to main content
Use the chat completions API to describe or reason about images. Add both the prompt and the image URL to the same user message so the model can reference the visual context.

Streaming example

Use a publicly reachable https image (or a signed URL) and keep text + image together in one content array. Use the Models API to find models with image in modalities.input.

Non-streaming call

What to remember

  • messages[*].content is an array: include both text and image_url parts in the same user message.
  • Image URLs must be reachable over HTTPS; signed URLs work if they stay valid for the request duration.
  • response.model (or chunk.model while streaming) tells you which underlying model handled the call.