> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pollo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Nano Banana API Documentation

> Nano Banana API delivers ultra-fast image generation with perfect character consistency. Experience precise multi-image fusion and advanced natural language image refinement for professional-grade visual outputs. Integrate the Nano Banana API now.

Check out Nano Banana API pricing [here](https://api.pollo.ai/pricing?modelName=nano-banana\&modelType=image), cheaper than Fal AI.


## OpenAPI

````yaml POST /generation/google/nano-banana/image
openapi: 3.0.3
info:
  title: Pollo | AI Video Collection
  description: >-
    ✨RESTful API Document. Model discovery: GET /api/v1/model-specs (public,
    keyless).
  version: 1.0.0
servers:
  - url: https://pollo.ai/api/platform
security: []
externalDocs:
  url: https://pollo.ai/api/platform/api/openapi.json
paths:
  /generation/google/nano-banana/image:
    post:
      tags:
        - generation
        - image generation
      summary: create image by text or image
      operationId: generation-nano-banana/image
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  anyOf:
                    - allOf:
                        - {}
                        - anyOf:
                            - type: object
                              properties:
                                prompt:
                                  type: string
                                  minLength: 1
                                  maxLength: 10000
                                  description: The prompt of the generation
                                aspectRatio:
                                  type: string
                                  enum:
                                    - '1:1'
                                    - '9:16'
                                    - '16:9'
                                    - '4:3'
                                    - '3:4'
                                    - '3:2'
                                    - '2:3'
                                    - '5:4'
                                    - '4:5'
                                    - '21:9'
                                imageUrl:
                                  type: string
                                  maxLength: 1000
                                  format: uri
                                  pattern: ^(?:http|https):\/\/
                                images:
                                  type: array
                                  items:
                                    type: string
                                    maxLength: 1000
                                    format: uri
                                    pattern: ^(?:http|https):\/\/
                                  maxItems: 8
                                  description: >-
                                    Only image URLs are accepted (HTTPS
                                    preferred); base64 is not allowed.
                                                Supported formats include JPG, PNG, and JPEG.
                                                Image aspect ratio must be less than 1:4 or 4:1.
                              required:
                                - prompt
                                - aspectRatio
                                - imageUrl
                              additionalProperties: false
                            - type: object
                              properties:
                                prompt:
                                  type: string
                                  minLength: 1
                                  maxLength: 10000
                                  description: The prompt of the generation
                                aspectRatio:
                                  type: string
                                  enum:
                                    - '1:1'
                                    - '9:16'
                                    - '16:9'
                                    - '4:3'
                                    - '3:4'
                                    - '3:2'
                                    - '2:3'
                                    - '5:4'
                                    - '4:5'
                                    - '21:9'
                                imageUrl:
                                  type: string
                                  maxLength: 1000
                                  format: uri
                                  pattern: ^(?:http|https):\/\/
                                images:
                                  type: array
                                  items:
                                    type: string
                                    maxLength: 1000
                                    format: uri
                                    pattern: ^(?:http|https):\/\/
                                  minItems: 1
                                  maxItems: 8
                                  description: >-
                                    Only image URLs are accepted (HTTPS
                                    preferred); base64 is not allowed.
                                                Supported formats include JPG, PNG, and JPEG.
                                                Image aspect ratio must be less than 1:4 or 4:1.
                              required:
                                - prompt
                                - aspectRatio
                                - images
                              additionalProperties: false
                    - allOf:
                        - {}
                        - type: object
                          properties:
                            prompt:
                              type: string
                              minLength: 1
                              maxLength: 10000
                              description: The prompt of the generation
                            aspectRatio:
                              type: string
                              enum:
                                - '1:1'
                                - '9:16'
                                - '16:9'
                                - '4:3'
                                - '3:4'
                                - '3:2'
                                - '2:3'
                                - '5:4'
                                - '4:5'
                                - '21:9'
                          required:
                            - prompt
                            - aspectRatio
                          additionalProperties: false
                      title: Text To Image
                webhookUrl:
                  type: string
                clientSource:
                  type: string
                  minLength: 1
                  maxLength: 100
              required:
                - input
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskId:
                    type: string
                  status:
                    type: string
                    enum:
                      - waiting
                      - succeed
                      - failed
                      - processing
                required:
                  - taskId
                  - status
                additionalProperties: false
        '400':
          $ref: '#/components/responses/ApiError400'
        '401':
          $ref: '#/components/responses/ApiError401'
        '403':
          $ref: '#/components/responses/ApiError403'
        '404':
          $ref: '#/components/responses/ApiError404'
        '429':
          $ref: '#/components/responses/ApiError429'
        '500':
          $ref: '#/components/responses/ApiError500'
        default:
          $ref: '#/components/responses/error'
      security:
        - ApiKeyAuth: []
components:
  responses:
    ApiError400:
      description: >-
        Invalid request — schema validation failed (`INPUT_VALIDATION_FAILED`,
        detail in `issues`), a cross-field constraint was violated
        (`INPUT_CONSTRAINT_VIOLATED`), or the input did not pass moderation
        (`MODERATION_*`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiError401:
      description: >-
        Missing or invalid credential (`CREDENTIAL_*`, `CLI_TOKEN_EXPIRED`,
        `EMAIL_LOGIN_REQUIRED`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiError403:
      description: >-
        Rejected — not enough credits (`CREDITS_INSUFFICIENT`), quota exhausted
        (`QUOTA_*`), plan required (`PLAN_FEATURE_REQUIRED`), account state
        (`ACCOUNT_*`), or no permission (`PERMISSION_DENIED`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiError404:
      description: >-
        Nothing matched — unknown route, model (`MODEL_NOT_FOUND`), task
        (`TASK_NOT_FOUND`) or asset (`ASSET_NOT_FOUND`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiError429:
      description: >-
        Rate limited (`RATE_LIMIT_*`). `RATE_LIMIT_MODERATION` means recent
        content was blocked — adjust the input rather than simply retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ApiError500:
      description: Unexpected server-side failure (`INTERNAL`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    error:
      description: >-
        Error response. Every failure on this API uses this shape; branch on
        `errorCode`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    ApiError:
      type: object
      required:
        - errorCode
        - message
        - code
      additionalProperties: true
      properties:
        errorCode:
          type: string
          enum:
            - REJECTED
            - INTERNAL
            - CREDENTIAL_MISSING
            - CREDENTIAL_INVALID
            - CLI_TOKEN_EXPIRED
            - CLI_REFRESH_TOKEN_INVALID
            - PERMISSION_DENIED
            - ACCOUNT_SUSPENDED
            - ACCOUNT_DELETED
            - CREDITS_INSUFFICIENT
            - PLAN_FEATURE_REQUIRED
            - PARALLEL_TASK_LIMIT_REACHED
            - ACTIVITY_DAILY_LIMIT_REACHED
            - QUOTA_ELEMENT_FREE
            - QUOTA_ELEMENT_PAID
            - QUOTA_BRAND_KIT_FREE
            - QUOTA_BRAND_KIT_PAID
            - RATE_LIMIT_EXCEEDED
            - RATE_LIMIT_PRODUCT_EXTRACT
            - INPUT_VALIDATION_FAILED
            - MODERATION_REJECTED
            - ASSET_DISABLED_BY_REVIEW
            - GENERATION_IN_PROGRESS
          description: >-
            Stable business error identifier — **the only field to branch on**.
            Codes are append-only: existing codes are never renamed or
            repurposed, but new ones are added over time, so treat this as an
            open set. Match the exact code you handle, else the family prefix
            (`MODERATION_`, `RATE_LIMIT_`, `QUOTA_`, `ACCOUNT_`, …), else fall
            back to the HTTP status.
        message:
          type: string
          description: >-
            Developer-facing text. Varies with locale and product copy — **never
            match on it**.
        code:
          type: string
          description: >-
            Transport-level code (tRPC / JSON-RPC naming). Deprecated for
            business logic; may be removed.
        requestId:
          type: string
          description: Correlation id — quote it when contacting support.
        issues:
          type: array
          description: >-
            Per-field validation detail. Present when `errorCode` is
            `INPUT_VALIDATION_FAILED`.
          items:
            type: object
            required:
              - message
            additionalProperties: true
            properties:
              message:
                type: string
              path:
                type: array
                items:
                  type: string
                description: Path to the offending field.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key to authorize requests

````