curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "blackforestlabs/flux-2-pro/text-to-image",
"input": {
"prompt": "A candid documentary photograph taken at night on the open deck of a small wooden river ferry crossing a wide Southeast Asian river in steady monsoon rain. In the foreground, a middle-aged woman in a translucent green raincoat steadies a dented red motor scooter by its handlebars. Behind her, an elderly man in a conical straw hat shares a folded black umbrella with a schoolgirl in a navy uniform who clutches a paper bag against her chest. At the far right, a young deckhand in rubber boots coils a wet mooring rope. A single sodium-vapor lamp above the wheelhouse casts warm orange light that falls off into deep blue darkness; distant city lights on the far bank blur into soft bokeh and long wavering reflections on the black water. Diagonal rain streaks catch the lamplight, beads of water cling to the scooter's chrome mirror, and the worn deck planks shine with puddles reflecting the lamp. 35mm lens at eye level, shallow depth of field focused on the woman's face, natural skin texture, believable hands, subtle film grain, a quiet and patient mood. No text, no signage, no logos, no watermark.",
"size": "3:2",
"resolution": "1K"
}
}
EOF{
"code": 200,
"data": {
"task_id": "FUI8N7NW2JLV34RB",
"status": "running",
"created_time": "2026-09-26T10:30:10"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Flux
FLUX.2 Pro 文生图
FLUX.2 Pro 文生图 API 生成细节丰富的图像,可用自然语言控制主体、构图和画面中的文字,输出最高 2K。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "blackforestlabs/flux-2-pro/text-to-image",
"input": {
"prompt": "A candid documentary photograph taken at night on the open deck of a small wooden river ferry crossing a wide Southeast Asian river in steady monsoon rain. In the foreground, a middle-aged woman in a translucent green raincoat steadies a dented red motor scooter by its handlebars. Behind her, an elderly man in a conical straw hat shares a folded black umbrella with a schoolgirl in a navy uniform who clutches a paper bag against her chest. At the far right, a young deckhand in rubber boots coils a wet mooring rope. A single sodium-vapor lamp above the wheelhouse casts warm orange light that falls off into deep blue darkness; distant city lights on the far bank blur into soft bokeh and long wavering reflections on the black water. Diagonal rain streaks catch the lamplight, beads of water cling to the scooter's chrome mirror, and the worn deck planks shine with puddles reflecting the lamp. 35mm lens at eye level, shallow depth of field focused on the woman's face, natural skin texture, believable hands, subtle film grain, a quiet and patient mood. No text, no signage, no logos, no watermark.",
"size": "3:2",
"resolution": "1K"
}
}
EOF{
"code": 200,
"data": {
"task_id": "FUI8N7NW2JLV34RB",
"status": "running",
"created_time": "2026-09-26T10:30:10"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
模型
- blackforestlabs/flux-2-pro/text-to-image - 根据文本提示词生成图像。
功能
- 根据文本提示词生成图像。
- 可选
1K、2K输出分辨率。
输出选项
图像尺寸
size:必填。可选值:1:1、4:3、3:4、16:9、9:16、3:2、2:3、auto。
分辨率
resolution:必填。可选值:1K、2K。
高级参数
model 和可选的 callback_url 放在请求根级。所有工作流参数(包括输出选项)都放在 input 内。
发送本页列出的 input 字段。
提示词
prompt:必填。描述期望的图像。长度:3-5,000 个字符。
已验证示例
此示例通过 Vidgo API 生成,也是 Playground 中的默认示例。源图和结果图托管在 Vidgo CDN 上。
{
"code": 200,
"data": {
"task_id": "FUI8N7NW2JLV34RB",
"status": "finished",
"files": [
{
"file_type": "image",
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-pro/text-to-image/v1/01/output.jpg"
}
],
"created_time": "2026-09-26T10:30:10",
"error_message": null,
"progress": 100
}
}
授权
使用 VIDGO_API_KEY。
请求体
application/json