FLUX 3 Max Image to Video API
blackforestlabs/flux-3-max/image-to-videoFLUX 3 Max Image to Video 将起始图片转化为 5–20 秒、720p 或 1080p 的带原生音频视频,并可落到你提供的第二张结束帧。它保留图片的构图、主体与色调,同时加入提示词描述的动作和声音。
拖拽文件、粘贴剪贴板素材,或输入 URL。 必填。按顺序添加 1–2 张 JPEG、PNG 或 WebP:先起始帧,再添加可选的结束帧。
2/2 个素材
REST API
快速开始
三步完成第一次 FLUX 3 Max Image to Video 调用。示例发送首尾两帧生成 6 秒视频,并返回 task_id。
连接 Vidgo API
创建 API Key,将它安全保存在服务端,并通过 Authorization 请求头以 Bearer Token 发送。
- 接口地址
- POST
https://api.vidgo.ai/api/generate/submit - 认证方式
- Authorization: Bearer VIDGO_API_KEY
提交一个生成任务
运行短示例,提供 prompt 并在 image_urls 中至少放入一个图片 URL。
curl --request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "blackforestlabs/flux-3-max/image-to-video",
"input": {
"prompt": "Start on the closed ceramic teapot from the first image. Steam begins to curl from the spout, the lid lifts slightly and settles, and the camera pushes in slowly until it holds on the poured cup shown in the second image. Warm kitchen window light throughout, shallow depth of field. Native audio: quiet kettle hiss, a soft clink of porcelain, distant birdsong. No text, no logos, no watermark.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-3-max/image-to-video/v1/01/input-start-frame.webp",
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-3-max/image-to-video/v1/01/input-end-frame.webp"
],
"duration": 6,
"resolution": "720p",
"aspect_ratio": "auto",
"sound": true
}
}'等待并获取结果
使用返回的 task_id 查询同一个任务,直到状态变为 finished 或 failed;成功后读取 data.files[].file_url。
查询状态
GET https://api.vidgo.ai/api/generate/status/{task_id}当状态为 not_started 或 running 时,建议每隔数秒查询一次;到达 finished 或 failed 后停止。成功时从 data.files[].file_url 读取视频地址;生成较长视频时可逐步拉长间隔,也可在提交请求根层添加 callback_url 异步接收结果。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "IB2OH450L0Z585RW",
"status": "not_started",
"created_time": "2026-11-05T07:04:45"
}
}{
"code": 200,
"data": {
"task_id": "IB2OH450L0Z585RW",
"status": "finished",
"files": [
{
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-3-max/image-to-video/v2/01/output-01.mp4",
"file_type": "video"
}
],
"created_time": "2026-11-05T07:04:45",
"error_message": null,
"progress": 100
}
}完整可运行示例
理解上面的三步流程后再展开。这里把提交、轮询、终态处理和结果读取合并在一个脚本中。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "blackforestlabs/flux-3-max/image-to-video",
"input": {
"prompt": "Start on the closed ceramic teapot from the first image. Steam begins to curl from the spout, the lid lifts slightly and settles, and the camera pushes in slowly until it holds on the poured cup shown in the second image. Warm kitchen window light throughout, shallow depth of field. Native audio: quiet kettle hiss, a soft clink of porcelain, distant birdsong. No text, no logos, no watermark.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-3-max/image-to-video/v1/01/input-start-frame.webp",
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-3-max/image-to-video/v1/01/input-end-frame.webp"
],
"duration": 6,
"resolution": "720p",
"aspect_ratio": "auto",
"sound": true
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
while true; do
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep 2
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
done请求参数
model 和 callback_url 位于请求根层;生成参数位于 input。
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| model | string | 是 | — | 固定为 blackforestlabs/flux-3-max/image-to-video。 |
| callback_url | string (URL) | 否 | — | 用于接收任务结果的公开 HTTP(S) 地址,任务结束时推送。 |
| input | object | 是 | — | 生成参数:prompt 与 1–2 张图片,以及可选的 duration、resolution、aspect_ratio 与 sound。 |
| input.prompt | string | 是 | — | 镜头文本描述;开启 sound 时可写入声音提示。 |
| input.image_urls | string[] | 是 | — | 1–2 个 URL:[start_frame] 或 [start_frame, end_frame]。 |
| input.duration | integer | 否 | 5 | 整数秒,5–20。 |
| input.resolution | string | 否 | 720p | 720p 或 1080p。 |
| input.aspect_ratio | string | 否 | auto | auto、21:9、2:1、16:9、4:3、1:1、3:4、9:16。 |
| input.sound | boolean | 否 | true | 原生音频开关,不影响价格。 |
响应字段
提交响应会立即返回任务标识;随着任务推进,状态响应会补充进度、输出文件或失败信息。
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 应用层结果码,成功响应使用 0 或 200。 |
| message | string | 存在时返回便于阅读的响应或错误信息。 |
| data.task_id | string | 任务标识,用于拼接状态查询地址。 |
| data.status | string | 当前状态:not_started、running、finished 或 failed。 |
| data.created_time | string | 任务创建时间,采用日期时间格式。 |
| data.progress | number | 上游提供进度时返回的完成百分比。 |
| data.files[] | array | 任务成功后返回的生成文件列表。 |
| data.files[].file_url | string | 生成视频的公开访问地址。 |
| data.files[].file_type | string | 生成文件类型,例如 video。 |
| data.files[].watermark_url | string | null | 存在水印版本时返回对应地址。 |
| data.error_message | string | null | status 为 failed 时的失败详情。 |
任务生命周期
not_started 与 running 属于非终态;finished 与 failed 是两种终态,收到任意终态后都应停止轮询。
not_started任务已被接受,正在等待排队开始。
running视频正在生成中,请保持轮询查询。
finished任务完成,从 data.files[].file_url 读取视频地址。
failed生成失败,读取 data.error_message 了解原因并停止轮询。
轮询与错误处理
- 认证失败401 表示 Bearer API Key 缺失或无效,请在控制台确认密钥后重试。
- 参数校验400 表示请求字段不合法或属于其他端点,请检查image_urls(1–2 个公开 URL)与 duration。
- 轮询间隔任务运行期间建议每隔数秒查询一次;生成较长视频时可逐步拉长间隔。
- 终态处理仅在 not_started 或 running 时继续轮询;收到 finished 或 failed 即停止。
- 回调方式在请求根层添加 callback_url,即可在任务结束时接收结果推送,无需持续轮询。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 模型 | blackforestlabs/flux-3-max/image-to-video | 异步图生视频(可选结束帧)的模型标识。 |
| 时长 | 5–20 | 整数秒,默认 5 秒。 |
| 分辨率 | 720p | 1080p | 默认 720p。 |
| 画幅比例 | auto | 21:9 | 2:1 | 16:9 | 4:3 | 1:1 | 3:4 | 9:16 | 默认 auto。 |
| 价格 | 34 / 58 credits/s | 对应 720p / 1080p,按输出秒数计费,含音频。 |
相关模型
FLUX 3 Max Image to Video API 常见问题
FLUX 3 Max Image to Video API 是什么?
FLUX 3 Max Image to Video 是 fal 与 Black Forest Labs 合作推出、用于让静态图片动起来的视频模型。它将起始图片(以及可选的结束图片)转化为 5–20 秒、720p 或 1080p 的带原生音频视频。模型基于 FLUX 3 视频底座,保留画面中的主体、构图与色调,同时加入你描述的动作和声音。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
FLUX 3 Max Image to Video 的首尾帧如何使用?
把 URL 按顺序放入 image_urls。第一张作为视频开场;第二张作为视频结束时的画面,提示词描述两者之间的运动。
FLUX 3 Max Image to Video 输出什么画幅?
aspect_ratio 为 auto 时输出跟随起始图片;也可选择 21:9、2:1、16:9、4:3、1:1、3:4 或 9:16 以匹配特定格式。
FLUX 3 Max Image to Video 支持哪些图片文件?
使用指向 PNG、JPEG 或 WebP 图片的公开 HTTP(S) URL。体验区可上传不超过 30 MB 的本地文件并自动填入 URL。
FLUX 3 Max Image to Video 会为图片配上声音吗?
会。sound 默认为 true,模型会生成与动作及提示词中声音描述一致的音频。设为 false 可得到无声视频,价格不变。
FLUX 3 Max Image to Video 如何计费?
720p 每输出秒 34 点数($0.17),1080p 每秒 58 点数($0.29)。带首尾帧的 6 秒 720p 视频为 204 点数。
什么时候该用 FLUX 3 Max Keyframes to Video 而不是 Image to Video?
Image to Video 固定首帧及可选的尾帧。需要三张以上图片,或要把图片固定在视频中间的特定时刻时,请使用 Keyframes to Video。















