curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "google/nano-banana/edit",
"input": {
"image_urls": [
"https://example.com/image.png"
],
"prompt": "Add colorful flowers in the foreground.",
"size": "16:9"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-example",
"status": "running",
"created_time": "2026-09-10T08:00:00"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Google
Nano Banana 图像编辑
Nano Banana 图像编辑 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": "google/nano-banana/edit",
"input": {
"image_urls": [
"https://example.com/image.png"
],
"prompt": "Add colorful flowers in the foreground.",
"size": "16:9"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-example",
"status": "running",
"created_time": "2026-09-10T08:00:00"
}
}{
"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,都可以通过统一的查询任务状态接口获取结果。
模型
- google/nano-banana/edit - 使用提示词和参考图编辑图像。
功能
- 使用提示词和参考图编辑图像。
image_urls至少接受 1 张图像。
输出选项
图像尺寸
size:可选。可选值:1:1、2:3、3:2、3:4、4:3、4:5、5:4、9:16、16:9、21:9。
高级参数
model 和可选的 callback_url 放在请求根级。所有工作流参数(包括输出选项)都放在 input 内。
提示词
prompt:必填。描述要做的修改。长度:1-5,000 个字符。- 至少包含一个非空白字符。
图像 URL
image_urls:必填。提供公开可访问的图像 URL。至少 1 项。每项都必须是 HTTP(S) URL。
授权
使用 VIDGO_API_KEY。
请求体
application/json