Basic Setup
First, install the OpenAI Python client:Image Understanding Example
Here’s how to use the DashScope API with an OpenAI-compatible client:Key Features
- OpenAI-Compatible API: Use familiar OpenAI client patterns
- Multi-Modal Support: Send images via URLs with
image_urltype - Model Selection: Choose from available Qwen3-VL model sizes
- Flexible Content: Combine text and images in a single request
API Configuration
- Base URL:
https://dashscope.aliyuncs.com/compatible-mode/v1 - Authentication: Use your DashScope API key
- Available Models:
qwen3-vl-235b-a22b-instructand other Qwen3-VL variants