API Documentation

Learn how to integrate Nano Banana AI's AI image editing capabilities into your applications

Getting Started

Nano Banana AI API provides powerful AI-driven image editing capabilities through a simple REST interface. Get your API key from your account dashboard and start editing images with natural language prompts.

Base URL

https://api.nanobanana.ai/v1

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header.

Example Authentication Header

Authorization: Bearer YOUR_API_KEY

API Endpoints

POST/edit

Edit an image using natural language prompts.

Request Body

{
  "image": "https://example.com/image.jpg",
  "prompt": "Change background to beach sunset",
  "strength": 0.8,
  "format": "png"
}

Parameters

  • image (string, required) - URL of the image to edit
  • prompt (string, required) - Natural language editing instruction
  • strength (number, optional, default: 0.8) - Edit strength from 0.0 to 1.0
  • format (string, optional, default: "png") - Output format: png, jpg, or webp
POST/batch

Edit multiple images in a single request.

Request Body

{
  "images": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ],
  "prompt": "Make all images have a consistent style",
  "strength": 0.7
}

Features

Responsive Processing

Optimized for common edit sizes and workloads

Secure Access

API key authentication with monitoring and access controls

Batch-Friendly

Submit multiple edits with clear request structures

Global Delivery

Deliver edited assets to users worldwide

Response Format

Success Response

{
  "success": true,
  "edited_images": [
    {
      "url": "https://cdn.nanobanana.ai/edited/abc123.png",
      "format": "png",
      "width": 1024,
      "height": 1024
    }
  ],
  "credits_used": 1,
  "credits_remaining": 999
}

SDKs and Libraries

We offer official SDKs in multiple languages to make integration even easier:

JavaScript/TypeScript
Python
PHP
Ruby

Need Help?

Can't find what you're looking for? Our support team is here to help.