Vision — requests में images
image_url या base64 के ज़रिए /v1/chat/completions पर इमेज भेजें। Claude और GPT-5.6 के साथ काम करता है। curl, Python और Node.js में उदाहरण।
text request के साथ /v1/chat/completions पर image भेजें — model सामग्री का वर्णन करता है, image के बारे में सवालों के जवाब देता है या screenshot का विश्लेषण करता है। URLs और base64 दोनों समर्थित हैं।
समर्थित models
| Parameter | Type | विवरण |
|---|---|---|
claude-opus-5.5 / claude-sonnet-5.5 | Claude | पूरा vision support — URL और base64। |
gpt-6.1-sol | GPT | URL और base64। Documents और diagrams के लिए सर्वोत्तम। |
Image URL से publicly reachable होनी चाहिए — या base64 में pass की जानी चाहिए। Private URLs (signed S3, internal networks) base64 में pass करें।
अनुरोध प्रारूप
content field blocks की array बन जाती है: text और 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 — बिना किसी सार्वजनिक URL के
निजी इमेज के लिए, फ़ाइल को base64 में encode करें और उसे 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 | Type | विवरण |
|---|---|---|
urlreq. | string | Public image URL या base64 के लिए data:image/jpeg;base64,…। |
detail | "auto" | "low" | "high" | Analysis detail (केवल GPT)। डिफ़ॉल्ट रूप से "auto"। "high" — अधिक tokens, बेहतर quality। |