Vision — Bilder in Anfragen
Senden Sie Bilder über image_url oder base64 an /v1/chat/completions. Funktioniert mit Claude und GPT-5.6. Beispiele für curl, Python und Node.js.
Übergeben Sie zusammen mit einer Textanfrage ein Bild an /v1/chat/completions — das Modell beschreibt den Inhalt, beantwortet Fragen zum Bild oder analysiert einen Screenshot. Sowohl URLs als auch base64 werden unterstützt.
Unterstützte Modelle
| Parameter | Typ | Beschreibung |
|---|---|---|
claude-opus-5.5 / claude-sonnet-5.5 | Claude | Vollständige Bildunterstützung – URL und Base64. |
gpt-6.1-sol | GPT | URL und Base64. Am besten für Dokumente und Diagramme geeignet. |
Das Bild muss öffentlich über eine URL erreichbar sein oder als Base64 übergeben werden. Private URLs (signiertes S3, interne Netzwerke) sollten als Base64 übergeben werden.
Anfrageformat
Das Feld content wird zu einem Array aus Blöcken: text und image_url.
curl https://getvibeapi.com/v1/chat/completions \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-5.5",
"max_tokens": 256,
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "What is in the picture? Describe it briefly."},
{"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}
]
}]
}'Base64 — ohne öffentliche URL
Kodieren Sie private Bilder in Base64 und übergeben Sie sie als Data-URL:
# base64 — for private images without a public URL
curl https://getvibeapi.com/v1/chat/completions \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-6.1-sol",
"max_tokens": 256,
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "What is in the picture?"},
{"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,/9j/4AAQ..."}}
]
}]
}'image_url parameters
| Parameter | Typ | Beschreibung |
|---|---|---|
urlreq. | string | Öffentliche Bild-URL oder data:image/jpeg;base64,… für Base64. |
detail | "auto" | "low" | "high" | Analysedetail (nur GPT). Standardmäßig "auto". "high" — mehr Tokens, bessere Qualität. |