> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# FLUX 视频集成指南

> Flux Image Generation 集成指南 - Ace Data Cloud

通过 `POST /flux/videos` 提交任务，用 `action` 选择生成、编辑或超分。省略 `action` 等同于 `generate`。使用已有 `POST /flux/tasks` 查询平台任务。支持 `async=true` 和 `callback_url`；完成结果包含平台视频链接和服务端测量的时长、尺寸与帧率。

## 生成：action=generate

支持 `mode=t2v/i2v/v2v/draft_enhance`。普通生成支持 5–20 秒整数或 `auto`；视频续接支持 5–15 秒。i2v 可提供 1–10 张关键帧，支持按顺序的 `[秒数, 图片]` 对。输出分辨率为 hd/fhd/qhd/uhd，支持同步音频。草稿仅输出 hd，返回平台 `draft_task_id`；复用草稿需同一归属，且受生成缓存有效期限制。草稿复现不能覆盖原始提示词和素材。

```json theme={null}
{
  "action": "generate",
  "model": "flux-3",
  "mode": "t2v",
  "prompt": "海边日落",
  "duration": 5,
  "resolution": "hd",
  "async": true
}
```

## 编辑：action=edit

传入 `video` 和 `prompt`。编辑按实际输出秒数计费，不接受生成的 `mode`、`duration` 等字段。

```json theme={null}
{"action":"edit","video":"https://example.com/video.mp4","prompt":"将场景改为蓝色调","async":true}
```

## 超分：action=upscale

传入 `input_video`，可选 `upscale_factor`（1.5–3）与 `creativity`（0 为精确、1 为创意）。按实际输出 MP·秒计费：`时长 × 宽 × 高 / 1048576 × 帧率 / 24`，1 MP = 1024×1024。不接受生成参数。

```json theme={null}
{"action":"upscale","input_video":"https://example.com/video.mp4","upscale_factor":2,"creativity":0,"async":true}
```

各操作采用当前 FLUX 参考定价系数，按实际输出计费。失败任务不收取生成费用；动态计费任务的最终费用取决于完成结果。不同操作只接受各自参数，未知 action 返回参数错误。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.