Nano AI API Documentation

Use one public API surface for every Nano AI model. Select nano, nano2, or nano2pro with the model parameter.

Nano AI API Base URL: https://nanobnana.com

Quick Start

Use /api/generate for text-to-image, /api/edit for image editing, and /api/status for every task. Do not switch endpoints to select a model. Set model to nano, nano2, or nano2pro.

bash
curl -X POST "https://nanobnana.com/api/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A professional product photo of a modern wristwatch on a clean white background",
    "model": "nano2"
  }'

How Routing Works

POST /api/generate

Text to image

Creates a generation task. The model field decides whether the request goes to nano, nano2, or nano2pro.

POST /api/edit

Image editing

Creates an editing task with image URLs. The same model field selects the backend.

GET /api/status

Task status

Checks any task. The API infers the backend from the task_id format, with model only as an optional fallback.

Available Models

ModelModel nameUse case
nanoOriginal Nano AI FastBackward-compatible default for existing integrations.
nano2Nano AI 2Recommended default for new image generation integrations.
nano2proNano AI 2 ProHigher quality generation and editing workflows.

Unified Endpoints

Task Status

For legacy nano...ban tasks, status: 3 means the task is still processing, not failed. Prefer status_code across all models: 1 success, 2 failed, 3 in progress.