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",
"input": {
"prompt": "An intimate documentary photograph of an elderly violin restorer in a small lived-in workshop, viewed from slightly above bench height. The craftsman wears a faded indigo work shirt and round spectacles, leaning forward to inspect the curved varnished body of one antique violin resting on a folded linen cloth. One hand steadies the violin gently while the other holds a small inspection light. A large window on the left casts soft directional afternoon daylight across his lined face, amber wood grain, delicate wood shavings, a steel chisel and worn workbench. A few unfinished violin shapes hang softly out of focus in the background. Quiet concentration, believable hands and tools, rich natural material textures, subtle film grain, restrained warm colors, one coherent scene, no staged product display, no lettering, no logos, no watermark.",
"n": 1,
"output_format": "png",
"size": "4:3"
}
}
'
{
"code": 200,
"data": {
"task_id": "ZOBDNFN25SVGKU85",
"status": "running",
"created_time": "2026-09-25T11:20:26"
}
}Flux
Flux Dev 文生图
Flux Dev 文生图 API 根据文本提示词生成细节丰富的 PNG 或 JPEG 图像,支持预设宽高比、1:1 HD 或自定义 WIDTHxHEIGHT 画布。
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",
"input": {
"prompt": "An intimate documentary photograph of an elderly violin restorer in a small lived-in workshop, viewed from slightly above bench height. The craftsman wears a faded indigo work shirt and round spectacles, leaning forward to inspect the curved varnished body of one antique violin resting on a folded linen cloth. One hand steadies the violin gently while the other holds a small inspection light. A large window on the left casts soft directional afternoon daylight across his lined face, amber wood grain, delicate wood shavings, a steel chisel and worn workbench. A few unfinished violin shapes hang softly out of focus in the background. Quiet concentration, believable hands and tools, rich natural material textures, subtle film grain, restrained warm colors, one coherent scene, no staged product display, no lettering, no logos, no watermark.",
"n": 1,
"output_format": "png",
"size": "4:3"
}
}
'
{
"code": 200,
"data": {
"task_id": "ZOBDNFN25SVGKU85",
"status": "running",
"created_time": "2026-09-25T11:20:26"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
提交任务
向POST /api/generate/submit 发送 model: "blackforestlabs/flux/dev" 和一个 input 对象。使用 Authorization: Bearer VIDGO_API_KEY 认证。
prompt:必填字符串。描述图像或编辑指令,去除首尾空白后至少一个字符。size:输出画布,默认1:1。可选1:1、1:1 HD、4:3、3:4、16:9、9:16,或自定义WIDTHxHEIGHT(如1024x1536)。自定义宽和高为正整数。n:正整数,指定输出图像数量,默认1。output_format:png或jpeg,默认png。
获取图像
提交响应会返回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": "ZOBDNFN25SVGKU85",
"status": "finished",
"files": [
{
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux/dev/v1/01/output.png",
"file_type": "image"
}
],
"created_time": "2026-09-25T11:20:26",
"error_message": null,
"progress": 100
}
}