Multi-Modal AI: Vision and Image Understanding

Build Vision-Enabled Applications with Chinese Models (2026)

Vision Multi-Modal Image AI

Multi-modal AI models can see, understand, and reason about images. From analyzing screenshots and charts to reading documents and identifying objects, vision capabilities unlock entirely new categories of AI applications. This guide covers vision-enabled Chinese AI models and how to use them through TokenEase.

Chinese Multi-Modal Model Landscape

ModelVision CapabilitiesImage SizeBest For
deepseek DeepSeek-V4-VLImage understanding, OCR, chartsUp to 4KComplex visual reasoning
zhipu GLM-4VImage description, document readingUp to 8KChinese document analysis
qwen Qwen-VL-PlusObject detection, visual QAUp to 4KGeneral vision tasks
kimi Kimi-VLLong-image understandingUp to 16KMulti-page documents
Important: Vision models accept images as base64-encoded strings in the messages array. The format is identical across all providers when using TokenEase's unified API.

Image Input Format

All vision models use the same OpenAI-compatible format for images:

import base64

def encode_image(image_path):
    with open(image_path, "rb") as f:
        return base64.b64encode(f.read()).decode("utf-8")

# Build message with image
messages = [
    {
        "role": "user",
        "content": [
            {"type": "text", "text": "Describe this image in detail."},
            {
                "type": "image_url",
                "image_url": {
                    "url": f"data:image/jpeg;base64,{encode_image('photo.jpg')}"
                }
            }
        ]
    }
]

Use Case 1: Image Description and Captioning

import requests

API_KEY = "your-tokenease-api-key"
BASE_URL = "https://tokenease.io/v1"

def describe_image(image_path, model="qwen"):
    base64_image = encode_image(image_path)
    
    response = requests.post(
        f"{BASE_URL}/chat/completions",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={
            "model": model,
            "messages": [
                {
                    "role": "user",
                    "content": [
                        {"type": "text", "text": "请详细描述这张图片,包括场景、人物、物体和氛围。用中文回答。"},
                        {
                            "type": "image_url",
                            "image_url": {"url": f"data:image/jpeg;base64,{base64_image}"}
                        }
                    ]
                }
            ],
            "max_tokens": 500
        }
    )
    
    return response.json()["choices"][0]["message"]["content"]

# Usage
description = describe_image("beijing_street.jpg", model="zhipu")
print(description)

Use Case 2: OCR and Document Reading

Extract text from images, receipts, forms, and scanned documents:

def extract_text_from_image(image_path, model="qwen"):
    base64_image = encode_image(image_path)
    
    response = requests.post(
        f"{BASE_URL}/chat/completions",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={
            "model": model,
            "messages": [
                {
                    "role": "user",
                    "content": [
                        {"type": "text", "text": "请提取图片中的所有文字,保持原有格式和布局。只输出文字内容,不要添加解释。"},
                        {
                            "type": "image_url",
                            "image_url": {"url": f"data:image/jpeg;base64,{base64_image}"}
                        }
                    ]
                }
            ],
            "max_tokens": 1000
        }
    )
    
    return response.json()["choices"][0]["message"]["content"]

# Extract text from invoice, receipt, or form
invoice_text = extract_text_from_image("invoice.jpg", model="deepseek")
print(invoice_text)

Use Case 3: Chart and Graph Analysis

Let AI read and interpret data visualizations:

def analyze_chart(image_path, model="deepseek"):
    base64_image = encode_image(image_path)
    
    response = requests.post(
        f"{BASE_URL}/chat/completions",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={
            "model": model,
            "messages": [
                {
                    "role": "user",
                    "content": [
                        {"type": "text", "text": """分析这张图表,请提供:
1. 图表类型和主题
2. 关键数据点
3. 趋势分析
4. 数据洞察和建议

用中文回答。"""},
                        {
                            "type": "image_url",
                            "image_url": {"url": f"data:image/png;base64,{base64_image}"}
                        }
                    ]
                }
            ],
            "max_tokens": 800
        }
    )
    
    return response.json()["choices"][0]["message"]["content"]

