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-max",
"input": {
"prompt": "Move this exact same musician, still seated on the same wooden chair and playing the same cello, from the practice room to the middle of a vast frozen lake at blue hour. Keep his face, curly black hair, round tortoiseshell glasses, closed eyes, moss-green cable-knit sweater with rolled sleeves, charcoal trousers, brown boots, bow position and the honey-brown cello with its worn varnish identical. The new setting: smooth dark ice with white cracks and a light dusting of snow around the chair, snow-covered pine forest and mountains on the far shore, a deep blue twilight sky with a thin pink glow on the horizon and the first stars. A small warm light from a lantern on the ice beside the chair lights his face and the cello, while the rest of the scene is cool blue. His breath is faintly visible in the cold air. Remove the practice room completely.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-kontext-max/v1/01/input-01.png"
],
"size": "9:16",
"output_format": "png"
}
}
'{
"code": 200,
"data": {
"task_id": "QBNW6JCNI530EKJV",
"status": "running",
"created_time": "2026-09-26T11:02:47"
}
}{
"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 '
{
"model": "blackforestlabs/flux-kontext-max",
"input": {
"prompt": "Move this exact same musician, still seated on the same wooden chair and playing the same cello, from the practice room to the middle of a vast frozen lake at blue hour. Keep his face, curly black hair, round tortoiseshell glasses, closed eyes, moss-green cable-knit sweater with rolled sleeves, charcoal trousers, brown boots, bow position and the honey-brown cello with its worn varnish identical. The new setting: smooth dark ice with white cracks and a light dusting of snow around the chair, snow-covered pine forest and mountains on the far shore, a deep blue twilight sky with a thin pink glow on the horizon and the first stars. A small warm light from a lantern on the ice beside the chair lights his face and the cello, while the rest of the scene is cool blue. His breath is faintly visible in the cold air. Remove the practice room completely.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-kontext-max/v1/01/input-01.png"
],
"size": "9:16",
"output_format": "png"
}
}
'{
"code": 200,
"data": {
"task_id": "QBNW6JCNI530EKJV",
"status": "running",
"created_time": "2026-09-26T11:02:47"
}
}{
"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 - 使用文本提示词编辑一张源图。
功能
- 使用文本提示词编辑一张源图。
- 在
image_urls中以单个项目提供源图。
输出选项
图像尺寸
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 内。
输入图像 URL 使用 HTTP(S),并指向公开可访问的图像文件。
提示词
prompt:必填。描述要做的修改。长度:1-2,000 个字符。- 至少包含一个非空白字符。
图像 URL
image_urls:必填。只提供 1 个公开可访问的 HTTP(S) 图像 URL 作为源图。
已验证示例
此示例通过 Vidgo API 生成,也是 Playground 中的默认示例。源图和结果图托管在 Vidgo CDN 上。
{
"code": 200,
"data": {
"task_id": "QBNW6JCNI530EKJV",
"status": "finished",
"files": [
{
"file_type": "image",
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-kontext-max/v1/01/output.png"
}
],
"created_time": "2026-09-26T11:02:47",
"error_message": null,
"progress": 100
}
}
授权
使用 VIDGO_API_KEY。
请求体
application/json