VLM

Implement vision-based chat that analyzes images, videos, and documents using the z-ai-web-dev-sdk.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/tmtgroupbot/lptracker-deploy --skill vlm-tmtgroupbot
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: VLM
Source: https://github.com/tmtgroupbot/lptracker-deploy/tree/main/skills/VLM
Command: npx skills add https://github.com/tmtgroupbot/lptracker-deploy --skill vlm-tmtgroupbot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires z-ai-web-dev-sdk, and includes scripts (resource) components.

What problem does it solve? Building applications that understand visual content requires wiring up multimodal AI APIs correctly. This Skill provides ready-to-use patterns for sending images, videos, and documents to a vision language model and getting natural language answers back, covering both quick CLI tasks and full SDK integrations. ## Core Features & Use Cases - Image Analysis via CLI or SDK: Describe, compare, and extract text from images using the z-ai CLI or the createVision API with URLs or base64-encoded files. - Multi-Modal Content Support: Send image_url, video_url, and file_url content types in a single message, including multi-image comparisons and multi-turn conversational sessions. - Use Case: Build an Express.js endpoint that accepts an image URL and a question, then returns a structured analysis such as product descriptions, OCR text extraction, or image classification tags as JSON. ## Quick Start Ask the AI to analyze an image by providing an image URL and a question, for example: describe what is in this photo at https://example.com/photo.jpg using the vision chat skill.

Frequently Asked Questions about VLM

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze an image with the z-ai-web-dev-sdk?▼

Create a ZAI instance with ZAI.create(), then call zai.chat.completions.createVision with a message containing a text part and an image_url part. The response content is available at response.choices[0].message.content.

How to pass a local image file to a vision model in JavaScript?▼

Read the file with fs.readFileSync, convert the buffer to base64, and embed it as a data URL like data:image/png;base64,... in the image_url field. Base64 encoding is recommended over URLs for better performance and reliability.

Can I use z-ai-web-dev-sdk in client-side browser code?▼

No, the z-ai-web-dev-sdk must be used in backend code only. Importing it in client-side code will fail and risks exposing credentials, so always call it from server-side endpoints such as an Express.js API route.

What image formats does the vision chat API support?▼

The CLI supports PNG, JPEG, GIF, WebP, and BMP formats. The SDK also accepts video files via video_url and document files like PDF and DOCX via file_url, and multiple content types can be combined in one message.

When should I use the z-ai CLI versus the SDK for vision tasks?▼

Use the z-ai vision CLI for quick one-off image descriptions, testing, and simple automation. Use the SDK for multi-turn conversations, dynamic analysis in applications, batch processing, and production workflows requiring custom logic.

Why is my vision analysis returning poor quality results?▼

Poor results usually come from low-quality images or vague prompts. Use high-resolution images, be specific about what information you need, and structure complex requests with numbered lists or context about the image type.