# Analyze sales chart, stock chart, or survey results
analysis = analyze_chart("sales_chart.png", model="deepseek")

Use Case 4: Visual Question Answering

def visual_qa(image_path, question, model="qwen"):
    base64_image = encode_image(image_path)
    
    response = requests.post(
        f"{BASE_URL}/chat/completions",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={
            "model": model,
            "messages": [
                {
                    "role": "user",
                    "content": [
                        {"type": "text", "text": question},
                        {
                            "type": "image_url",
                            "image_url": {"url": f"data:image/jpeg;base64,{base64_image}"}
                        }
                    ]
                }
            ],
            "max_tokens": 300
        }
    )
    
    return response.json()["choices"][0]["message"]["content"]

# Examples
print(visual_qa("product.jpg", "这个产品的颜色是什么?"))
print(visual_qa("menu.jpg", "这份菜单里有哪些川菜?"))
print(visual_qa("screenshot.jpg", "这个页面有哪些按钮?"))

Use Case 5: Multi-Image Comparison

Send multiple images in a single request for comparison:

def compare_images(image_paths, model="deepseek"):
    content = [{"type": "text", "text": "比较以下图片,说明它们的相似之处和不同之处。用中文回答。"}]
    
    for path in image_paths:
        base64_image = encode_image(path)
        content.append({
            "type": "image_url",
            "image_url": {"url": f"data:image/jpeg;base64,{base64_image}"}
        })
    
    response = requests.post(
        f"{BASE_URL}/chat/completions",
        headers={"Authorization": f"Bearer {API_KEY}"},
        json={
            "model": model,
            "messages": [{"role": "user", "content": content}],
            "max_tokens": 600
        }
    )
    
    return response.json()["choices"][0]["message"]["content"]

# Compare product variations or design iterations
comparison = compare_images(["design_v1.jpg", "design_v2.jpg"], model="deepseek")

Image Preprocessing for Better Results

Handling Image URLs vs. Base64

You can also pass image URLs instead of base64:

messages = [
    {
        "role": "user",
        "content": [
            {"type": "text", "text": "Describe this image."},
            {
                "type": "image_url",
                "image_url": {"url": "https://example.com/image.jpg"}
            }
        ]
    }
]

# Note: The URL must be publicly accessible.
# For private images, use base64 encoding.

Cost Considerations

ModelImage InputText OutputTypical Cost/Image
Qwen-VL-Plus~$0.001-0.003~$0.001/1K tokens~$0.002-0.005
GLM-4V~$0.002-0.005~$0.002/1K tokens~$0.004-0.010
DeepSeek-V4-VL~$0.002-0.004~$0.002/1K tokens~$0.004-0.008
TokenEase Tip: Vision API pricing varies by image resolution (higher res = more tokens). For cost-sensitive applications, resize images to 512x512 before sending. The quality difference is minimal for most tasks.

Production Patterns

Batch Image Processing

from concurrent.futures import ThreadPoolExecutor

def process_image_batch(image_paths, prompt, model="qwen", max_workers=5):
    def process_one(path):
        return {
            "path": path,
            "result": visual_qa(path, prompt, model)
        }
    
    with ThreadPoolExecutor(max_workers=max_workers) as executor:
        results = list(executor.map(process_one, image_paths))
    
    return results

# Process 100 product images
results = process_image_batch(
    product_images,
    "提取产品名称、价格和主要特性",
    model="qwen",
    max_workers=5
)

Conclusion

Vision-enabled AI opens doors to applications that were impossible with text-only models. Invoice processing, quality inspection, visual search, accessibility tools — the use cases are endless.

Start with simple image description and OCR. Progress to chart analysis and visual QA. For production, preprocess images (resize, crop, ensure contrast) and batch process for efficiency. With TokenEase, switching between Qwen-VL, GLM-4V, and DeepSeek-V4-VL is a one-line change.

Build Vision-Enabled AI Apps

Get $1 free API credit to test vision capabilities with Chinese multi-modal models.

Start Building