Skip to main content

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.

Default to low detail

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:

RegionModelProviderCost guidanceNotes
RoWqwen3.6-35b-a3bSelf-hosted CAIPFreeRecommended when self-hosted data sovereignty and zero usage cost are important.
RoWqwen3.6-35b-a3b-thinkSelf-hosted CAIPFreeSame vision capability with extended thinking enabled. Both self-hosted vision models also accept video input.
RoWgpt-4oAzure OpenAIManaged model pricingStrong managed VLM; use only when higher quality is required.
RoWgpt-4o-miniAzure OpenAIManaged model pricingLower-cost managed option for simple visual understanding.
RoWgpt-41, gpt-41-mini, gpt-41-nanoAzure OpenAIManaged model pricingUse the smallest model that meets quality requirements.
RoWgpt-5, gpt-5-mini, gpt-5-nano, gpt-5-2, gpt-5.5, gpt-5-pro, gpt-5-codexAzure OpenAIManaged model pricingMultimodal GPT models; reserve larger variants for difficult tasks.
RoWo3, o3-proAzure OpenAIManaged model pricingReasoning models for complex visual reasoning tasks.
RoWclaude-3-haiku, claude-37-sonnet, claude-4-sonnet, claude-haiku-4.5, claude-sonnet-4.6, claude-opus-4.5, claude-opus-4.6AWS Bedrock (Anthropic)Contact CAIPClaude models support image input; legacy Claude model names forward to newer Claude deployments.
RoWnova-lite, nova-proAWS Bedrock (Amazon Nova)Contact CAIPNova models support text, image, and video input.
Chinaqwen3-vl-plus, qwen3-vl-flash, qwen-vl-maxAlibaba CloudContact CAIPQwen VL models for image and video understanding.
ChinaMiniMax-M2.5Alibaba CloudManaged model pricingMultimodal 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:

ParameterRequiredDescription
modelYesA vision-capable model name, for example qwen3.6-35b-a3b or gpt-4o-mini.
messages[].content[]YesAn array containing text and image_url content parts.
type: "text"YesThe text prompt or instruction.
type: "image_url"YesThe image input part.
image_url.urlYesEither an HTTPS image URL or a base64 data URL such as data:image/png;base64,....
image_url.detailRecommendedlow, high, or auto. Use low by default for cost control.

Choosing image detail

DetailWhen to useCost impact
lowClassification, broad scene description, simple screenshots, routing, quick checksLowest image-token usage; recommended default.
highOCR-like tasks, small text, dense UI screenshots, charts, detailed diagrams, fine-grained defectsHigher image-token usage and higher managed-model cost.
autoWhen you want the provider to chooseCost 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:

DetailApproximate image input tokensExample with gpt-4o at ~$5 / 1M input tokens
low~85 input tokens per image85 × $5 / 1,000,000 = **$0.00043 per image** plus prompt and output tokens
highStarts with the low-detail budget, then adds higher-resolution image tiles/cropsMore 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
Pricing can differ

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-a3b when 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, or qwen3-vl-flash before using larger models.
  • Always set detail: "low" first; switch to high only 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.model to confirm the request was served by the intended model.