POST /v1/chat/completions as content parts. See
Images & Vision for the full guide.
The model ignores or rejects my image URL
Not all providers accept images via public URL. Google Vertex AI dropshttp(s) image URLs without an error: the request is billed but the model
answers without the image. AWS Bedrock returns 422. If a URL isn’t working,
switch to a base64 data: URL for maximum compatibility.
Base64 image not recognized
Include the MIME-type prefix, e.g.data:image/jpeg;base64,iVBORw0KGgo....
Anthropic and Bedrock routes accept a bare base64 string and treat it as JPEG;
other providers need the data:image/...;base64, prefix to detect an image.
Model doesn’t support image input at all
Only multimodal models accept images. Confirm support withGET /v1/models and
check input_modalities (for image input) and output_modalities (for image
output) before sending.
Image understanding costs more than expected
Image tokens add up. Where the model supports it, setdetail: "low" on the
image_url part for cheaper, lower-resolution understanding.
Wrong content shape
Image input uses an array of content parts in the message — atext part
plus an image_url part — not a plain string content. Sending a string with
a URL in it won’t attach the image.