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-flex/edit",
"input": {
"prompt": "Create a children's picture-book illustration. Use image 1 as the exact character design for Pip the robot gardener: the same round teal body, brass spout nose, amber lens eyes, red knitted scarf, yellow rubber boots and tiny brass watering can, with consistent proportions. Place Pip inside the Victorian glasshouse from image 2, standing on the wooden potting bench and carefully watering a row of tomato seedlings in terracotta pots, with the white cast-iron arches, mossy panes and hanging ferns clearly recognisable. Render the whole scene in the risograph print style of image 3: a limited palette of fluorescent pink, teal, sunflower yellow and deep navy, visible grain, halftone dots and slight layer misregistration on off-white paper. Across the top, in large hand-lettered risograph type, the title reads exactly \"PIP AND THE GLASS GARDEN\". No other text, no watermark.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-01.png",
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-02.png",
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-03.png"
],
"size": "3:2",
"resolution": "1K"
}
}
EOF{
"code": 200,
"data": {
"task_id": "E4MB5ERGH360DFJI",
"status": "running",
"created_time": "2026-09-26T11:07:59"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Flux
FLUX.2 Flex 图像编辑
FLUX.2 Flex 图像编辑 API 用于改造图像或组合多张参考图,通过文字引导主体、风格和构图。
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-flex/edit",
"input": {
"prompt": "Create a children's picture-book illustration. Use image 1 as the exact character design for Pip the robot gardener: the same round teal body, brass spout nose, amber lens eyes, red knitted scarf, yellow rubber boots and tiny brass watering can, with consistent proportions. Place Pip inside the Victorian glasshouse from image 2, standing on the wooden potting bench and carefully watering a row of tomato seedlings in terracotta pots, with the white cast-iron arches, mossy panes and hanging ferns clearly recognisable. Render the whole scene in the risograph print style of image 3: a limited palette of fluorescent pink, teal, sunflower yellow and deep navy, visible grain, halftone dots and slight layer misregistration on off-white paper. Across the top, in large hand-lettered risograph type, the title reads exactly \"PIP AND THE GLASS GARDEN\". No other text, no watermark.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-01.png",
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-02.png",
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/input-03.png"
],
"size": "3:2",
"resolution": "1K"
}
}
EOF{
"code": 200,
"data": {
"task_id": "E4MB5ERGH360DFJI",
"status": "running",
"created_time": "2026-09-26T11:07:59"
}
}{
"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-flex/edit - 使用提示词和参考图编辑图像。
功能
- 使用提示词和参考图编辑图像。
image_urls接受 1-8 张图像。- 可选
1K、2K输出分辨率。
输出选项
图像尺寸
size:必填。可选值:1:1、4:3、3:4、16:9、9:16、3:2、2:3、auto。auto使用image_urls中第一张图像的宽高比。
分辨率
resolution:必填。可选值:1K、2K。
高级参数
model 和可选的 callback_url 放在请求根级。所有工作流参数(包括输出选项)都放在 input 内。
发送本页列出的 input 字段。每个输入 URL 都是公开的 HTTP(S) URL。
提示词
prompt:必填。描述要做的修改。长度:3-5,000 个字符。
图像 URL
image_urls:必填。提供公开可访问的图像 URL。1-8 项。每项都必须是 HTTP(S) URL。
已验证示例
此示例通过 Vidgo API 生成,也是 Playground 中的默认示例。源图和结果图托管在 Vidgo CDN 上。
{
"code": 200,
"data": {
"task_id": "E4MB5ERGH360DFJI",
"status": "finished",
"files": [
{
"file_type": "image",
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-2-flex/edit/v1/01/output.jpg"
}
],
"created_time": "2026-09-26T11:07:59",
"error_message": null,
"progress": 100
}
}
授权
使用 VIDGO_API_KEY。
请求体
application/json