rreAPI Docs
rreAPI Docs
HomeWelcome

Image

nano-banana-2-litemidjourney-v8flux-2z-imageqwen-image-2midjourney-v7wan-2-7-imagegpt-image-2gpt-image-2-officialgemini-2.5-flash-image-previewgemini-3-pro-image-previewgemini-3.1-flash-image-previewdoubao-seedream-5-0-liteimagen-4-0

Audio

Mureka V9 Song APIVocal Remover APIMusic Extractor APIVoice Cleaner APIMultistem Splitter APIVoice Changer API

Video

topaz-video-upscalerkling-3-0-turbokling-3-0music-video-1-0wan-2-7-videokling-motion-controlpixverse-v6Seedance 2.5doubao-seedance-2.0doubao-seedance-2.0-officialseedance-2-0-minihappyhorse-1-1happyhorse-1.0happyhorse-1.0-officialviduq3grok-imagine-video-1.5-betagrok-imagine-1.0-videoVeo 3.1gemini-omni

Chat

claude-fable-5minimax-m3deepseek-v4gpt-5.5gpt-5.4claude-opus-4-8claude-opus-4-7claude-sonnet-4-6

Text

ai-essay-writerhumanizeai-text-detector

Tools

enhance-video-1.0
X (Twitter)

nano-banana-2-lite

Nano Banana 2 Lite (Gemini 3.1 Flash-Lite Image) on reAPI — fast, low-cost 1K text-to-image and prompt-based image editing with up to 10 reference images, on one async endpoint.

Google DeepMind's Nano Banana 2 Lite (aka Gemini 3.1 Flash-Lite Image) on reAPI — the speed-focused member of the Nano Banana family: fast 1K text-to-image and prompt-based image editing with up to 10 reference images. Submit returns a task_id; poll until ready. See current pricing on the model page.

Quick example

curl https://reapi.ai/api/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-2-lite",
    "prompt": "a pig on the grass, cinematic light",
    "aspect_ratio": "16:9"
  }'
import requests

resp = requests.post(
    "https://reapi.ai/api/v1/images/generations",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
        "model": "nano-banana-2-lite",
        "prompt": "a pig on the grass, cinematic light",
        "aspect_ratio": "16:9",
    },
    timeout=30,
)
print(resp.json())
const r = await fetch("https://reapi.ai/api/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "nano-banana-2-lite",
    prompt: "a pig on the grass, cinematic light",
    aspect_ratio: "16:9",
  }),
});
console.log(await r.json());
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
)

func main() {
    body, _ := json.Marshal(map[string]any{
        "model":        "nano-banana-2-lite",
        "prompt":       "a pig on the grass, cinematic light",
        "aspect_ratio": "16:9",
    })
    req, _ := http.NewRequest("POST",
        "https://reapi.ai/api/v1/images/generations", bytes.NewReader(body))
    req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")

    resp, _ := http.DefaultClient.Do(req)
    defer resp.Body.Close()
    out, _ := io.ReadAll(resp.Body)
    fmt.Println(string(out))
}

Submit response

{
  "id": "task_019f25700fef760e879fc22ad9de512c",
  "model": "nano-banana-2-lite",
  "status": "processing",
  "created_at": 1783039530
}

Poll GET /api/v1/tasks/{id} (see the Tasks reference) until status === "completed". The completed payload's output.image_urls holds the generated image URL.


Authentication

Every call needs a Bearer token. Generate keys at reapi.ai/settings/apikeys.

Authorization: Bearer YOUR_API_KEY

Endpoint

POST /api/v1/images/generations
GET  /api/v1/tasks/{id}

Submission is async. The POST returns immediately with a task_id; the task endpoint returns the same envelope until completion. Polling does not consume credits.

The generation mode is implicit — there is no mode field:

  • No image_urls (or an empty array) → text-to-image.
  • image_urls set → prompt-based editing / reference-driven generation using up to 10 input images.

Each request produces exactly one 1K image (no n parameter, no resolution control).


Request body

model — string, required

Must be nano-banana-2-lite.

prompt — string, required

Up to 20,000 characters. For text-to-image, describe subject, scene, style and composition. For editing, state the change you want ("replace the background with…", "make it nighttime, keep the subject unchanged").

image_urls — string[], optional

Up to 10 public http(s) image URLs used as edit sources or visual references. Accepted types: JPEG, PNG, WebP; up to 30 MB per image. Omit it (or pass an empty array) for pure text-to-image.

Base64 / data: URIs are rejected platform-wide — host the image on a public URL first.

aspect_ratio — string, default auto

One of 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9, auto. With auto the model chooses the ratio itself (for edits it follows the source image).


Pricing

Nano Banana 2 Lite bills a flat rate per generated image, independent of aspect ratio and mode (text-to-image and editing cost the same). Each request produces one image:

credits = ceil(per_image_usd × 1000)

where 1 credit = $0.001 USD. It is one of the lowest per-image rates on the platform. Failed and rejected requests are not charged.

The exact per-image credit cost surfaces on the model page and through the playground estimator before submit.


Response

The poll envelope returns the image URL in output.image_urls:

{
  "id": "task_019f25700fef760e879fc22ad9de512c",
  "model": "nano-banana-2-lite",
  "status": "completed",
  "output": {
    "image_urls": [
      "https://cdn.reapi.ai/...jpeg"
    ]
  }
}

Generated URLs expire — mirror them to your own storage if you need long-term retention.


Errors

Failures return the standard reAPI envelope { error: { code, message, request_id } }. Common cases:

  • Invalid input (prompt over 20,000 characters, more than 10 image_urls, an unsupported aspect_ratio) → 400.
  • Insufficient credits → 402.
  • Rate limited → 429.

See the full catalog at /docs/api/errors.


Tips

  • Nano Banana 2 Lite is the speed tier of the Nano Banana family — pick it for drafts, previews and high-volume 1K assets; step up to Nano Banana 2 when you need 2K/4K output or maximum quality.
  • For edits, reference what should stay unchanged ("keep the furniture and composition unchanged") — the model is strong at targeted, consistent edits.
  • aspect_ratio: "auto" follows the source image on edits; set an explicit ratio when you need a fixed canvas (e.g. 16:9 thumbnails).

Related

  • Nano Banana 2
  • Nano Banana Pro
  • Z-Image
  • Tasks API
  • Error codes

Table of Contents

Quick example
Submit response
Authentication
Endpoint
Request body
model — string, required
prompt — string, required
image_urls — string[], optional
aspect_ratio — string, default auto
Pricing
Response
Errors
Tips
Related