ToAPIs
    HomeToAPIs
    Image GenerationGPT Image 2.6, Gemini, FLUX…Video GenerationSeedance, Veo, Kling, Sora…Chat & WritingGPT-5.6, Claude, DeepSeek…Speech & MusicVoiceover, TTS, Audio
    New ReleaseSeedance 2.5
    PricingAPI DocsMCP
    BlogAlternatives
    Log InStart Free
    All ModelsPricingAPI DocsMCPBlogAlternatives
    Log InStart Free

    Language

    Esc
    • Seedance 2.5Video Generation
    • GPT Image 2Image Generation
    • GPT Image 2.6Image Generation
    • GPT Image 2.5Image Generation
    • Veo 3.1 FastVideo Generation
    • Kling 3.0 TurboVideo Generation
    • Kling V4 FlashVideo Generation
    • Grok Video 1.5Video Generation
    • Nano Banana 2Image Generation
    • Seedream 5.5Image Generation
    • FLUXImage Generation
    • Sora 2Video Generation
    • All Image ModelsCategory
    • All Video ModelsCategory
    • GPT-5.6 SolChat & Coding
    • Claude Opus 4.8Chat & Coding
    • Claude Opus 4.7Chat & Coding
    • DeepSeek V4 ProDeepSeek · Text
    • Gemini Omni 1.1 FlashGoogle · Multimodal

    Quick Answer

    • Supports prompt-based text-to-image workflows for marketing and creative assets.
    • Supports reference-guided generation for stronger style consistency.
    • Stabilize parameters in this guide first, then move into production API.

    Key Parameters

    • model | string | required | gemini-nano-banana-2.1 | - | Exact model identifier from ToAPIs.
    • prompt | string | required | - | - | Primary image instruction prompt.
    • size | string | optional | 1:1 | - | Output aspect ratio, model-dependent.
    • n | integer | optional | 1 | - | Number of generated images per request.
    • reference_images | file[] | optional | - | - | Reference images for style consistency.

    Common Errors

    • 400 invalid_request_error: trigger=Missing or invalid payload fields.; fix=Validate model/prompt/size payload fields.; retry=Retry only after payload fix.
    • 401 authentication_error: trigger=Missing or invalid API key.; fix=Verify Authorization header and key scope.; retry=Retry after authentication fix.

    gemini-nano-banana-2.1

    gemini-nano-banana-2.1 by Google (Gemini) is optimized for image generation/editing workflows. Contracts follow ToAPIs docs for production-ready API integration.

    Model Type:
    Text To ImageImage To Image
    Pricing: 3 credits /request
    Production route
    Live
    PlaygroundSimilarREADMEAPI
    1

    Describe your image

    Reference images

    Describe the image you want to generate.145 / 1200

    Advanced options

    Example params
    2

    Your generated result

    Your image result appears here

    Sign in to submit a generation task.

    View API DocsGet API Key

    Generation takes some time. Please wait.You can leave this page. [ Task Logs ] lets you check the generated content directly.

    Request preview

    {
      "model": "gemini-nano-banana-2.1",
      "prompt": "Create a premium product advertising image with gemini-nano-banana-2.1: clear subject, natural lighting, polished social-media-ready composition.",
      "size": "1:1",
      "resolution": "1K"
    }

    Transparent pricing

    gemini-nano-banana-2.1 pricing

    Image usage is billed according to the current request and resolution rules. Final billing follows the current account quote.

    Top up credits
    3 credits /request

    Why ToAPIs

    Why call gemini-nano-banana-2.1 through ToAPIs?

    Keep image generation, API keys, billing, and usage management in one workflow.

    High-quality generation

    Generate production-ready visual assets via a unified API.

    Reference consistency

    Use references to stabilize style and composition.

    Parameter tuning

    Tune ratio/count/sampling for quality and cost balance.

    Connect in three steps

    Create a key, send an image request, and review the generated result.

    1. 1

      Step 1

      Set Authorization: Bearer <YOUR_API_KEY>.

    2. 2

      Step 2

      Call image generation endpoint with model, prompt, and size.

    3. 3

      Step 3

      Optionally pass reference_images for stronger consistency.

    When to use gemini-nano-banana-2.1

    Use case 1

    When generating marketing, e-commerce, and social visual assets quickly.

    Use case 2

    When reference-guided consistency is required.

    FAQ

    gemini-nano-banana-2.1 FAQ

    What is gemini-nano-banana-2.1 best for?

    Best for high-frequency creative generation and reference-guided consistency workflows.

    Image or video model error: invalid apitype: -1

    This usually means the request was sent to the wrong endpoint. Image and video models typically do not use the chat endpoint. Instead, submit the documented HTTP task request and poll the task status endpoint for results. Check the actual request code, URL, and payload first.

    An image or video task failed, but the user was still charged

    Ask the user for the task log or screenshot first and check whether input or output token usage appears. If token accounting shows up, the request was likely sent through a chat endpoint instead of the proper media workflow. Image and video models usually run as async HTTP task APIs: submit the task first, then poll by task id according to the relevant docs.

    gemini-nano-banana-2.1 API

    Start building with gemini-nano-banana-2.1

    Test an image request here, then continue in the dashboard or API documentation.

    Start for freeView API Docs

    Try gemini-nano-banana-2.1 with one ToAPIs key.

    Use one account and API surface for image generation workflows.

    Sign up to get free credits
    ToAPIs
    HomeToAPIs
    Enterprise AI API Gateway. Access GPT-5, Claude, Gemini and 200+ models through one unified API.

    Popular Models

    • Seedance 2.5 API
    • Seedance 2.0 API
    • Veo 3.1 Fast API
    • Kling 3.0 Turbo API
    Show moreShow less
    • GPT Image 2 API
    • Claude Opus 4.8 API
    • Nano Banana 2 API
    • Seedance 2 Mini API
    • All models

    API Categories

    • AI Image API
    • AI Video API
    • Text-to-Video API
    • Image-to-Video API
    Show moreShow less
    • AI Image Editing API
    • LLM & Reasoning API
    • All API tools →

    Alternatives

    Alternatives
    • Kie.ai alternative
    • Fal.ai alternative
    • OpenRouter alternative
    • Replicate alternative
    • Wavespeed AI alternative
    • All comparisons →

    Featured Guides

    Featured Guides
    • Seedance 2.0 vs 2.5 pricing
    • Cheapest Seedance API guide
    • MiniMax H3 integration guide
    • Free Seedance 2 API key
    • Seedance 2 API quickstart
    • All engineering posts →

    Developers & Platform

    Developers & Platform
    • API documentation
    • MCP
    • Pricing
    • Model playground
    • LLMs.txt
    • Contact support
    • Model guide directory
    Operating entity:
    鯨樞智能科技有限公司
    JINGSHU INTELLIGENT LIMITED
    Registered office:
    ROOM 5042, 5/F, YAU LEE CENTRE, NO.45, HOI YUEN ROAD, KWUN TONG, KOWLOON, HONG KONG
    PrivacyTermsAcceptable UseData DeletionData RetentionSubprocessors & RegionsBilling & RefundsCookie PolicySitemapAbout

    © 2026 ToAPIs. All rights reserved.