Image Input
Use the image_url content-part to send images to vision-capable models.
Remote URL
Section titled “Remote URL”curl https://llmtr.com/v1/chat/completions \ -H "Authorization: Bearer llmtr-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" } } ] } ] }'Multiple Images
Section titled “Multiple Images”You can send more than one image_url part in the same user message. Later user messages in the same conversation can include additional images too.
{ "model": "google/gemini-2.5-flash", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Compare these two images." }, { "type": "image_url", "image_url": { "url": "https://example.com/front.jpg" } }, { "type": "image_url", "image_url": { "url": "https://example.com/back.jpg" } } ] }, { "role": "assistant", "content": "I prepared the first comparison." }, { "role": "user", "content": [ { "type": "text", "text": "Evaluate this third image in the same context." }, { "type": "image_url", "image_url": { "url": "https://example.com/detail.jpg" } } ] } ]}Base64 data URL
Section titled “Base64 data URL”{ "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..." }}Detail level (OpenAI models)
Section titled “Detail level (OpenAI models)”{ "type": "image_url", "image_url": { "url": "https://example.com/chart.png", "detail": "high" }}detail values: low, high, auto.
File ID (via Files API)
Section titled “File ID (via Files API)”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" }}Limits
Section titled “Limits”- A single message can contain at most 16 content parts. Text, image, audio, and file parts all count toward this total.
- Inline base64 images count toward the JSON body limit. For large or reusable media, use the Files API.
image_urlis a vision/chat input. Theimage_urlfield on/v1/images/generationsis an image-generation reference field with separate endpoint semantics.
Recommended format
Section titled “Recommended format”- JPEG or PNG, < 5 MB
- 512-2048 px on each side
- Use high contrast and resolution for OCR-style use cases
Supported models
Section titled “Supported models”Filter the catalog by modality:
curl "https://llmtr.com/api/models?modality=image" \ -H "Authorization: Bearer llmtr-your_key"