---
title: "Vision API for images · OpenAI-compatible, processed in the EU"
description: "Send images to open vision models with the OpenAI chat format. Read receipts, screenshots, forms and photos, with requests processed in EU data centres."
canonical: "https://inference.eu/api/vision/"
language: "en"
---

Guides · Vision

# Vision: send images to open models, processed in the EU

Vision models read images as well as text. You can ask them to describe a photo, read a receipt, compare two screenshots, check a form or answer questions about a chart. Images are sent in the same chat request as text, in the OpenAI or Anthropic format, and are processed in European data centres, which matters when they show documents, people or customer data.

[Contact sales](https://inference.eu/contact/)[Example request](#example)

1.  01API format: OpenAI and Anthropic
2.  02EU data centres
3.  03Covered by one DPA

read\_receipt.py

```
import base64, os
from openai import OpenAI

client = OpenAI(base_url="https://api.inference.eu/v1", api_key=os.environ["INFERENCE_EU_API_KEY"])

with open("receipt.jpg", "rb") as f:
    image = base64.b64encode(f.read()).decode()

reply = client.chat.completions.create(
    model="mistral-small-3.2-24b-instruct",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "List the items, the VAT rate and the total on this receipt."},
            {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{image}"}},
        ],
    }],
    max_tokens=500,
)
print(reply.choices[0].message.content)
```

## How to send an image

Choose a vision-capable model, such as `mistral-small-3.2-24b-instruct`, and make the user message `content` a list of parts instead of a string. A `text` part carries your question; an `image_url` part carries the image, either as a public HTTPS URL or as a data URL with base64 content, as in the example. You can mix several images and text parts in one message.

The answer comes back as normal text in `choices[0].message.content`. With the Anthropic Messages format, use an `image` content block with a `base64` or `url` source instead. With the Responses API, use an `input_image` item.

## Image size, detail and tokens

Images are converted to tokens before the model reads them, and larger images produce more tokens. That affects cost, speed and how much of the context window remains for text. Resize images to what the task needs: a photo for a general description can be small, while a dense invoice or a screenshot of a table needs enough resolution for the text to stay legible.

Use JPEG for photos and PNG for screenshots and documents with sharp text. Crop to the relevant area where you can. The `detail` field on `image_url` is accepted for compatibility; how it changes processing depends on the model.

## Practical patterns

Receipts and invoices: send the image with a JSON schema in `response_format` to get supplier, date, items and totals as structured data. Screenshots: ask a model to describe a UI bug, read an error dialog or compare a design with the built page. Quality checks: show a product photo and ask whether a label is present and readable.

For multi-page PDFs, it is often better to convert the document to Markdown first with the document conversion tool and send text, using vision only for pages with charts or handwriting. Text is cheaper per page and easier to search, cite and store.

## Errors and edge cases

Sending an image to a text-only model returns a 400 error saying the model does not accept images; check the model page or `GET /v1/models`. Image URLs must be publicly reachable over HTTPS; private links, expiring links and pages that need a login fail, so send base64 instead. Very large files can exceed the request size limit, so compress them first.

Vision models can misread small print, handwriting and numbers, and they may describe what they expect rather than what is there. For anything that matters, such as amounts on an invoice, validate the values and keep a person in the loop. Do not use vision models to identify people.

## Vision

Category

Guides

API format

OpenAI and Anthropic

Base URL

api.inference.eu/v1

Processing

EU data centres

Training on your data

Never

## Vision: common questions

The questions buyers, developers and legal teams ask us most. Something missing? Ask us directly.

Vision-capable models are marked as such on their model pages and in the catalogue. \`mistral-small-3.2-24b-instruct\` is one example. Call \`GET /v1/models\` to see what your key can use, and choose a larger vision model for dense documents or complex charts.

Yes. Images go into chat completions messages as \`image\_url\` content parts, exactly as with OpenAI's vision models, and into the Responses API as \`input\_image\` items. The Anthropic Messages format accepts \`image\` content blocks. Existing code works after you change the base URL, key and model.

Yes. Read the file, encode it as base64 and send it as a data URL, such as \`data:image/png;base64,...\`, in the \`image\_url\` field. This also avoids exposing the image on a public URL. Compress large images first to stay within the request size limit.

Several, as long as the total fits within the model's context window and the request size limit. Each image uses tokens in proportion to its resolution. The exact limit per request depends on the model and your plan, and we confirm it with you.

Vision models read images, so you would render each PDF page as an image. For most PDFs it is better to convert them to Markdown with the document conversion tool and send the text. Use vision for pages where layout, charts or handwriting carry the meaning.

Yes. Combine the image with \`response\_format\` and a JSON schema, for example to extract the fields of a receipt or a delivery note. The model returns JSON that follows your schema. Validate important values such as totals before you use them.

No. Images are processed in EU data centres to answer the request and are never used to train models. That is important for scans of contracts, invoices and screenshots that contain personal or confidential information.

Small or blurred text loses detail when the image is converted to tokens. Send a higher-resolution or cropped image, use PNG for documents and ask the model to quote the exact text. For critical numbers, convert the document to text or validate the result against another source.

[Ask a question](https://inference.eu/contact/)

## Related

[API overview](https://inference.eu/api/)

-   [Chat completionsSend chat messages to open-weight models with the OpenAI chat completions format. Requests are processed in EU data centres and never used for training.Endpoints](https://inference.eu/api/chat-completions/)
-   [Document conversionConvert PDF, Word, PowerPoint and Excel files to clean Markdown for RAG and LLM prompts. Tables, headings and scanned pages, processed in the EU.Tools](https://inference.eu/api/document-conversion/)
-   [Structured outputsGet valid JSON that matches your schema from open models with OpenAI-compatible structured outputs. JSON mode, json\_schema, strict mode and pitfalls.Guides](https://inference.eu/api/structured-outputs/)
-   [Image generationGenerate images from text prompts with an OpenAI-compatible images API. Open image models such as FLUX.1 schnell, processed in EU data centres.Endpoints](https://inference.eu/api/images/)

## Move your AI workloads to EU infrastructure

Tell us which models you use and roughly how much traffic you have. We reply within one working day with pricing and next steps.

-   Reply within one working day
-   Pricing for your volume
-   DPA ready to sign
