Use 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,...
文档
Alibaba Cloud AI Multimodal Qwen OCR
试用Use when OCR-specialized extraction is needed with Alibaba Cloud Model Studio Qwen OCR models (`qwen-vl-ocr`, `qwen-vl-ocr-latest`, and snapshots), including...
它能做什么
Use when OCR-specialized extraction is needed with Alibaba Cloud Model Studio Qwen OCR models (`qwen-vl-ocr`, `qwen-vl-ocr-latest`, and snapshots), including...
技能文档
Category: provider
Model Studio Qwen OCR
Validation
mkdir -p output/aliyun-qwen-ocr
python -m py_compile skills/ai/multimodal/aliyun-qwen-ocr/scripts/prepare_ocr_request.py && echo "py_compile_ok" > output/aliyun-qwen-ocr/validate.txt
Pass criteria: command exits 0 and output/aliyun-qwen-ocr/validate.txt is generated.
Output And Evidence
- Save request payloads, selected OCR task name, and normalized output expectations under
output/aliyun-qwen-ocr/. - Keep the exact model, image source, and task configuration with each saved run.
Use Qwen OCR when the task is primarily text extraction or document structure parsing rather than broad visual reasoning.
Critical model names
Use one of these exact model strings:
qwen-vl-ocrqwen-vl-ocr-latestqwen-vl-ocr-2025-11-20qwen-vl-ocr-2025-08-28qwen-vl-ocr-2025-04-13qwen-vl-ocr-2024-10-28
Selection guidance:
- Use
qwen-vl-ocrfor the stable channel. - Use
qwen-vl-ocr-latestonly when you explicitly want the newest OCR behavior. - Pin
qwen-vl-ocr-2025-11-20when you need reproducible document parsing based on the Qwen3-VL OCR upgrade.
Prerequisites
- Install dependencies (recommended in a venv):
python3 -m venv .venv
. .venv/bin/activate
python -m pip install requests
- Set
DASHSCOPE_API_KEYin environment, or adddashscope_api_keyto~/.alibabacloud/credentials.
Normalized interface (ocr.extract)
Request
image(string, required): HTTPS URL, local path, ordata:URL.model(string, optional): defaultqwen-vl-ocr.prompt(string, optional): use when you want custom extraction instructions.task(string, optional): built-in OCR task.task_config(object, optional): configuration for built-in task such as extraction fields.enable_rotate(bool, optional): defaultfalse.min_pixels(int, optional)max_pixels(int, optional)max_tokens(int, optional)temperature(float, optional): recommended to keep near default/low values.
Response
text(string): extracted text or structured markdown/html-style output.model(string)usage(object, optional)
Built-in OCR tasks
Use one of these values in task:
text_recognitionkey_information_extractiondocument_parsingtable_parsingformula_recognitionmulti_lanadvanced_recognition
Quick start
Custom prompt:
python skills/ai/multimodal/aliyun-qwen-ocr/scripts/prepare_ocr_request.py \
--image "https://example.com/invoice.png" \
--prompt "Extract seller name, invoice date, amount, and tax number in JSON."
Built-in task:
python skills/ai/multimodal/aliyun-qwen-ocr/scripts/prepare_ocr_request.py \
--image "https://example.com/table.png" \
--task table_parsing \
--model qwen-vl-ocr-2025-11-20
Operational guidance
- Prefer built-in OCR tasks for standard parsing jobs because they use official task prompts.
- For critical business fields, add downstream validation rules after OCR.
qwen-vl-ocrand older snapshots default to4096max output tokens unless higher limits are approved by Alibaba Cloud;qwen-vl-ocr-2025-11-20follows the model maximum.- Increase
max_pixelsonly when small text is missed; this raises token cost.
Output location
- Default output:
output/aliyun-qwen-ocr/request.json - Override base dir with
OUTPUT_DIR.
References
references/api_reference.mdreferences/sources.md
相关技能
Use when multimodal embeddings are needed from Alibaba Cloud Model Studio models such as `qwen3-vl-embedding` for image, video, and text retrieval, cross-mod...
Use when generating or reasoning over text with Alibaba Cloud Model Studio Qwen flagship text models (`qwen3-max`, `qwen3.5-plus`, `qwen3.5-flash`, snapshots...
Use when a task needs Alibaba Cloud Model Studio Qwen Deep Research models to plan multi-step investigation, run iterative web research, and produce structur...
Use when visual reasoning is needed with Alibaba Cloud Model Studio QVQ models, including step-by-step image reasoning, chart analysis, and visually grounded...
Use when tasks require all-in-one multimodal understanding or generation with Alibaba Cloud Model Studio Qwen Omni models, including image-plus-audio interac...