视频+文本输入
POST
https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions
视频文件中的视觉信息与音频信息会分开计费。
当前只支持以流式输出的方式进行调用。
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions' \
--header 'Authorization: Bearer {{DASHSCOPE_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "qwen-omni-turbo",
"messages": [
{
"role": "user",
"content": [
{
"type": "video",
"video": [
"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20241108/xzsgiz/football1.jpg",
"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20241108/tdescd/football2.jpg",
"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20241108/zefdja/football3.jpg",
"https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20241108/aedbqh/football4.jpg"
]
},
{
"type": "text",
"text": "描述这个视频的具体过程"
}
]
}
],
"stream": true,
"stream_options": {
"include_usage": true
},
"modalities": ["text"]
}'
响应示例响应示例
{}
请求参数
Header 参数
Authorization
string
必需
示例值:
Bearer {{DASHSCOPE_API_KEY}}
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
返回响应
修改于 2025-02-28 11:08:46