الرؤية — الصور في الطلبات
أرسل الصور إلى /v1/chat/completions عبر image_url أو base64. يعمل مع Claude وGPT-5.6. أمثلة بـ curl وPython وNode.js.
أرسل صورة إلى جانب طلب نصي إلى /v1/chat/completions — يصف النموذج المحتوى أو يجيب عن أسئلة حول الصورة أو يحلل لقطة شاشة. كل من عناوين URL و base64 مدعومان.
النماذج المدعومة
| المعلمة | النوع | الوصف |
|---|---|---|
claude-opus-5.5 / claude-sonnet-5.5 | Claude | دعم كامل للرؤية — URL وbase64. |
gpt-6.1-sol | GPT | URL وbase64. الأفضل للمستندات والمخططات. |
يجب أن تكون الصورة متاحة للوصول العام عبر رابط URL — أو تمريرها بصيغة base64. الروابط الخاصة (S3 موقَّع، الشبكات الداخلية) ينبغي تمريرها بصيغة base64.
تنسيق الطلب
يتحول الحقل content إلى مصفوفة كتل: 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 — بدون رابط عام
بالنسبة إلى الصور الخاصة، رمّز الملف بصيغة base64 ومرّره كعنوان 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
| المعلمة | النوع | الوصف |
|---|---|---|
urlreq. | string | رابط صورة عام أو data:image/jpeg;base64,… للترميز base64. |
detail | "auto" | "low" | "high" | مستوى تفصيل التحليل (GPT فقط). "auto" افتراضيًا. "high" — رموز أكثر، جودة أفضل. |