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-kontext-max/text-to-image",
"input": {
"prompt": "A photograph taken from inside a small deep-sea research submersible, looking through a thick round acrylic porthole at a depth of 1,200 meters. Outside in the black water, a female deep-sea anglerfish hangs close to the glass, seen from the side: a round lumpy dark-brown body, a huge wide mouth full of long translucent needle teeth, and tiny eyes. Growing out of the top of the fish's own head is a thin, flexible fleshy fishing rod, part of its body, that arches forward over its mouth and ends in a small glowing blue-green bioluminescent bulb, the only strong light source outside. The glow lights the fish's teeth and skin from above. Drifting marine snow particles catch the light. On the inside surface of the porthole, faint reflections of the cabin appear: amber-lit analog gauges, a red emergency switch and the soft silhouette of a scientist's face lit by a tablet screen. Tiny condensation droplets bead on the lower edge of the acrylic. A thick steel ring with heavy hex bolts frames the porthole. Extremely low light, high dynamic range, realistic photographic noise. No text, no logos, no watermark.",
"size": "1:1",
"output_format": "png"
}
}
EOF{
"code": 200,
"data": {
"task_id": "ENZJ08EV0WERQ3QY",
"status": "running",
"created_time": "2026-09-26T11:05:02"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Flux
Flux Kontext Max 文生图
Flux Kontext Max 文生图 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-kontext-max/text-to-image",
"input": {
"prompt": "A photograph taken from inside a small deep-sea research submersible, looking through a thick round acrylic porthole at a depth of 1,200 meters. Outside in the black water, a female deep-sea anglerfish hangs close to the glass, seen from the side: a round lumpy dark-brown body, a huge wide mouth full of long translucent needle teeth, and tiny eyes. Growing out of the top of the fish's own head is a thin, flexible fleshy fishing rod, part of its body, that arches forward over its mouth and ends in a small glowing blue-green bioluminescent bulb, the only strong light source outside. The glow lights the fish's teeth and skin from above. Drifting marine snow particles catch the light. On the inside surface of the porthole, faint reflections of the cabin appear: amber-lit analog gauges, a red emergency switch and the soft silhouette of a scientist's face lit by a tablet screen. Tiny condensation droplets bead on the lower edge of the acrylic. A thick steel ring with heavy hex bolts frames the porthole. Extremely low light, high dynamic range, realistic photographic noise. No text, no logos, no watermark.",
"size": "1:1",
"output_format": "png"
}
}
EOF{
"code": 200,
"data": {
"task_id": "ENZJ08EV0WERQ3QY",
"status": "running",
"created_time": "2026-09-26T11:05:02"
}
}{
"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-max/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": "ENZJ08EV0WERQ3QY",
"status": "finished",
"files": [
{
"file_type": "image",
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-kontext-max/text-to-image/v1/03/output.png"
}
],
"created_time": "2026-09-26T11:05:02",
"error_message": null,
"progress": 100
}
}
授权
使用 VIDGO_API_KEY。
请求体
application/json