curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "flux-2-pro",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "The jar in image 1 is filled with capsules exactly same as image 2 with the exact logo",
"size": "1:1",
"resolution": "1K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}Flux
Flux.2
Flux.2 API 基于 Black Forest Labs 的 320 亿参数图像生成模型,支持多参考图,文字渲染出色。
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": "flux-2-pro",
"callback_url": "https://your-domain.com/callback",
"input": {
"prompt": "The jar in image 1 is filled with capsules exactly same as image 2 with the exact logo",
"size": "1:1",
"resolution": "1K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-1757165031-uyujaw3d",
"status": "not_started",
"created_time": "2025-11-12T10:30:00"
}
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
模型
- flux-2-pro - 面向生产部署的高保真文生图
- flux-2-pro-edit - 高级多参考图编辑,最多 8 张输入图像
- flux-2-flex - 可调节速度与质量的平衡,适合灵活的工作流
- flux-2-flex-edit - 支持多参考图的灵活图像编辑
工作流 ID
现有 ID 仍可使用。新接入可以选择专用的工作流:- blackforestlabs/flux-2-pro/text-to-image
- blackforestlabs/flux-2-pro/edit
- blackforestlabs/flux-2-flex/text-to-image
- blackforestlabs/flux-2-flex/edit
授权
所有 API 接口都需要 Bearer Token 认证
获取 API Key:
前往 仪表盘 → API 密钥 获取 API Key
将其添加到请求头:
Authorization: Bearer VIDGO_API_KEY
请求体
application/json