Nano Banana

google/nano-banana-edit

Google's lightweight, fast model: text-to-image generation and instruction-based photo editing.

Pricing: $0.02 per image · failed tasks — $0 · ~1.5 min

Run with API
Upload a photo and describe what to change. API model: google/nano-banana-edit

Input

image_urls * — your photo (required) ?
Click to choose a photo
or drop it here · JPG, PNG, WebP up to 15 MB · up to 10
Examples:
aspect_ratio — image shape ?
output_format — file format ?

Output

Nano Banana Edit — Google

The result will appear here.
It usually takes ~1.5 min.

Sample output

Replace the background with a neon city at night

“Turn the photo into anime style, keep the face”
“Dress the person in a formal navy suit”

1. Create a task POST /api/v1/jobs/createTask

curl -X POST https://ai.aimixmedia.site/api/v1/jobs/createTask \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-123" \
  -d '{
  "model": "google/nano-banana-edit",
  "callBackUrl": "https://your-app.example/callback",
  "input": {
    "prompt": "Replace the background with a neon city at night",
    "image_urls": [
      "https://example.com/photo.jpg"
    ],
    "aspect_ratio": "1:1",
    "output_format": "png"
  }
}'
import time, requests

API = "https://ai.aimixmedia.site/api/v1"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}

task = requests.post(f"{API}/jobs/createTask", headers=HEADERS, json={
    "model": "google/nano-banana-edit",
    "callBackUrl": "https://your-app.example/callback",
    "input": {
        "prompt": "Replace the background with a neon city at night",
        "image_urls": [
            "https://example.com/photo.jpg"
        ],
        "aspect_ratio": "1:1",
        "output_format": "png"
    }
}).json()
task_id = task["data"]["taskId"]

while True:
    info = requests.get(f"{API}/jobs/recordInfo", headers=HEADERS, params={"taskId": task_id}).json()["data"]
    if info["state"] in ("success", "fail"):
        break
    time.sleep(4)
print(info["state"], info.get("resultJson") or info.get("failMsg"))
const API = "https://ai.aimixmedia.site/api/v1";
const headers = { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" };

const { data } = await fetch(`${API}/jobs/createTask`, {
  method: "POST", headers,
  body: JSON.stringify({
    "model": "google/nano-banana-edit",
    "callBackUrl": "https://your-app.example/callback",
    "input": {
      "prompt": "Replace the background with a neon city at night",
      "image_urls": [
        "https://example.com/photo.jpg"
      ],
      "aspect_ratio": "1:1",
      "output_format": "png"
    }
  }),
}).then((r) => r.json());

let info;
do {
  await new Promise((r) => setTimeout(r, 4000));
  info = (await fetch(`${API}/jobs/recordInfo?taskId=${data.taskId}`, { headers }).then((r) => r.json())).data;
} while (!["success", "fail"].includes(info.state));
console.log(info.state, info.resultJson ?? info.failMsg);

Response: {"code":200,"msg":"success","data":{"taskId":"task_..."}}. callBackUrl and Idempotency-Key are optional.

2. Status and result GET /api/v1/jobs/recordInfo

curl "https://ai.aimixmedia.site/api/v1/jobs/recordInfo?taskId=TASK_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"

data.state: waiting | queuing | generating | success | fail. On success data.resultJson is a JSON string with resultUrls.

3. Upload a photo (optional) POST /api/v1/files/upload

curl -X POST https://ai.aimixmedia.site/api/v1/files/upload \
  -H "Authorization: Bearer YOUR_API_KEY" -F "file=@photo.jpg"

Returns data.url — pass it in input.image_urls. Any public https URL works too.

Input parameters

FieldTypeValues
prompt *stringup to 5000 chars
image_urls *string[] (URL)up to 10 URLs
aspect_ratiostring1:1 | 9:16 | 16:9 | 3:4 | 4:3 | 3:2 | 2:3 | 5:4 | 4:5 | 21:9 | auto · default 1:1
output_formatstringpng | jpeg · default png
You need an API key ? — create one in the dashboard.

Model docs Callbacks & signature

Nano Banana Edit — Google

Photo editing by instruction (ID google/nano-banana-edit): replace the background, clothes or style, or merge several images. At least one reference image is required (up to 10).

Pricing

Image to Image · google/nano-banana-edit$0.02
Text to Image · google/nano-banana$0.02
Task failed$0 (auto refund)
Retry with the same Idempotency-Key$0

Retention

Results are kept for 30 days, run history forever. Download important files in time.

API model ID: google/nano-banana-edit · aliases: nano-banana-edit