curl --request POST \
--url https://api.dreamto.ai/v2/video_generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "史诗级太空歌剧预告:女舰长独自站在巨大的观景窗前,最后一支舰队集结后跃迁离去,强光爆闪,舰桥震动。"
}
],
"resolution": "2K",
"duration": 5,
"ratio": "16:9"
}
'{
"task_id": "task_7Rk2mQ9vXc4LpT8nWb3sYh6dZf1aGe5J"
}{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "invalid params, content must include a non-empty text item (prompt is required) (2013)",
"http_code": "400"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "authorized_error",
"message": "login fail: Please carry the API secret key in the 'Authorization' field of the request header (1004)",
"http_code": "401"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "insufficient_balance_error",
"message": "insufficient balance (1008)",
"http_code": "402"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "unprocessable_entity_error",
"message": "video description contains sensitive content (1026)",
"http_code": "422"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "rate_limit_error",
"message": "rate limit, please retry later (1002)",
"http_code": "429"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "server_error",
"message": "internal error (1000)",
"http_code": "500"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "overloaded_error",
"message": "the service is overloaded, please retry later (1000)",
"http_code": "529"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}MiniMax H3
创建视频生成任务
创建异步视频生成任务,支持文生视频、图生视频(首帧 / 尾帧 / 首尾帧)和多模态参考生视频。成功返回 task_id,再调用查询任务获取结果。参数错误返回 400,不建任务、不扣费;任务失败不扣费。
POST
/
v2
/
video_generation
curl --request POST \
--url https://api.dreamto.ai/v2/video_generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-H3",
"content": [
{
"type": "text",
"text": "史诗级太空歌剧预告:女舰长独自站在巨大的观景窗前,最后一支舰队集结后跃迁离去,强光爆闪,舰桥震动。"
}
],
"resolution": "2K",
"duration": 5,
"ratio": "16:9"
}
'{
"task_id": "task_7Rk2mQ9vXc4LpT8nWb3sYh6dZf1aGe5J"
}{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "invalid params, content must include a non-empty text item (prompt is required) (2013)",
"http_code": "400"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "authorized_error",
"message": "login fail: Please carry the API secret key in the 'Authorization' field of the request header (1004)",
"http_code": "401"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "insufficient_balance_error",
"message": "insufficient balance (1008)",
"http_code": "402"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "unprocessable_entity_error",
"message": "video description contains sensitive content (1026)",
"http_code": "422"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "rate_limit_error",
"message": "rate limit, please retry later (1002)",
"http_code": "429"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "server_error",
"message": "internal error (1000)",
"http_code": "500"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}{
"type": "error",
"error": {
"type": "overloaded_error",
"message": "the service is overloaded, please retry later (1000)",
"http_code": "529"
},
"request_id": "20261205112532258615475826d9d6AbCdEfGh"
}请求体
application/json
创建视频生成任务的请求体。

