DeepSeek 网摘deepseek.wang

Tutorials · 2026-10-06

Tutorial: Calling V4.1-Flash Native Vision with Python

V4.1-Flash vision goes through the standard chat API. Python example:

from openai import OpenAI
client = OpenAI(api_key="...", base_url="https://api.deepseek.com/v1")
resp = client.chat.completions.create(
    model="deepseek-flash",
    messages=[{"role": "user", "content": [
        {"type": "text", "text": "What does this chart show?"},
        {"type": "image_url", "image_url": {"url": "https://example.com/chart.png"}},
    ]}],
)