提交 HiDream-O1-Video-1.0 视频生成任务
1. 接口地址
/api/maas/gw/v1/videos/generations
2. 请求方式
POST
3. 请求参数
Header
| 参数 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| Authorization | string | 是 | Bearer API Key,例如 Bearer sk-xxxxxxxx |
| Content-Type | string | 是 | application/json |
Body
| 参数 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| model_id | string | 是 | - | 固定值:HiDream-O1-Video-1.0 |
| image | string | 是 | - | 参考图像,支持可公开访问的 URL 或不带 Data URL 前缀的 Base64 编码;文件大小范围为 40 KB–20 MB |
| prompt | string | 否 | "" |
正向提示词 |
| force_10s | boolean | 否 | false |
是否强制生成 10 秒视频 |
| request_id | string | 否 | "" |
客户端自定义请求 ID |
4. 请求示例
curl --request POST 'https://hiharness.hidreamai.com/api/maas/gw/v1/videos/generations' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model_id": "HiDream-O1-Video-1.0",
"image": "https://example.com/input.png",
"prompt": "The subject turns toward the camera, with gentle cinematic motion",
"negative_prompt": "blur, distortion",
"request_id": "my-video-task-001"
}'
5. 返回参数
| 参数 | 类型 | 说明 |
|---|---|---|
| code | integer | 状态码,0 表示请求成功 |
| message | string | 响应信息 |
| request_id | string | 请求的唯一标识 |
| result | object | 提交结果 |
| result.task_id | string | 任务 ID,用于查询生成结果 |
6. 返回示例
{
"code": 0,
"message": "Success",
"request_id": "8f66fdf3-7c22-4f85-94d1-6b26170f6789",
"result": {
"task_id": "7aa15e3d-dcd6-4c27-9378-87ec97b2fbce"
}
}