Basic Usage
Use Base64 Images
You can also pass a base64 data URL when the image is local or private:Send Multiple Images
content is an array of blocks, so one user message can include several image_url blocks alongside text. Use this to compare images or ask questions that span more than one image:
TOO_MANY_TOKENS (HTTP 400), reduce the number of images, shorten your instructions, or switch to a model with a larger context window.
Choose a Vision Model
Use the Text Models page or the Models API to find models that support vision. Vision support is listed in model capabilities.Prompting Tips
- Tell the model what to focus on: objects, text, layout, safety, defects, or differences.
- Ask for structured output when your application needs fields you can parse.
- Keep image URLs accessible to the API, or use base64 data URLs for private images.
- Use a model with enough context if you combine images with long instructions.