curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "blackforestlabs/flux-kontext-pro/text-to-image",
"input": {
"prompt": "A wide documentary photograph on an empty two-lane gravel road in western Kansas in late June, minutes before a tornado forms. A massive rotating supercell fills the upper two thirds of the sky: a striated, layered mesocyclone shaped like a stacked saucer, dark slate-green underneath, with a low rotating wall cloud on the left side and a thin shaft of hail glowing white behind it. On the right half of the frame, a dusty silver pickup truck is parked on the road shoulder with both front doors open and a tripod-mounted weather instrument mast on its roof. Two storm chasers stand in front of the truck: a tall woman in a faded red windbreaker holds a tablet showing a radar map and points toward the wall cloud; a shorter man in a grey hoodie and baseball cap crouches beside her with a camera on a small tripod. Behind them, golden wheat stubble fields stretch to a flat horizon where a thin strip of warm sunlight breaks under the storm base, lighting the grass and the side of the truck in gold while everything above is dark and heavy. A barbed-wire fence and a leaning wooden utility pole run along the left edge. Strong wind bends the grass and lifts dust from the road. 24mm lens, eye level, sharp foreground, natural color, realistic cloud structure, film grain. No text, no logos, no watermark.",
"size": "16:9",
"output_format": "png"
}
}
'{
"code": 200,
"data": {
"task_id": "2M5RH08SQ7GQGKRE",
"status": "running",
"created_time": "2026-09-26T10:59:34"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Flux
Flux Kontext Pro 文生图
Flux Kontext Pro 文生图 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 '
{
"model": "blackforestlabs/flux-kontext-pro/text-to-image",
"input": {
"prompt": "A wide documentary photograph on an empty two-lane gravel road in western Kansas in late June, minutes before a tornado forms. A massive rotating supercell fills the upper two thirds of the sky: a striated, layered mesocyclone shaped like a stacked saucer, dark slate-green underneath, with a low rotating wall cloud on the left side and a thin shaft of hail glowing white behind it. On the right half of the frame, a dusty silver pickup truck is parked on the road shoulder with both front doors open and a tripod-mounted weather instrument mast on its roof. Two storm chasers stand in front of the truck: a tall woman in a faded red windbreaker holds a tablet showing a radar map and points toward the wall cloud; a shorter man in a grey hoodie and baseball cap crouches beside her with a camera on a small tripod. Behind them, golden wheat stubble fields stretch to a flat horizon where a thin strip of warm sunlight breaks under the storm base, lighting the grass and the side of the truck in gold while everything above is dark and heavy. A barbed-wire fence and a leaning wooden utility pole run along the left edge. Strong wind bends the grass and lifts dust from the road. 24mm lens, eye level, sharp foreground, natural color, realistic cloud structure, film grain. No text, no logos, no watermark.",
"size": "16:9",
"output_format": "png"
}
}
'{
"code": 200,
"data": {
"task_id": "2M5RH08SQ7GQGKRE",
"status": "running",
"created_time": "2026-09-26T10:59:34"
}
}{
"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-kontext-pro/text-to-image - 根据文本提示词生成图像。
功能
- 根据文本提示词生成图像。
输出选项
图像尺寸
size:可选。输出宽高比。可选值:1:1、4:3、3:4、16:9、9:16、21:9、9:21。默认:1:1。
输出格式
output_format:可选。输出图像文件格式。可选值:png、jpg。
高级参数
model 和可选的 callback_url 放在请求根级。所有工作流参数(包括输出选项)都放在 input 内。
提示词
prompt:必填。描述期望的图像。长度:1-2,000 个字符。- 至少包含一个非空白字符。
已验证示例
此示例通过 Vidgo API 生成,也是 Playground 中的默认示例。源图和结果图托管在 Vidgo CDN 上。
{
"code": 200,
"data": {
"task_id": "2M5RH08SQ7GQGKRE",
"status": "finished",
"files": [
{
"file_type": "image",
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-kontext-pro/text-to-image/v1/01/output.png"
}
],
"created_time": "2026-09-26T10:59:34",
"error_message": null,
"progress": 100
}
}
授权
使用 VIDGO_API_KEY。
请求体
application/json