Logo
Logo
API OverviewAuthenticationGenerate Images
API Testing Guide
API Reference

API Overview

NB Pro API for programmatic image generation

Introduction

The NB Pro API allows you to generate images programmatically using our AI image generation service. This API provides the same capabilities as the web interface, enabling you to integrate image generation into your applications, workflows, and services.

Base URL

All API requests should be made to:

https://nano-banana-pro.net/api

Features

Image Generation

Generate high-quality images from text prompts with support for 1K, 2K, and 4K resolutions.

API Key Authentication

Secure Bearer token authentication for all API requests.

Image-to-Image

Upload reference images to guide the generation process.

Flexible Options

Control aspect ratio, quality, and output format.

Quick Start

1. Get Your API Key

Navigate to Settings > API Keys to create your API key. API access requires an active subscription.

2. Make Your First Request

curl -X POST https://nano-banana-pro.net/api/ai/nano-banana/generate \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "a beautiful sunset over the ocean, 4K quality",
    "size": "4k",
    "aspectRatio": "16:9"
  }'
const response = await fetch('https://nano-banana-pro.net/api/ai/nano-banana/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk-your-api-key',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    prompt: 'a beautiful sunset over the ocean, 4K quality',
    size: '4k',
    aspectRatio: '16:9',
  }),
});

const data = await response.json();
console.log(data.images[0].url);
import requests

response = requests.post(
    'https://nano-banana-pro.net/api/ai/nano-banana/generate',
    headers={
        'Authorization': 'Bearer sk-your-api-key',
        'Content-Type': 'application/json',
    },
    json={
        'prompt': 'a beautiful sunset over the ocean, 4K quality',
        'size': '4k',
        'aspectRatio': '16:9',
    }
)

data = response.json()
print(data['images'][0]['url'])

Rate Limits & Credits

  • Each API request consumes credits from your account
  • 1K/2K quality: 1 credit per generation
  • 4K quality: 1.5 credits per generation
  • Credits are shared between web and API usage

Next Steps

Authentication

Learn how to authenticate your API requests

Generate Images

Detailed documentation for the image generation endpoint

Authentication

How to authenticate with the NB Pro API

Table of Contents

Introduction
Base URL
Features
Quick Start
1. Get Your API Key
2. Make Your First Request
Rate Limits & Credits
Next Steps