Send images and video to a vision model by URL or as base64, and the limits of each request.
Munito AI vision models read images and video in a chat request. Send an image as an HTTPS URL or as a base64 data URL, next to your text. Images work on Chat Completions, Responses and Messages. Video works on Chat Completions.
The OpenAI SDK uses the base URL https://api.munito.ai/inference/v1, and the Anthropic SDK uses https://api.munito.ai/inference. Both read the key from MUNITO_API_KEY.
Models
| Model | Images | Video |
|---|---|---|
qwen/qwen3.8-27b | Yes | Yes |
zai-org/glm-5.3-flash | Yes | Yes |
deepseek-ai/deepseek-v4.1-flash-1017 | Yes | No |
deepseek-ai/deepseek-v4-flash | No | No |
aleph-alpha/kolibri-1 | No | No |
google/gemma-4-12b | No | No |
An image or a video to a model without that input returns 400 with 'image' is not supported: not available for this model (or 'video').
An image by URL
pip install openaiimport os
from openai import OpenAI
client = OpenAI(
base_url="https://api.munito.ai/inference/v1",
api_key=os.environ["MUNITO_API_KEY"],
)
response = client.chat.completions.create(
model="qwen/qwen3.8-27b",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image in one sentence."},
{
"type": "image_url",
"image_url": {"url": "https://raw.githubusercontent.com/github/explore/main/topics/python/python.png"},
},
],
}
],
max_tokens=2048,
)
print(response.choices[0].message.content)Munito AI downloads the URL once, before the model runs. The URL must use HTTPS on port 443 and answer within 15 seconds, with no redirect.
A URL that Munito AI cannot download returns 400 with media URL is unavailable or not permitted.
An image as base64
Send a local file as a data URL: data:<type>;base64,<data>. The type must match the file.
import base64
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.munito.ai/inference/v1",
api_key=os.environ["MUNITO_API_KEY"],
)
with open("photo.png", "rb") as image:
data = base64.b64encode(image.read()).decode()
response = client.chat.completions.create(
model="qwen/qwen3.8-27b",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "What is in this image?"},
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{data}"}},
],
}
],
max_tokens=2048,
)
print(response.choices[0].message.content)TypeScript
npm install openaiimport OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.munito.ai/inference/v1",
apiKey: process.env.MUNITO_API_KEY,
});
const response = await client.chat.completions.create({
model: "zai-org/glm-5.3-flash",
messages: [
{
role: "user",
content: [
{ type: "text", text: "Describe this image in one sentence." },
{
type: "image_url",
image_url: { url: "https://raw.githubusercontent.com/github/explore/main/topics/python/python.png" },
},
],
},
],
max_tokens: 2048,
});
console.log(response.choices[0].message.content);Video
Send a video as a video_url part, with an HTTPS URL or a base64 data URL. The model reads up to 32 frames of the video.
import base64
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.munito.ai/inference/v1",
api_key=os.environ["MUNITO_API_KEY"],
)
with open("clip.mp4", "rb") as video:
data = base64.b64encode(video.read()).decode()
response = client.chat.completions.create(
model="qwen/qwen3.8-27b",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "What happens in this video?"},
{"type": "video_url", "video_url": {"url": f"data:video/mp4;base64,{data}"}},
],
}
],
max_tokens=2048,
)
print(response.choices[0].message.content)You can also send frames that you choose: put JPEG frames in one data URL, separated by commas, as data:video/jpeg;base64,<frame1>,<frame2>. Send up to 32 frames.
An image on Messages
pip install anthropicimport os
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.munito.ai/inference",
api_key=os.environ["MUNITO_API_KEY"],
)
message = client.messages.create(
model="qwen/qwen3.8-27b",
max_tokens=2048,
messages=[
{
"role": "user",
"content": [
{
"type": "image",
"source": {
"type": "url",
"url": "https://raw.githubusercontent.com/github/explore/main/topics/python/python.png",
},
},
{"type": "text", "text": "Describe this image in one sentence."},
],
}
],
)
print(next(block.text for block in message.content if block.type == "text"))A base64 image on Messages uses "source": {"type": "base64", "media_type": "image/png", "data": "..."}.
On Responses, send an input_image part with image_url set to an HTTPS URL or a data URL.
Limits
| Limit | Value |
|---|---|
| Images in one request | 8 |
| Videos in one request | 1 |
| Size of one image | 10 MiB |
| Size of one video | 24 MiB |
| All media in one request | 32 MiB |
| Frames that the model reads | 32 |
| Image formats | JPEG, PNG, WebP, GIF, BMP, TIFF, AVIF |
| Video formats | MP4, WebM, QuickTime, Matroska, AVI, a JPEG frame sequence |
Error (400) | Cause |
|---|---|
too many image inputs, too many video inputs | More than 8 images, or more than one video. |
media exceeds the configured byte limit | A file, or all media together, is above the limit. |
media format does not match a supported content type | The format is not in the list, or the data URL type is wrong. |
too many video frames | A JPEG frame sequence has more than 32 frames. |
media URL is unavailable or not permitted | Munito AI cannot download the URL. |
Each image and video uses input tokens. The usage of the response counts them in the input tokens, at the input price of the model.
See the model catalog and the chat reference.
Tool calling
Function calling with open models. Define tools, control tool_choice, handle parallel calls and send the results back with the OpenAI or Anthropic SDK.
Document AI
Convert PDFs, scans and handwritten pages to Markdown with an OCR API in the EU or the US. Extract tables and invoice fields, pay for each page, and keep zero data retention under a GDPR DPA.