ToAPIs
    homeToAPIs
    模型廣場模型定價API 文檔
    登錄免費開始

    快速结论

    • 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.

    关键参数

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

    常见错误

    • 400 invalid_request_error: 触发=Missing or invalid payload fields.; 修复=Validate model/prompt/size payload fields.; 重试=Retry only after payload fix.
    • 401 authentication_error: 触发=Missing or invalid API key.; 修复=Verify Authorization header and key scope.; 重试=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.

    模型類型:
    價格: 3 積分 /request
    體驗區相關能力READMEAPI
    1

    描述你的圖片

    參考圖

    描述你想生成的圖片。56 / 1200

    進階選項

    範例參數
    2

    你的生成結果

    圖片結果會顯示在這裡

    登入後可直接提交生成任務。

    查看 API 文件取得 API Key

    生成需要一些時間,請稍等您可以離開此頁面,[ 任務日誌 ] 可直接檢查生成的內容

    請求預覽

    {
      "model": "gemini-nano-banana-2.1",
      "prompt": "使用 gemini-nano-banana-2.1 生成一张高质感产品广告图,主体清晰,光线自然,适合社媒投放。",
      "size": "1:1",
      "n": 1,
      "resolution": "1K"
    }

    透明計價

    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.

    儲值積分
    3 積分 /request

    為什麼選擇 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.

    常見問題

    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.

    图像视频模型报错:invalid apitype: -1

    这类错误通常说明接口走错了。图像和视频模型一般不走 chat 接口,而是按对应文档发起 HTTP 任务请求,并通过任务状态接口轮询结果。排查时建议先看用户的实际请求代码、请求地址和请求体。

    用户进行生成图片/视频的任务时出现任务失败,但是扣款

    先让用户提供任务日志或截图,重点看是否出现了输入或输出 token 统计。如果有这类 token 记录,大概率是用户把图片/视频模型走成了 chat 接口;这不是正确用法。图片和视频模型通常是异步任务接口,需要通过 HTTP 请求先提交任务,再拿到任务 ID 轮询状态,详细以对应文档为准。

    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

    企業級 AI API 閘道,透過一套介面接入文字、圖片、影片與音訊模型。

    运营主体:
    鯨樞智能科技有限公司
    JINGSHU INTELLIGENT LIMITED
    注册地址:
    ROOM 5042, 5/F, YAU LEE CENTRE, NO.45, HOI YUEN ROAD, KWUN TONG, KOWLOON, HONG KONG
    联系方式:
    support@toapis.com

    模型

    • Sora 2 API
    • Veo 3.1 API
    • GPT Image 2 API
    • 所有模型

    替代方案

    • Fal.ai 替代方案
    • Wavespeed AI 替代方案
    • PiAPI 替代方案
    • CometAPI 替代方案
    • Replicate 替代方案
    • AIMLAPI 替代方案

    資源

    • 文檔
    • 服務狀態
    • 定價
    • 隱私政策
    • 服務條款
    • 使用政策
    • 資料刪除政策
    • 資料保留政策
    • 次處理者與資料區域
    • 計費與退款說明
    • Cookie 政策
    • 網站地圖
    • 關於我們

    © 2026 ToAPIs. 版權所有。