image-understand

Analyze static images for description, OCR, object detection, and classification using z-ai-web-dev-sdk.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Developers need to add visual understanding to backend applications without building custom vision pipelines. This Skill provides ready-to-use patterns for analyzing images, extracting text, detecting objects, and generating descriptions through the z-ai-web-dev-sdk vision API. ## Core Features & Use Cases - Image Analysis & Description: Describe scenes, detect and count objects, classify images, and assess quality for PNG, JPEG, GIF, WebP, and BMP files. - OCR & Text Extraction: Extract text from receipts, business cards, and documents with optional layout preservation. - Accessibility & Cataloging: Generate alt text for screen readers and auto-tag image libraries with structured JSON output. - Use Case: Build an Express.js endpoint that accepts an uploaded product photo, converts it to base64, and returns an e-commerce listing description generated by the vision model. ## Quick Start Ask the AI to analyze an image at a given URL or local path using the z-ai vision CLI or the createVision SDK method with a descriptive prompt.

Frequently Asked Questions about image-understand

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

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

Call zai.chat.completions.createVision with a messages array containing a text prompt and an image_url content entry. The image can be a public URL or a base64 data URI, and the response text is returned in response.choices[0].message.content.

How to extract text from images using OCR in JavaScript?

Send the image to the createVision endpoint with a prompt like 'Extract all text from this image, preserving layout and formatting.' Base64 encoding of local files is recommended for better performance and reliability.

What image formats does z-ai vision support?

The vision API supports PNG, JPEG, GIF, WebP, and BMP formats. PNG works best for diagrams and screenshots, while JPEG suits photos. Both remote URLs and base64 data URIs are accepted.

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

No, the SDK must be used in backend code only. Importing it in client-side code will fail and risks exposing credentials. Use server endpoints such as Express routes or Next.js API handlers instead.

Why is object counting inaccurate in my image analysis?

Complex counting tasks benefit from enabling thinking mode by setting thinking: { type: 'enabled' } in the request. Also use high-resolution images and specific prompts naming the object type to count.

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

Use the z-ai vision CLI for quick one-off descriptions, testing, and simple batch scripts. Use the SDK for multi-turn conversations, production error handling, and custom integration with application logic.