Multimodal
Send text, image, audio, or video inputs when the selected model supports them.
Content parts
OpenAI-compatible chat requests can use an array of content parts for multimodal models, such as text, image_url, input_audio, or provider-specific file/video parts. Native Claude and Gemini requests use their own content schemas. Do not assume every model accepts every media type.
Example image input
{
"model": "google/gemini-3.1-flash-lite",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image."},
{"type": "image_url", "image_url": {"url": "https://example.com/image.png"}}
]
}]
}Base64 and local files
No URL? Inline the image as a base64 data URI in the same image_url field. This avoids hosting the file but increases request size, so prefer URLs for large or reused images.
{
"type": "image_url",
"image_url": { "url": "data:image/png;base64,iVBORw0KGgoAAAANSUh..." }
}Audio input
Audio-capable chat models accept an input_audio part with base64-encoded audio and its format. Use this to ask questions about a recording or transcribe inline.
{
"role": "user",
"content": [
{"type": "text", "text": "What is said in this clip?"},
{"type": "input_audio", "input_audio": {"data": "<base64-audio>", "format": "mp3"}}
]
}Model-dependent features
OneRouter keeps protocol compatibility and forwards model-specific parameters where supported. Features such as tool calling, structured output, reasoning, prompt caching, web search, image input, audio input, video generation, and provider-specific options depend on the selected model and upstream provider. Check the model detail page before relying on a feature in production.