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

# Nano Banana Image Generation

> Fast image generation powered by Gemini 2.5 Flash

<Tip>
  1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
  2. Regardless of whether `callback_url` is provided, you can retrieve the response result through the unified [Query Task Status](/api-manual/task-management/status) endpoint.
</Tip>

# Nano Banana Image Generation

Fast and efficient image generation powered by Google's Gemini 2.5 Flash model. Ideal for quick iterations and high-throughput applications.

## Available Models

* **nano-banana** - Text-to-image and image-to-image generation
* **nano-banana-edit** - Advanced image editing capabilities


## OpenAPI

````yaml /api-manual/image-series/nano-banana.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Nano Banana API
  description: Fast Image Generation powered by Gemini 2.5 Flash
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Nano Banana
      summary: Submit Nano Banana Generation Task
      description: Fast image generation and editing using Gemini 2.5 Flash
      operationId: submitNanoBananaTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              nano-banana:
                summary: Nano Banana Image Generation
                value:
                  model: nano-banana
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: A cyberpunk street scene with neon signs and rain
                    size: '16:9'
              nano-banana-edit:
                summary: Nano Banana Image Edit
                value:
                  model: nano-banana-edit
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: Add colorful flowers in the foreground
                    image_urls:
                      - https://example.com/landscape.jpg
                    size: '16:9'
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 400
                error:
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: Unauthorized - Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 401
                error:
                  message: Unauthorized - Invalid API key
                  type: authentication_error
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
      properties:
        model:
          type: string
          description: Nano Banana model identifier
          enum:
            - nano-banana
            - nano-banana-edit
        callback_url:
          type: string
          format: uri
          description: Webhook callback URL for result notifications
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          description: Input parameters for generation
          properties:
            prompt:
              type: string
              description: Generation prompt describing the desired output
              maxLength: 1000
              example: A beautiful sunset over the ocean
            image_urls:
              type: array
              items:
                type: string
                format: uri
              description: Reference image URLs (for image editing)
              example: []
            size:
              type: string
              description: Image size ratio
              enum:
                - '1:1'
                - '2:3'
                - '3:2'
                - '3:4'
                - '4:3'
                - '4:5'
                - '5:4'
                - '9:16'
                - '16:9'
                - '21:9'
              example: '16:9'
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          description: HTTP status code
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
              description: Unique task identifier for status tracking
            status:
              type: string
              enum:
                - not_started
              example: not_started
              description: Initial task status
            created_time:
              type: string
              format: date-time
              example: '2025-11-12T10:30:00'
              description: ISO 8601 timestamp when the task was created
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          description: HTTP status code
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
              description: Error message describing what went wrong
            type:
              type: string
              example: invalid_request_error
              description: Error type identifier
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API endpoints require Bearer Token authentication


        Get your API Key:


        Visit the [API Key Management
        Page](https://vidgo.ai/apis/dashboard/api-key) to get your API Key


        Add it to the request header:


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````