/chat/completions API with a multi-part messagesparameter. The image_url can either be a URL or a base64-encoded image. You can send multiple images by adding more content entries in the same message.
URLs are preferred for large files since they avoid payload bloat. Use base64 encoding when working with local or private files.
- URLs: More efficient for publicly accessible images as they don’t require local encoding
- Base64: Required for local files or private images that aren’t publicly accessible
Using Image URLs
Here’s how to send an image via URL:Using Base64 Encoded Images (OpenAI only)
For OpenAI models, you can send local images as base64:Supported image types:
Check Vision Model Support
For models that support image inputs and their capabilities, visit anannas.ai/models.
image/pngimage/jpegimage/webpimage/gif
Was this page helpful?