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

# Nano Banana Text to Image

> Generate images using Nano Banana model (async)

Generate images from text using [Google DeepMind](https://deepmind.google)'s Nano Banana (Gemini 2.5 Flash) model.

**Key Features:**

* **Fast Generation** - Built on Gemini 2.5 Flash for quick image generation
* **Cost-Effective** - Lower cost, suitable for batch generation scenarios
* **1K Resolution** - Supports up to 1024x1024 pixel output
* **Strong Understanding** - Inherits Gemini's semantic understanding and reasoning capabilities


## OpenAPI

````yaml /en/openapi.yaml POST /generate/k/nano-banana
openapi: 3.0.0
info:
  contact:
    email: support@sinancode.com
    name: API Support
    url: https://sinancode.com/support
  description: AI Model Task Scheduling Platform API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://sinancode.com/terms-of-service
  title: TikTomato API
  version: '1.0'
servers:
  - url: https://api.sinancode.com/v1
    description: Production server
security: []
paths:
  /generate/k/nano-banana:
    post:
      tags:
        - public
      summary: Nano Banana Image Generation
      description: Generate images using Nano Banana model (async)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ka.CreateNanoBananaTaskRequest'
        description: Task parameters
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.CreateTaskResponse'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
      security:
        - AccessToken: []
components:
  schemas:
    ka.CreateNanoBananaTaskRequest:
      properties:
        image_size:
          default: '1:1'
          description: Image size (optional, default 1:1) - Image aspect ratio
          enum:
            - '1:1'
            - '9:16'
            - '16:9'
            - '3:4'
            - '4:3'
            - '3:2'
            - '2:3'
            - '5:4'
            - '4:5'
            - '21:9'
            - auto
          example: '1:1'
          type: string
        output_format:
          description: outputformat（optional）- imageoutputformat
          enum:
            - png
            - jpeg
          example: png
          type: string
        prompt:
          description: >-
            Prompt (required, max 5000 characters) - Text description for image
            generation
          example: >-
            A surreal painting of a giant banana floating in space, stars and
            galaxies in the background, vibrant colors, digital art
          maxLength: 5000
          minLength: 1
          type: string
      required:
        - prompt
      type: object
    dto.CreateTaskResponse:
      properties:
        task_id:
          description: Task ID
          example: 01234567-89ab-cdef-0123-456789abcdef
          type: string
      required:
        - task_id
      type: object
    apierror.ErrorResponse:
      properties:
        error_code:
          description: Machine-readable error code (e.g., TASK.INVALID_PARAMS)
          type: string
        message:
          description: User-friendly error message
          type: string
      type: object
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Please use your API Token for authentication

````