Skip to main content
POST
/
nano-banana-pro-edit
/
async
curl --request POST \
  --url https://api.modellix.ai/api/v1/google/nano-banana-pro-edit/async \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "Replace the background with a futuristic neon cityscape at night",
  "image": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
}
'
{
  "code": 0,
  "message": "success",
  "data": {
    "status": "pending",
    "task_id": "task-i2i002",
    "model_id": "google/nano-banana-pro-edit",
    "get_result": {
      "method": "GET",
      "url": "https://api.modellix.ai/api/v1/tasks/task-i2i002"
    }
  }
}

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json
prompt
string
required

Editing instruction describing the desired transformation

Minimum string length: 1
Example:

"Replace the background with a futuristic neon cityscape at night"

image
string
required

Input image in data URI format (e.g. data:image/png;base64,...)

Example:

"data:image/jpeg;base64,/9j/4AAQSkZJRg..."

aspectRatio
enum<string>
default:1:1

Output image aspect ratio

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

"4:3"

imageSize
enum<string>

Output image resolution

Available options:
1K,
2K,
4K
Example:

"2K"

Response

Task submitted successfully

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required