アリババの最新AIモデルは、Qwen-VLを基盤に訓練されたOCR認識の大型モデルです。統一されたモデルを通じて、さまざまな画像とテキストの認識、解析、処理といったタスクを統合し、強力な画像とテキストの認識能力を提供します。 Request
Body Params application/json
{
"model": "qwen-vl-ocr",
"messages": [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://download.ydstatic.com/ead/zhiyun/guanwang_cdn_2019/images/p-ocr/cookbook100K.jpg"
}
},
{
"type": "text",
"text": "提取图片的文字"
}
]
}
]
}
Request Code Samples
curl --location --request POST 'https://api.302.ai/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "qwen-vl-ocr",
"messages": [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "https://download.ydstatic.com/ead/zhiyun/guanwang_cdn_2019/images/p-ocr/cookbook100K.jpg"
}
},
{
"type": "text",
"text": "提取图片的文字"
}
]
}
]
}'
Responses
application/json {
"choices": [
{
"message": {
"content": "洗净的鸡胸肉切片,再改切成丝。\n鸡丝盛入碗中。\n加入盐、鸡粉、水淀粉,拌匀。\n加少许食用油,腌渍10分钟。\n锅中加入适量清水烧开,放入碱水面搅拌,煮2分钟。\n把煮好的面条捞出,放入碗中备用。\n锅中加入少许清水,加入上汤煮沸。\n放入鸡肉丝,加盐、鸡粉。\n放入生菜,煮熟夹出放在面条上。\n加入鸡丝和汤汁即可。",
"role": "assistant"
},
"finish_reason": "stop",
"index": 0,
"logprobs": null
}
],
"object": "chat.completion",
"usage": {
"prompt_tokens": 412,
"completion_tokens": 115,
"total_tokens": 527,
"prompt_tokens_details": {
"image_tokens": 401,
"text_tokens": 11
},
"completion_tokens_details": {
"text_tokens": 115
}
},
"created": 1769410485,
"system_fingerprint": null,
"model": "qwen-vl-ocr",
"id": "chatcmpl-bee30970-9696-98ef-97b9-e92bbe5e56c7"
}
Modified at 2026-01-26 06:54:57