curl --request POST \
--url https://api.dreamto.ai/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "viduq4",
"input": {
"prompt": "女孩微笑着抚摸狐狸,微风,电影感",
"image_url": "https://your-cdn.example.com/first-frame.png",
"resolution": "1080P",
"duration": 5
}
}
'
{
"task_id": "job_02b88886c4fda5be35baff61",
"status": "in_progress",
"model": "viduq4",
"created_at": 1794846663,
"request_id": "req_6a9a539502118ba1c33f1bfc"
}{
"error": {
"code": "invalid_request",
"http_status": 400,
"message": "Invalid request.",
"request_id": "req_6a9a539502118ba1c33f1bfc",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"http_status": 401,
"message": "Invalid API key.",
"request_id": "req_6a9a539502118ba1c33f1bfc",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_balance",
"http_status": 402,
"message": "Insufficient balance.",
"request_id": "req_6a9a539502118ba1c33f1bfc",
"type": "insufficient_balance_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"http_status": 429,
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_6a9a539502118ba1c33f1bfc",
"type": "rate_limit_error"
}
}{
"error": {
"code": "service_unavailable",
"http_status": 502,
"message": "Service temporarily unavailable. Please try again later.",
"request_id": "req_6a9a539502118ba1c33f1bfc",
"type": "api_error"
}
}Vidu Q4 Preview
创建视频生成任务
提交一个异步视频生成任务并立即返回 task_id,视频在后台生成。请求体为 {"model": "...", "input": {...}},所有生成参数都放在 input 中。拿到 task_id 后用 GET /v1/videos/{task_id} 轮询,直到 status 为 completed 或 failed。
POST
/
v1
/
videos
curl --request POST \
--url https://api.dreamto.ai/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "viduq4",
"input": {
"prompt": "女孩微笑着抚摸狐狸,微风,电影感",
"image_url": "https://your-cdn.example.com/first-frame.png",
"resolution": "1080P",
"duration": 5
}
}
'
{
"task_id": "job_02b88886c4fda5be35baff61",
"status": "in_progress",
"model": "viduq4",
"created_at": 1794846663,
"request_id": "req_6a9a539502118ba1c33f1bfc"
}{
"error": {
"code": "invalid_request",
"http_status": 400,
"message": "Invalid request.",
"request_id": "req_6a9a539502118ba1c33f1bfc",
"type": "invalid_request_error"
}
}{
"error": {
"code": "unauthorized",
"http_status": 401,
"message": "Invalid API key.",
"request_id": "req_6a9a539502118ba1c33f1bfc",
"type": "authentication_error"
}
}{
"error": {
"code": "insufficient_balance",
"http_status": 402,
"message": "Insufficient balance.",
"request_id": "req_6a9a539502118ba1c33f1bfc",
"type": "insufficient_balance_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"http_status": 429,
"message": "Rate limit exceeded. Please try again later.",
"request_id": "req_6a9a539502118ba1c33f1bfc",
"type": "rate_limit_error"
}
}{
"error": {
"code": "service_unavailable",
"http_status": 502,
"message": "Service temporarily unavailable. Please try again later.",
"request_id": "req_6a9a539502118ba1c33f1bfc",
"type": "api_error"
}
}请求体
application/json
响应
任务已创建。
创建任务的响应。

