Image Input (Vision)
LLMAPI supports image input for vision-capable language models (VLMs) through the OpenAI-compatible /v1/chat/completions endpoint. Use the same message structure as the OpenAI vision guide: a user message can contain an array of text parts and image_url parts.
Set detail: "low" unless the model must inspect small text, dense diagrams, or fine visual details. Low detail is faster and reduces image-token usage, which keeps managed-model cost lower.
Supported models
The following current LLMAPI models have image in their configured input modalities:
| Region | Model | Provider | Cost guidance | Notes |
|---|---|---|---|---|
| RoW | qwen3.6-35b-a3b | Self-hosted CAIP | Free | Recommended when self-hosted data sovereignty and zero usage cost are important. |
| RoW | qwen3.6-35b-a3b-think | Self-hosted CAIP | Free | Same vision capability with extended thinking enabled. Both self-hosted vision models also accept video input. |
| RoW | gpt-4o | Azure OpenAI | Managed model pricing | Strong managed VLM; use only when higher quality is required. |
| RoW | gpt-4o-mini | Azure OpenAI | Managed model pricing | Lower-cost managed option for simple visual understanding. |
| RoW | gpt-41, gpt-41-mini, gpt-41-nano | Azure OpenAI | Managed model pricing | Use the smallest model that meets quality requirements. |
| RoW | gpt-5, gpt-5-mini, gpt-5-nano, gpt-5-2, gpt-5.5, gpt-5-pro, gpt-5-codex | Azure OpenAI | Managed model pricing | Multimodal GPT models; reserve larger variants for difficult tasks. |
| RoW | o3, o3-pro | Azure OpenAI | Managed model pricing | Reasoning models for complex visual reasoning tasks. |
| RoW | claude-3-haiku, claude-37-sonnet, claude-4-sonnet, claude-haiku-4.5, claude-sonnet-4.6, claude-opus-4.5, claude-opus-4.6 | AWS Bedrock (Anthropic) | Contact CAIP | Claude models support image input; legacy Claude model names forward to newer Claude deployments. |
| RoW | nova-lite, nova-pro | AWS Bedrock (Amazon Nova) | Contact CAIP | Nova models support text, image, and video input. |
| China | qwen3-vl-plus, qwen3-vl-flash, qwen-vl-max | Alibaba Cloud | Contact CAIP | Qwen VL models for image and video understanding. |
| China | MiniMax-M2.5 | Alibaba Cloud | Managed model pricing | Multimodal chat model. |
Models exposed through another endpoint, for example Responses API models such as gpt-5-pro, gpt-5-codex, and o3-pro, support image input but use that endpoint's request format instead of the chat-completions examples below.
qwen3-chat does not support image input. If you send images to a model that does not support vision, LLMAPI may fall back to another model. Always check the model field in the response, or set disable_fallbacks: true if you want an error instead of fallback routing.
Request format
Use the standard chat completions endpoint:
POST https://llm.api.caip.bmw.cloud/v1/chat/completions
Image input is provided inside messages[].content:
| Parameter | Required | Description |
|---|---|---|
model | Yes | A vision-capable model name, for example qwen3.6-35b-a3b or gpt-4o-mini. |
messages[].content[] | Yes | An array containing text and image_url content parts. |
type: "text" | Yes | The text prompt or instruction. |
type: "image_url" | Yes | The image input part. |
image_url.url | Yes | Either an HTTPS image URL or a base64 data URL such as data:image/png;base64,.... |
image_url.detail | Recommended | low, high, or auto. Use low by default for cost control. |
Choosing image detail
| Detail | When to use | Cost impact |
|---|---|---|
low | Classification, broad scene description, simple screenshots, routing, quick checks | Lowest image-token usage; recommended default. |
high | OCR-like tasks, small text, dense UI screenshots, charts, detailed diagrams, fine-grained defects | Higher image-token usage and higher managed-model cost. |
auto | When you want the provider to choose | Cost can vary; avoid for strict cost control. |
Cost estimation
For self-hosted models (qwen3.6-35b-a3b and qwen3.6-35b-a3b-think), CAIP currently charges no additional per-token usage cost, but throughput is capacity-limited.
For managed models, image input is billed as input tokens for the selected model. A practical estimate for OpenAI-style vision pricing is:
| Detail | Approximate image input tokens | Example with gpt-4o at ~$5 / 1M input tokens |
|---|---|---|
low | ~85 input tokens per image | |
high | Starts with the low-detail budget, then adds higher-resolution image tiles/crops | More expensive; use only when low detail is insufficient |
Example estimate for a simple request with one image, detail: "low", a 100-token text prompt, and a 300-token response on gpt-4o:
- Input:
(85 image tokens + 100 text tokens) × $5 / 1,000,000 ≈ $0.00093 - Output:
300 tokens × $15 / 1,000,000 ≈ $0.00450 - Total estimate: ~$0.00543
CAIP pricing may differ from public provider prices. Use the model catalogue and contact CAIP for contractual pricing. The estimate above is intended for order-of-magnitude planning.
Curl examples
Image by HTTPS URL
curl -X POST \
'https://llm.api.caip.bmw.cloud/v1/chat/completions' \
-H 'Authorization: Bearer {Your_apikey}' \
-H 'Content-Type: application/json' \
-d '{
"model": "qwen3.6-35b-a3b",
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Describe the relevant objects in this image."},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/image.jpg",
"detail": "low"
}
}
]
}
],
"disable_fallbacks": true
}'
Local image as base64 data URL
IMAGE_BASE64=$(base64 -w 0 ./screenshot.png)
curl -X POST \
'https://llm.api.caip.bmw.cloud/v1/chat/completions' \
-H 'Authorization: Bearer {Your_apikey}' \
-H 'Content-Type: application/json' \
-d "{
\"model\": \"gpt-4o-mini\",
\"messages\": [
{
\"role\": \"user\",
\"content\": [
{\"type\": \"text\", \"text\": \"Summarize this screenshot. Use low detail unless small text is required.\"},
{
\"type\": \"image_url\",
\"image_url\": {
\"url\": \"data:image/png;base64,${IMAGE_BASE64}\",
\"detail\": \"low\"
}
}
]
}
]
}"
OpenAI SDK examples in Python
Image by HTTPS URL
import os
from openai import OpenAI
client = OpenAI(
base_url="https://llm.api.caip.bmw.cloud/v1",
api_key=os.environ["LLM_API_KEY"],
)
response = client.chat.completions.create(
model="qwen3.6-35b-a3b",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Describe the relevant objects in this image."},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/image.jpg",
"detail": "low",
},
},
],
}
],
extra_body={"disable_fallbacks": True},
)
print(response.choices[0].message.content)
print("served_by:", response.model)
Local image as base64 data URL
import base64
import os
from pathlib import Path
from openai import OpenAI
client = OpenAI(
base_url="https://llm.api.caip.bmw.cloud/v1",
api_key=os.environ["LLM_API_KEY"],
)
image_bytes = Path("screenshot.png").read_bytes()
image_base64 = base64.b64encode(image_bytes).decode("utf-8")
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Summarize this screenshot."},
{
"type": "image_url",
"image_url": {
"url": f"data:image/png;base64,{image_base64}",
"detail": "low",
},
},
],
}
],
)
print(response.choices[0].message.content)
print("served_by:", response.model)
Best practices
- Prefer
qwen3.6-35b-a3bwhen the self-hosted model quality is sufficient and you want zero additional usage cost. - For managed models, start with
gpt-4o-mini,gpt-41-mini,gpt-5-mini, orqwen3-vl-flashbefore using larger models. - Always set
detail: "low"first; switch tohighonly after verifying low detail is not enough. - Resize very large images before sending them if fine detail is not required.
- Avoid sending unnecessary or sensitive image regions; crop the image to the relevant area when possible.
- Check
response.modelto confirm the request was served by the intended model.