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",
"input": {
"prompt": "Replace the painted name on the bow \"MARISOL\" with \"ALBATROS\". Paint the new letters in the same hand-painted white capital lettering style, same size, same brush texture, with the same chipping and weathering as the rest of the hull. Keep everything else unchanged: the boat, its sky blue hull and white stripe, the rope and buoy, the pebble beach, the palafito stilt houses, the hills, the overcast light and the camera framing.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-kontext-pro/v1/02/input-01.png"
],
"size": "16:9",
"output_format": "jpg"
}
}
'{
"code": 200,
"data": {
"task_id": "KH8OWRITIOASWYGA",
"status": "running",
"created_time": "2026-09-26T11:02:37"
}
}{
"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",
"input": {
"prompt": "Replace the painted name on the bow \"MARISOL\" with \"ALBATROS\". Paint the new letters in the same hand-painted white capital lettering style, same size, same brush texture, with the same chipping and weathering as the rest of the hull. Keep everything else unchanged: the boat, its sky blue hull and white stripe, the rope and buoy, the pebble beach, the palafito stilt houses, the hills, the overcast light and the camera framing.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-kontext-pro/v1/02/input-01.png"
],
"size": "16:9",
"output_format": "jpg"
}
}
'{
"code": 200,
"data": {
"task_id": "KH8OWRITIOASWYGA",
"status": "running",
"created_time": "2026-09-26T11:02:37"
}
}{
"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 - 使用文本提示词编辑一张源图。
功能
- 使用文本提示词编辑一张源图。
- 在
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": "KH8OWRITIOASWYGA",
"status": "finished",
"files": [
{
"file_type": "image",
"file_url": "https://cdn.vidgo.ai/apis/models/blackforestlabs/flux-kontext-pro/v1/02/output.jpg"
}
],
"created_time": "2026-09-26T11:02:37",
"error_message": null,
"progress": 100
}
}
授权
使用 VIDGO_API_KEY。
请求体
application/json