Auriko supports vision through the OpenAI-compatible image_url content part. Pass an image URL or a base64 data URL in the content array of a user message.
Prerequisites
- An Auriko API key
- Python 3.10+ with the OpenAI SDK (
pip install openai) or the auriko SDK (pip install auriko)
- OR Node.js 18+ with the OpenAI SDK (
npm install openai) or @auriko/sdk (npm install @auriko/sdk)
- A vision-capable model (e.g.,
gpt-4o, claude-sonnet-4-6, gemini-flash-latest)
Analyze images from URLs
Pass an image URL as a content part in the user message:
Analyze base64-encoded images
For local files or private images, encode the bytes as a data URL:
Send multiple images
Send several images in a single request by adding multiple image_url content parts:
Control image resolution
You can set detail on the image_url content part to control how much resolution the model uses:
| Value | Behavior |
|---|
auto | The model decides based on image size (default) |
low | Fixed low-resolution processing, fewer tokens |
high | High-resolution processing, more tokens for fine detail |
Use low for cost-sensitive workloads where fine detail isn’t needed. Use high when the model needs to read small text or distinguish fine visual features.
Response shape
Vision responses use the standard ChatCompletionResponse shape. The model’s analysis appears in choices[0].message.content as text.
Errors
| Situation | HTTP | SDK error |
|---|
| Image too large for the model’s context window | 400 | BadRequestError |
| Model doesn’t support vision | 400 | BadRequestError |
Some models accept image URLs directly. Others require Auriko to process the image first, which adds these constraints:
| Situation | HTTP | SDK error |
|---|
| Image URL unreachable | 400 | BadRequestError |
| Total image data exceeds 30 MB | 400 | BadRequestError |
| More than 1,500 images in one request | 400 | BadRequestError |
| Image URL isn’t HTTPS | 400 | BadRequestError |
| Unsupported image format | 400 | BadRequestError |
URL resolution behavior varies by model. For consistent results across models, use base64-encoded images.
Check Supported parameters for the accepted content part types and see Error codes for the full error taxonomy.