Vision — gambar dalam permintaan
Kirim gambar ke /v1/chat/completions melalui image_url atau base64. Berfungsi dengan Claude dan GPT-5.6. Contoh dalam curl, Python, dan Node.js.
Sertakan gambar bersama permintaan teks ke /v1/chat/completions — model mendeskripsikan isinya, menjawab pertanyaan tentang gambar, atau menganalisis screenshot. URL maupun base64 didukung.
Model yang didukung
| Parameter | Tipe | Deskripsi |
|---|---|---|
claude-opus-5.5 / claude-sonnet-5.5 | Claude | Dukungan vision penuh — URL dan base64. |
gpt-6.1-sol | GPT | URL dan base64. Terbaik untuk dokumen dan diagram. |
Gambar harus dapat dijangkau secara publik melalui URL — atau diteruskan dalam base64. URL privat (S3 bertanda tangan, jaringan internal) sebaiknya diteruskan sebagai base64.
Format permintaan
Kolom content menjadi array blok: text dan 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 — tanpa URL publik
Untuk gambar privat, enkode file ke base64 dan kirimkan sebagai 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 | Tipe | Deskripsi |
|---|---|---|
urlreq. | string | URL gambar publik atau data:image/jpeg;base64,… untuk base64. |
detail | "auto" | "low" | "high" | Tingkat detail analisis (khusus GPT). Default "auto". "high" — lebih banyak token, kualitas lebih baik. |