$npx -y skills add cinience/alicloud-skills --skill aliyun-qwen-vlUse when understanding images with Alibaba Cloud Model Studio Qwen VL models (qwen3-vl-plus/qwen3-vl-flash and latest aliases). Use when building image Q&A, visual analysis, OCR-like extraction, chart/table reading, or screenshot understanding workflows.
| 1 | Category: provider |
| 2 | |
| 3 | # Model Studio Qwen VL (Image Understanding) |
| 4 | |
| 5 | ## Validation |
| 6 | |
| 7 | ```bash |
| 8 | mkdir -p output/aliyun-qwen-vl |
| 9 | python -m py_compile skills/ai/multimodal/aliyun-qwen-vl/scripts/analyze_image.py && echo "py_compile_ok" > output/aliyun-qwen-vl/validate.txt |
| 10 | ``` |
| 11 | |
| 12 | Pass criteria: command exits 0 and `output/aliyun-qwen-vl/validate.txt` is generated. |
| 13 | |
| 14 | ## Output And Evidence |
| 15 | |
| 16 | - Save raw model responses and normalized extraction results to `output/aliyun-qwen-vl/`. |
| 17 | - Include input image reference and prompt for traceability. |
| 18 | |
| 19 | Use Qwen VL models for image input + text output understanding tasks via DashScope compatible-mode API. |
| 20 | |
| 21 | ## Prerequisites |
| 22 | |
| 23 | - Install dependencies (recommended in a venv): |
| 24 | |
| 25 | ```bash |
| 26 | python3 -m venv .venv |
| 27 | . .venv/bin/activate |
| 28 | python -m pip install requests |
| 29 | ``` |
| 30 | |
| 31 | - Set `DASHSCOPE_API_KEY` in environment, or add `dashscope_api_key` to `~/.alibabacloud/credentials`. |
| 32 | |
| 33 | ## Critical model names |
| 34 | |
| 35 | Prefer the Qwen3 VL family: |
| 36 | - `qwen3-vl-plus` |
| 37 | - `qwen3-vl-flash` |
| 38 | |
| 39 | When you need explicit "latest" routing or reproducible snapshots, use supported aliases/snapshots from the official model list, such as: |
| 40 | - `qwen3-vl-plus-latest` |
| 41 | - `qwen3-vl-plus-2025-12-19` |
| 42 | - `qwen3-vl-flash-2026-01-22` |
| 43 | - `qwen3-vl-flash-latest` |
| 44 | |
| 45 | Legacy names still seen in some workloads: |
| 46 | - `qwen-vl-max-latest` |
| 47 | - `qwen-vl-plus-latest` |
| 48 | |
| 49 | For OCR-specialized extraction, prefer `skills/ai/multimodal/aliyun-qwen-ocr/` instead of using the general VL skill. |
| 50 | |
| 51 | ## Normalized interface (multimodal.chat) |
| 52 | |
| 53 | ### Request |
| 54 | |
| 55 | - `prompt` (string, required): user question/instruction about image. |
| 56 | - `image` (string, required): HTTPS URL, local path, or `data:` URL. |
| 57 | - `model` (string, optional): default `qwen3-vl-plus`. |
| 58 | - `max_tokens` (int, optional): default `512`. |
| 59 | - `temperature` (float, optional): default `0.2`. |
| 60 | - `detail` (string, optional): `auto`/`low`/`high`, default `auto`. |
| 61 | - `json_mode` (bool, optional): return JSON-only response when possible. |
| 62 | - `schema` (object, optional): JSON Schema for structured extraction. |
| 63 | - `max_retries` (int, optional): retry count for `429/5xx`, default `2`. |
| 64 | - `retry_backoff_s` (float, optional): exponential backoff base seconds, default `1.5`. |
| 65 | |
| 66 | ### Response |
| 67 | |
| 68 | - `text` (string): primary model answer. |
| 69 | - `model` (string): model actually used. |
| 70 | - `usage` (object): token usage if returned by backend. |
| 71 | |
| 72 | ## Quickstart |
| 73 | |
| 74 | ```bash |
| 75 | python skills/ai/multimodal/aliyun-qwen-vl/scripts/analyze_image.py \ |
| 76 | --request '{"prompt":"Summarize the main content in this image","image":"https://example.com/demo.jpg"}' \ |
| 77 | --print-response |
| 78 | ``` |
| 79 | |
| 80 | Using local image: |
| 81 | |
| 82 | ```bash |
| 83 | python skills/ai/multimodal/aliyun-qwen-vl/scripts/analyze_image.py \ |
| 84 | --request '{"prompt":"Extract key information from the image","image":"./samples/invoice.png","model":"qwen3-vl-plus"}' \ |
| 85 | --print-response |
| 86 | ``` |
| 87 | |
| 88 | Structured extraction (JSON mode): |
| 89 | |
| 90 | ```bash |
| 91 | python skills/ai/multimodal/aliyun-qwen-vl/scripts/analyze_image.py \ |
| 92 | --request '{"prompt":"Extract fields: title, amount, date","image":"./samples/invoice.png"}' \ |
| 93 | --json-mode \ |
| 94 | --print-response |
| 95 | ``` |
| 96 | |
| 97 | Structured extraction (JSON Schema): |
| 98 | |
| 99 | ```bash |
| 100 | python skills/ai/multimodal/aliyun-qwen-vl/scripts/analyze_image.py \ |
| 101 | --request '{"prompt":"Extract invoice fields","image":"./samples/invoice.png"}' \ |
| 102 | --schema skills/ai/multimodal/aliyun-qwen-vl/references/examples/invoice.schema.json \ |
| 103 | --print-response |
| 104 | ``` |
| 105 | |
| 106 | ## cURL (compatible mode) |
| 107 | |
| 108 | ```bash |
| 109 | curl -sS https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions \ |
| 110 | -H "Authorization: Bearer $DASHSCOPE_API_KEY" \ |
| 111 | -H "Content-Type: application/json" \ |
| 112 | -d '{ |
| 113 | "model":"qwen3-vl-plus", |
| 114 | "messages":[ |
| 115 | { |
| 116 | "role":"user", |
| 117 | "content":[ |
| 118 | {"type":"image_url","image_url":{"url":"https://example.com/demo.jpg"}}, |
| 119 | {"type":"text","text":"Describe this image and list executable actions"} |
| 120 | ] |
| 121 | } |
| 122 | ], |
| 123 | "max_tokens":512, |
| 124 | "temperature":0.2 |
| 125 | }' |
| 126 | ``` |
| 127 | |
| 128 | ## Output location |
| 129 | |
| 130 | - If `--output` is set, JSON response is saved to that file. |
| 131 | - Default output dir convention: `output/aliyun-qwen-vl/`. |
| 132 | |
| 133 | ## Smoke test |
| 134 | |
| 135 | ```bash |
| 136 | python tests/ai/multimodal/aliyun-qwen-vl-test/scripts/smoke_test_qwen_vl.py \ |
| 137 | --image ./tmp/vl_test_cat.png |
| 138 | ``` |
| 139 | |
| 140 | ## Error handling |
| 141 | |
| 142 | | Error | Likely cause | Action | |
| 143 | | --- | --- | --- | |
| 144 | | 401/403 | Missing or invalid key | Check `DASHSCOPE_API_KEY` and account permissions. | |
| 145 | | 400 | Invalid request schema or unsupported image source | Validate `messages` content and image URL/path format. | |
| 146 | | 429 | Rate limit | Retry with exponential backoff and lower concurrency. | |
| 147 | | 5xx | Temporary backend issue | Retry with backoff and idempotent request design. | |
| 148 | |
| 149 | ## Operational guidance |
| 150 | |
| 151 | - For stable production behavio |