FLUX 3 Max Text to Video API
blackforestlabs/flux-3-max/text-to-videoFLUX 3 Max Text to Video 将一段镜头描述转化为 5–20 秒的 720p 或 1080p 视频,自带原生音频,提供 21:9 到 9:16 共八种画幅。它会按提示词中的运镜、光线与声音描述生成画面和音轨,一次请求即可得到声画完整的成片。
REST API
快速开始
三步完成第一次 FLUX 3 Max Text to Video 调用。示例请求一段 8 秒、16:9、带声音的镜头,并返回 task_id。
连接 Vidgo API
创建 API Key,将它安全保存在服务端,并通过 Authorization 请求头以 Bearer Token 发送。
- 接口地址
- POST
https://api.vidgo.ai/api/generate/submit - 认证方式
- Authorization: Bearer VIDGO_API_KEY
提交一个生成任务
运行短示例,只需提供 prompt,其余字段均有默认值。
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/text-to-video",
"input": {
"prompt": "One continuous 8-second shot at dawn on a wind-swept salt flat. A lone kite surfer in a rust-orange wetsuit carves a wide arc across a thin sheet of mirror-still water, spray fanning out behind the board. Camera: low tracking shot that starts beside the board and slowly rises to reveal the pale pink horizon. Lighting: soft low sun, long reflections, gentle haze. Native audio: steady wind, the hiss of the board on water, a single gull far away. No text, no logos, no watermark.",
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9",
"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": "1WS6SQGB9KFNYIOX",
"status": "not_started",
"created_time": "2026-11-05T07:04:44"
}
}{
"code": 200,
"data": {
"task_id": "1WS6SQGB9KFNYIOX",
"status": "finished",
"files": [
{
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-3-max/text-to-video/v2/01/output-01.mp4",
"file_type": "video"
}
],
"created_time": "2026-11-05T07:04:44",
"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/text-to-video",
"input": {
"prompt": "One continuous 8-second shot at dawn on a wind-swept salt flat. A lone kite surfer in a rust-orange wetsuit carves a wide arc across a thin sheet of mirror-still water, spray fanning out behind the board. Camera: low tracking shot that starts beside the board and slowly rises to reveal the pale pink horizon. Lighting: soft low sun, long reflections, gentle haze. Native audio: steady wind, the hiss of the board on water, a single gull far away. No text, no logos, no watermark.",
"duration": 8,
"resolution": "720p",
"aspect_ratio": "16:9",
"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/text-to-video。 |
| callback_url | string (URL) | 否 | — | 用于接收任务结果的公开 HTTP(S) 地址,任务结束时推送。 |
| input | object | 是 | — | 生成参数:prompt,以及可选的 duration、resolution、aspect_ratio 与 sound。 |
| input.prompt | string | 是 | — | 镜头文本描述;开启 sound 时可写入声音提示。 |
| 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 表示请求字段不合法或属于其他端点,请检查prompt、duration 与 aspect_ratio。
- 轮询间隔任务运行期间建议每隔数秒查询一次;生成较长视频时可逐步拉长间隔。
- 终态处理仅在 not_started 或 running 时继续轮询;收到 finished 或 failed 即停止。
- 回调方式在请求根层添加 callback_url,即可在任务结束时接收结果推送,无需持续轮询。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 模型 | blackforestlabs/flux-3-max/text-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 Text to Video API 常见问题
FLUX 3 Max Text to Video API 是什么?
FLUX 3 Max Text to Video 是 fal 与 Black Forest Labs 合作推出、用于文本生成视频的模型。它将提示词转化为 5–20 秒、720p 或 1080p 的视频,自带原生音频并提供八种画幅。模型基于 FLUX 3 视频底座后训练,在保留你描述的主体、运镜与光线的同时,同步生成动作和匹配的音轨。你可以通过 API 进行程序化调用,也可以在上方体验区直接在线试用。
FLUX 3 Max Text to Video 如何生成声音?
sound 默认开启,模型会根据提示词中的声音描述与画面同步生成音轨。需要自行配乐时把 sound 设为 false 即可得到无声画面,两种方式价格相同。
FLUX 3 Max Text to Video 最长能生成多少秒?
duration 可设为 5–20 之间的任意整数秒,默认 5 秒。生成较长视频时,在提示词中描述动作或运镜的推进效果更好。
FLUX 3 Max Text to Video 每秒多少钱?
720p 每输出秒 34 点数($0.17),1080p 每秒 58 点数($0.29)。8 秒 720p 视频为 272 点数,开启声音不改变价格。
FLUX 3 Max Text to Video 选择 auto 时输出什么比例?
文生视频没有可参考的图片,auto 输出 16:9。交付格式固定时,请明确选择 21:9、2:1、4:3、1:1、3:4 或 9:16。
FLUX 3 Max Text to Video 应该用 720p 还是 1080p 打样?
建议先用 720p 调整提示词,每秒费用约低 40%,确认后再用同一提示词以 1080p 生成交付版本。两档分辨率的字段完全相同。
FLUX 3 Max Text to Video 和 FLUX 3 Text to Video 有什么区别?
FLUX 3 Max 是 FLUX 3 视频模型的后训练版本,由 fal 针对提示词遵循和渲染速度进行优化,每秒费率与 FLUX 3 相同。如果流程需要视频延长或首尾帧端点,可使用 Vidgo 上的 FLUX 3 系列。















