MixMedia API
RUEN
Sign inCreate for free
Open as Markdown
← Try it on the website
Google

Nano Banana 2

Google · under 1 min
from $0.015per picture

Google's main image model: fast pictures and photo edits, accurate text on images, up to 14 photos at once.

Edit a photo nano-banana-2 · 0.5K $0.015 · 1K $0.015 · 2K $0.020 · 4K $0.025Create a picture nano-banana-2 · 0.5K $0.015 · 1K $0.015 · 2K $0.020 · 4K $0.025

Nano Banana 2 is Google's main image model. It keeps faces and characters recognisable, writes readable text on pictures, understands long detailed descriptions and can use up to 14 of your photos to edit, combine or copy a style.

ModeIDPrice
Edit a photonano-banana-20.5K $0.015 · 1K $0.015 · 2K $0.020 · 4K $0.025
Create a picturenano-banana-20.5K $0.015 · 1K $0.015 · 2K $0.020 · 4K $0.025

Both modes are one model, nano-banana-2: pass photos and it edits them or uses them as references.

Edit a photo

Upload a photo and describe what to change. ID: nano-banana-2 · 0.5K $0.015 · 1K $0.015 · 2K $0.020 · 4K $0.025 per image · under 1 min

Parameters (field input)

ParameterRequiredDescriptionValues (default in bold)
promptyesWhat to draw or what to changetext, up to 20000 chars
image_inputyesLinks to your photos (https), up to 14["https://…"]
aspect_rationoImage shapeauto 1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9 1:4 4:1 1:8 8:1
resolutionnoLong side: 0.5K ≈ 512 px, 1K ≈ 1024 px, 2K ≈ 2048 px, 4K ≈ 4096 px. Sizes above native are an upscale of the finished picture (Lanczos + light sharpening): 4K on Nano Banana 2 and Pro from 2K, 2K on Nano Banana from 1K, 2K and 4K on GPT Image from its native ~1.5K0.5K 1K 2K 4K
output_formatnoFile formatjpg png

Example

curl -X POST https://mixmedia.tech/api/v1/jobs/createTask \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"nano-banana-2","input":{"prompt":"Make the background a neon city at night","image_input":["https://mixmedia.tech/static/img/previews/gpt-t2i.jpg"],"aspect_ratio":"auto","resolution":"1K"}}'
import os, requests

r = requests.post(
    "https://mixmedia.tech/api/v1/jobs/createTask",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    json={
      "model": "nano-banana-2",
      "input": {
        "prompt": "Make the background a neon city at night",
        "image_input": [
          "https://mixmedia.tech/static/img/previews/gpt-t2i.jpg"
        ],
        "aspect_ratio": "auto",
        "resolution": "1K"
      }
    },
)
print(r.json())  # {"code": 200, "data": {"taskId": "..."}}
const r = await fetch("https://mixmedia.tech/api/v1/jobs/createTask", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "model": "nano-banana-2",
    "input": {
      "prompt": "Make the background a neon city at night",
      "image_input": [
        "https://mixmedia.tech/static/img/previews/gpt-t2i.jpg"
      ],
      "aspect_ratio": "auto",
      "resolution": "1K"
    }
  }),
});
console.log(await r.json()); // { code: 200, data: { taskId: "..." } }

Create a picture

Describe the picture and the model creates it from scratch. ID: nano-banana-2 · 0.5K $0.015 · 1K $0.015 · 2K $0.020 · 4K $0.025 per image · under 1 min

Parameters (field input)

ParameterRequiredDescriptionValues (default in bold)
promptyesWhat to draw or what to changetext, up to 20000 chars
aspect_rationoImage shapeauto 1:1 2:3 3:2 3:4 4:3 4:5 5:4 9:16 16:9 21:9 1:4 4:1 1:8 8:1
resolutionnoLong side: 0.5K ≈ 512 px, 1K ≈ 1024 px, 2K ≈ 2048 px, 4K ≈ 4096 px. Sizes above native are an upscale of the finished picture (Lanczos + light sharpening): 4K on Nano Banana 2 and Pro from 2K, 2K on Nano Banana from 1K, 2K and 4K on GPT Image from its native ~1.5K0.5K 1K 2K 4K
output_formatnoFile formatjpg png

Example

curl -X POST https://mixmedia.tech/api/v1/jobs/createTask \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"nano-banana-2","input":{"prompt":"A cat astronaut in a neon city, cinematic light","aspect_ratio":"auto","resolution":"1K"}}'
import os, requests

r = requests.post(
    "https://mixmedia.tech/api/v1/jobs/createTask",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    json={
      "model": "nano-banana-2",
      "input": {
        "prompt": "A cat astronaut in a neon city, cinematic light",
        "aspect_ratio": "auto",
        "resolution": "1K"
      }
    },
)
print(r.json())  # {"code": 200, "data": {"taskId": "..."}}
const r = await fetch("https://mixmedia.tech/api/v1/jobs/createTask", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "model": "nano-banana-2",
    "input": {
      "prompt": "A cat astronaut in a neon city, cinematic light",
      "aspect_ratio": "auto",
      "resolution": "1K"
    }
  }),
});
console.log(await r.json()); // { code: 200, data: { taskId: "..." } }

Compatibility

apimart/OpenAI-style requests work too:

  • model: nano-banana-2, google/nano-banana-2, nano-banana-2-ext, gemini-3.1-flash-image-preview, gemini-3.1-flash-image-preview-official.
  • size instead of aspect_ratio: a ratio (16:9) or exact pixels (1600x1200) — we use the closest supported ratio.
  • Photos can go in image_urls, image_input or input_urls. Parameters may also be sent at the top level of the body, without the input wrapper.
  • resolution in any case (1k, 2K); jpg and jpeg are the same. n must be 1 (one image per request).
  • nsfw_check, official_fallback, google_search are accepted but do not change the result.

Result

Same as any task: call recordInfo or receive a callback. Image links are in resultJson (kept for 24 hours).

Upload your photos via files/upload or pass any public https links.

© 2026 MixMedia