Skip to content

Image Input

Use the image_url content-part to send images to vision-capable models.

Terminal window
curl https://llmtr.com/v1/chat/completions \
-H "Authorization: Bearer sk_your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-2.5-flash",
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "What do you see in this photo?" },
{
"type": "image_url",
"image_url": {
"url": "https://example.com/photo.jpg"
}
}
]
}
]
}'
{
"type": "image_url",
"image_url": {
"url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."
}
}
{
"type": "image_url",
"image_url": {
"url": "https://example.com/chart.png",
"detail": "high"
}
}

detail values: low, high, auto.

For large files, upload via Files API first and reference the file_id:

{
"type": "input_file",
"input_file": {
"file_id": "file_xxx",
"mime_type": "image/jpeg"
}
}
  • JPEG or PNG, < 5 MB
  • 512-2048 px on each side
  • Use high contrast and resolution for OCR-style use cases

Filter the catalog by modality:

Terminal window
curl "https://llmtr.com/api/models?modality=image" \
-H "Authorization: Bearer sk_your_key"