Skip to main content
POST
/
generate
/
k
/
nano-banana-edit
Nano Banana Edit Image Editing
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/nano-banana-edit \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "image_urls": [
    "https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png"
  ],
  "prompt": "turn this photo into a character figure. Behind it, place a box with the character's image printed on it",
  "image_size": "1:1",
  "output_format": "png"
}
EOF
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Edit images using Google DeepMind’s Nano Banana model. Key Features:
  • Natural Language Editing - Describe modifications through text instructions
  • Local Modifications - Precisely edit specific areas of images
  • Style Adjustments - Support image style and effect adjustments
  • Fast Processing - Quick editing based on Gemini architecture

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

image_urls
string[]
required

Image URL list (required) - Input image list for editing, max 10

Required array length: 1 - 10 elements
Example:
[
"https://storage.googleapis.com/falserverless/example_inputs/nano-banana-edit-input.png"
]
prompt
string
required

Prompt (required, max 5000 characters) - Text description for image editing

Required string length: 1 - 5000
Example:

"turn this photo into a character figure. Behind it, place a box with the character's image printed on it"

image_size
enum<string>
default:1:1

Image size (optional, default 1:1) - Image aspect ratio

Available options:
1:1,
9:16,
16:9,
3:4,
4:3,
3:2,
2:3,
5:4,
4:5,
21:9,
auto
Example:

"1:1"

output_format
enum<string>

Output format (optional) - Image output format

Available options:
png,
jpeg
Example:

"png"

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"