Google Nano Banana 2 Edit
按实际用量计费
ae_nano_banana_2_edit
使用文字指令编辑、变换或组合一张或多张图像。
按实际用量计费
价格说明
单次费用为(较大值(96 × 计费图像量, 0))AE积分。各项条件同时适用,按所选条件计算合计费用。
API 调用
通过统一工具网关发起同步请求,鉴权和计费由 AgentEarth 处理。
cURL
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_nano_banana_2_edit' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"prompt": "make a photo of the man driving the car down the california coastline",
"image_urls": [
"https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png",
"https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input-2.png"
]
}
}
}'- 请求方式
- POST
- 接口地址
- /agent-api/v1/tool/execute
- 鉴权方式
- X-Api-Key
- 超时时间
- 60 秒
响应示例
{
"error_no": 0,
"error_msg": "",
"result": [
{
"type": "text",
"text": "xxx"
}
],
"platform_annotations": {
"source": "AgentEarth",
"platform_note": "xxx",
"platform_suggestion": "xxx"
}
}工具参数
未传入的可选参数将使用平台默认值。
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|---|---|---|---|---|
request_body | object | 是 | 暂无参数说明。 | — |
request_body.seed | integer | unknown | 否 | The seed for the random number generator. | — |
request_body.prompt | string | 是 | The prompt for image editing. | — |
request_body.sync_mode | boolean | 否 | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. | false |
request_body.image_urls | array | 是 | The URLs of the images to use for image-to-image generation or image editing. | — |
request_body.num_images | integer | 否 | The number of images to generate. | 1 |
request_body.resolution | enum (0.5K | 1K | 2K | 4K) | 否 | The resolution of the image to generate. | 1K |
request_body.aspect_ratio | string | unknown | 否 | The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8. | auto |
request_body.output_format | enum (jpeg | png | webp) | 否 | The format of the generated image. | png |
request_body.thinking_level | string | unknown | 否 | When set, enables model thinking with the given level ('minimal' or 'high') and includes thoughts in the generation. Omit to disable. | — |
request_body.safety_tolerance | enum (1 | 2 | 3 | 4 | 5 | 6) | 否 | The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict. | 4 |
request_body.enable_web_search | boolean | 否 | Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. | false |
request_body.limit_generations | boolean | 否 | Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. | true |




