Visual Q&A (VQA)
Give an image and a question — the model "reads" the image and answers. OpenAI vision format — the image is embedded as an image_url content block inside the chat completion.
Available models
| Model | Note |
|---|---|
spook-vision (recommended, local) | Multimodal, fast, GPU-backed |
gpt-4o | Via OpenAI — top quality, higher cost |
claude-3-5-sonnet | Via Anthropic |
curl
bash
curl https://app.qevron.ai/v1/chat/completions \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{
"model": "spook-vision",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "What is in this image?"},
{"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}}
]
}]
}'Python (openai SDK)
python
import base64
from openai import OpenAI
client = OpenAI(api_key="sk-...", base_url="https://app.qevron.ai/v1")
with open("photo.jpg", "rb") as f:
b64 = base64.b64encode(f.read()).decode()
resp = client.chat.completions.create(
model="spook-vision",
messages=[{
"role": "user",
"content": [
{"type": "text", "text": "How many people are in this photo and what are they doing?"},
{"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{b64}"}},
],
}],
)
print(resp.choices[0].message.content)URL works too:
python
{"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}Size limits
- Maximum payload: 50 MB (data URL + JSON, whole body).
- Recommended: client-side downscale to 1280 px max width + JPEG quality 0.85 → ~150–300 KB.
- Larger images may hit a 413 at the ingress (nginx/Caddy).
Which model for vision?
| Need | Model |
|---|---|
| "What's in this image?" — general description | spook-vision |
| Detailed analysis / reasoning | gpt-4o (needs OpenAI key) |
| Extracting text from image (OCR) | spook-ocr — dedicated endpoint, OCR page |
| Bounding boxes / object counts | spook-detect — dedicated endpoint, Detect page |
Troubleshooting
- "413 Request Entity Too Large" → image too big. Downscale + compress client-side.
- "image format not supported" → use
data:image/png;base64,...ordata:image/jpeg;base64,...prefix. - Wrong answer → ask more specifically. "What's in the image?" is vague; "How many dogs?" is much more reliable.
Next: OCR · Object detection