| 项目 | 内容 |
|---|---|
| Base URL | https://llm.ai-nebula.com |
| 认证方式 | API Key (Token) |
| 请求头 | Authorization: Bearer sk-xxxx |
| Content-Type | application/json |
| 任务模式 | 异步任务(提交任务 → 轮询状态) |
wan2.5-i2v-preview - 图生视频预览版POST /v1/video/generationsAuthorization: Bearer sk-xxxx
Content-Type: application/json| 参数名 | 类型 | 必填 | 说明 | 示例值 |
|---|---|---|---|---|
model | string | 是 | 模型名称 | "wan2.5-i2v-preview" |
prompt | string | 是 | 视频生成提示词(描述画面动作和场景) | "小猫缓缓睁开眼睛,耳朵轻轻抖动" |
image | string | 是 | 输入图片(支持 HTTPS URL 或 base64 格式) | "https://example.com/cat.jpg" |
duration | int | 否 | 视频时长(秒),支持:5、10,默认:5 | 5 |
resolution | string | 否 | 视频分辨率,支持:"480p"、"720p"、"1080p",默认:"720p" | "720p" |
smart_rewrite | bool | 否 | 是否启用智能提示词扩写,默认:false | true |
generate_audio | bool | 否 | 是否生成与画面同步的音频,默认:false | true |
audio_url | string | 否 | 自定义音频文件URL(HTTPS格式) | "https://example.com/audio.mp3" |
seed | int | 否 | 随机种子(用于复现结果),范围:0-2147483647 | 12345 |
{
"task_id": "ae8eb420-8aa6-440a-8eb8-1d1afe8d5e97",
"status": "submitted",
"format": "mp4",
"metadata": {
"model_price": 0.0738,
"requested_seconds": 5,
"billing_pending": true,
"group_ratio": 1,
"token_name": "nebula-video-generations-default",
"output": {
"task_id": "ae8eb420-8aa6-440a-8eb8-1d1afe8d5e97",
"task_status": "PENDING"
},
"request_id": "b356ad62-d35f-4f4b-9a6d-0787f6966a68"
}
}| 字段名 | 类型 | 说明 |
|---|---|---|
task_id | string | 任务ID,用于后续查询任务状态 |
status | string | 任务状态,初始值为 "submitted" |
format | string | 视频格式,固定为 "mp4" |
metadata | object | 元数据信息(计费、原始响应等) |
GET /v1/video/generations/{task_id}Authorization: Bearer sk-xxxx| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
task_id | string | 是 | 任务ID(从提交任务的响应中获取) |
{
"task_id": "ae8eb420-8aa6-440a-8eb8-1d1afe8d5e97",
"status": "in_progress",
"format": "mp4",
"metadata": {
"model_price": 0.0738,
"billing_pending": true,
"output": {
"task_status": "PENDING"
}
}
}{
"task_id": "ae8eb420-8aa6-440a-8eb8-1d1afe8d5e97",
"status": "in_progress",
"format": "mp4",
"metadata": {
"output": {
"task_status": "RUNNING"
}
}
}{
"task_id": "ae8eb420-8aa6-440a-8eb8-1d1afe8d5e97",
"status": "succeeded",
"format": "mp4",
"url": "https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/.../video.mp4?Expires=...",
"metadata": {
"model_price": 0.0738,
"billing_pending": false,
"group_ratio": 1,
"usage": {
"video_count": 1,
"duration": 5,
"resolution": "720p"
},
"output": {
"task_status": "SUCCEEDED",
"video_url": "https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/.../video.mp4",
"submit_time": "2025-11-04 19:15:11.819",
"end_time": "2025-11-04 19:16:40.291"
},
"request_id": "35549d8f-58e7-4c5c-a827-39a2f2d58a2d"
}
}{
"task_id": "ae8eb420-8aa6-440a-8eb8-1d1afe8d5e97",
"status": "failed",
"format": "mp4",
"metadata": {
"output": {
"task_status": "FAILED",
"code": "InvalidParameter.ImageFormat",
"message": "图片格式不支持或格式错误"
}
}
}| 状态值 | 说明 | 进度 |
|---|---|---|
submitted | 任务已提交 | 初始状态 |
in_progress | 任务处理中(包括排队和执行) | 进行中 |
succeeded | 任务成功完成 | 完成 |
failed | 任务失败 | 完成 |
in_progress 时,需要定期轮询(建议每 3-5 秒查询一次)succeeded 时,url 字段包含视频下载地址(带签名,有效期24小时)failed 时,可查看 metadata.output.message 了解失败原因| 值 | 说明 | 计费 |
|---|---|---|
5 | 5秒视频(推荐,默认值) | 按5秒计费 |
10 | 10秒视频 | 按10秒计费 |
5。| 值 | 分辨率 | 价格(美元/秒) | 5秒费用 | 10秒费用 |
|---|---|---|---|---|
"480p" | 480P | $0.0369 | $0.1845 | $0.369 |
"720p" | 720P(默认) | $0.0738 | $0.369 | $0.738 |
"1080p" | 1080P | $0.1233 | $0.6165 | $1.233 |
"https://example.com/image.jpg""http://example.com/image.jpg""data:image/jpeg;base64,/9j/4AAQSkZJRg..."| 值 | 说明 |
|---|---|
true | 启用智能扩写,系统会自动优化和丰富提示词,提升视频质量 |
false | 不启用(默认),严格按照原始提示词生成 |
| 值 | 说明 |
|---|---|
true | 自动生成与画面同步的音频(如环境音、动作音效) |
false | 不生成音频(默认) |
audio_url,generate_audio 会被忽略。费用 = 分辨率价格(美元/秒) × 视频时长(秒) × 组倍率| 分辨率 | 时长 | 单价 | 总费用 | 约合人民币 |
|---|---|---|---|---|
| 480P | 5秒 | $0.0369/秒 | $0.1845 | ¥1.33 |
| 720P | 5秒 | $0.0738/秒 | $0.369 | ¥2.66 |
| 1080P | 5秒 | $0.1233/秒 | $0.6165 | ¥4.44 |
| 480P | 10秒 | $0.0369/秒 | $0.369 | ¥2.66 |
| 720P | 10秒 | $0.0738/秒 | $0.738 | ¥5.32 |
| 1080P | 10秒 | $0.1233/秒 | $1.233 | ¥8.88 |
| HTTP状态码 | 错误代码 | 说明 | 解决方法 |
|---|---|---|---|
| 400 | InvalidParameter.ImageFormat | 图片格式不支持 | 使用 JPEG 或 PNG 格式 |
| 400 | InvalidParameter.ImageSize | 图片尺寸超限 | 压缩图片至 5MB 以下 |
| 400 | InvalidParameter.DataInspection | 内容审核失败 | 检查图片和提示词内容 |
| 401 | InvalidApiKey | API Key 无效 | 检查 Authorization 头 |
| 403 | InsufficientQuota | 余额不足 | 充值后重试 |
| 429 | Throttling.RateLimit | 请求频率过高 | 降低请求频率 |
| 500 | InternalError | 服务器内部错误 | 稍后重试 |
{
"code": "fail_to_fetch_task",
"message": "{\"request_id\":\"167c0805-d44d-4f5c-8b8f-d4c628a18b81\",\"code\":\"InvalidParameter.ImageFormat\",\"message\":\"图片格式不支持或格式错误\"}",
"data": null
}generate_audio: true(自动生成音频)audio_url(自定义音频)smart_rewrite 功能