curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "blackforestlabs/flux/dev/image-to-image",
"input": {
"prompt": "Reimagine this same reading room as a warm and inviting evening interior. Retain the principal perspective, the large window on the left, the central rectangular table and chairs, and the low shelves on the right. Replace the cold concrete wall finish with warm light-oak paneling and the floor with natural oak planks; give the chairs comfortable muted rust-colored upholstery. Add subtle warm reading light above the table and a gentle glow along the shelves. Through the existing window, show the soft blue light of dusk. Realistic architectural photography with convincing wood grain, fabric texture and balanced warm interior light against cool outdoor light. The room remains simple, unoccupied and clearly related to the original layout. No text, logos, commercial styling or watermark.",
"n": 1,
"output_format": "png",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux/dev/image-to-image/v1/01/input.png"
]
}
}
'{
"code": 200,
"data": {
"task_id": "I0RYI5JVOJC6CR8I",
"status": "running",
"created_time": "2026-09-25T11:22:15"
}
}Flux
Flux Dev 图生图
Flux Dev 图生图 API 根据文本提示词编辑一张源图,输出 PNG 或 JPEG。
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 '
{
"model": "blackforestlabs/flux/dev/image-to-image",
"input": {
"prompt": "Reimagine this same reading room as a warm and inviting evening interior. Retain the principal perspective, the large window on the left, the central rectangular table and chairs, and the low shelves on the right. Replace the cold concrete wall finish with warm light-oak paneling and the floor with natural oak planks; give the chairs comfortable muted rust-colored upholstery. Add subtle warm reading light above the table and a gentle glow along the shelves. Through the existing window, show the soft blue light of dusk. Realistic architectural photography with convincing wood grain, fabric texture and balanced warm interior light against cool outdoor light. The room remains simple, unoccupied and clearly related to the original layout. No text, logos, commercial styling or watermark.",
"n": 1,
"output_format": "png",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux/dev/image-to-image/v1/01/input.png"
]
}
}
'{
"code": 200,
"data": {
"task_id": "I0RYI5JVOJC6CR8I",
"status": "running",
"created_time": "2026-09-25T11:22:15"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
提交任务
向POST /api/generate/submit 发送 model: "blackforestlabs/flux/dev/image-to-image" 和一个 input 对象。使用 Authorization: Bearer VIDGO_API_KEY 认证。
prompt:必填字符串。描述图像或编辑指令,去除首尾空白后至少一个字符。image_urls:必填数组,包含一个公开的 HTTP(S) 源图 URL。源图会引导编辑后的输出。n:正整数,指定输出图像数量,默认1。output_format:png或jpeg,默认png。
画布参数
size 定义文生图的画布,默认 1:1。图生图会以源图引导输出。请求示例提供了源图、提示词、图像数量和输出格式。
获取图像
提交响应会返回data.task_id。使用查询任务状态跟踪任务经过 not_started、running、finished 或 failed 等状态。
状态为 finished 时,从 data.files[].file_url 读取图像 URL。状态为 failed 时,读取 data.error_message。
可以在顶层提供 callback_url,通过 Webhook 接收最终结果。
已验证示例
此示例通过 Vidgo 测试 API 生成。源图和结果图托管在 Vidgo CDN 上。
{
"code": 200,
"data": {
"task_id": "I0RYI5JVOJC6CR8I",
"status": "finished",
"files": [
{
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux/dev/image-to-image/v1/01/output.png",
"file_type": "image"
}
],
"created_time": "2026-09-25T11:22:15",
"error_message": null,
"progress": 100
}
}
授权
使用 Authorization: Bearer VIDGO_API_KEY。
请求体
application/json