Multimodal Understanding
Analyze images via NoDesk AI Gateway. The API is OpenAI Vision-compatible.
Gateway & Auth
- Endpoint:
POST https://llm-gateway-api.nodesk.tech/deskclaw/v1/multimodal/ - Auth: auto from
~/.deskclaw/nanobot/config.jsonproviders.custom.api_base(extracts/ep/{TOKEN}). If user overrides custom provider, falls back to~/.deskclaw/deskclaw-settings.jsonsettings.gatewayConfig(always preserved by client). No manual API key needed.
Models
| model | Name | Base64 | URL | Notes |
|---|---|---|---|---|
kimi-k2.5 |
月之暗面 Kimi K2.5 | ✅ | ❌ | 262K context, recommended default |
glm-5v-turbo |
智谱 GLM-5V Turbo | ✅ | ✅ | Fast, supports image URL directly |
Routing rules (the script handles this automatically):
--filemode (local image → base64) → defaultkimi-k2.5--urlmode (image URL) → first tryglm-5v-turbo; if 1210 error, auto-fallback to download → compress → base64 →kimi-k2.5
Workflow
Local file (most common)
When the user provides a local file path (e.g. /Users/.../photo.jpg, ~/Desktop/img.png):
python3 <skill_dir>/scripts/multimodal-call.py --file '<image_path>' '<user_prompt>' [max_tokens] [model]
The script auto-compresses large images (>500 KB), base64-encodes, and sends. No manual conversion needed.
Image URL
When the user provides a public image URL (e.g. https://example.com/photo.jpg):
python3 <skill_dir>/scripts/multimodal-call.py --url '<image_url>' '<user_prompt>' [max_tokens] [model]
Auto-selects glm-5v-turbo. If glm-5v-turbo returns image parsing error (code 1210), the script automatically falls back: download image → compress if >500 KB → base64 → retry with kimi-k2.5.
Parameters
max_tokens: default 1500. Use 300 for short descriptions, 2000+ for OCR / detailed analysis.model: defaultkimi-k2.5for--file,glm-5v-turbofor--url.
Present results
Extract choices[0].message.content from the JSON response and show it directly to the user.
Error Handling
| HTTP Status | Meaning | Action |
|---|---|---|
| 401 / 403 | Auth failed | Check config.json providers.custom.api_base |
| 429 | Quota exceeded or rate limited | Tell user to check quota on gateway dashboard |
| Timeout | Image too large or gateway busy | Retry once; if still failing, tell user |
Rules
- Local file path → use
--filemode. - Image URL → use
--urlmode. URL must be publicly accessible. - Do NOT
read_fileorlsthe scripts — justexec()them. - Do NOT write custom
curlorpythonto call the API — always usemultimodal-call.py. - Each image costs ~200–800 prompt tokens. Multimodal and LLM chat share the same token quota.