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

# Submit Nano Banana 2 Lite task

> POST a Nano Banana 2 Lite image generation or editing task

## Submit task

`prompt` is required. Omit `image_urls` for text-to-image, or provide up to 10 public HTTP(S) image URLs. This Lite model does not accept `resolution` or `output_format`.

```bash theme={null}
curl --fail-with-body --silent --show-error \
  -X POST https://api.wizzx.ai/api/v1/task/submit/nano-banana-2-lite \
  -H "Authorization: Bearer <api_key>" \
  -H "Content-Type: application/json" \
  --data '{
    "prompt": "A playful orange robot sticker",
    "aspect_ratio": "1:1"
  }'
```

If omitted, `aspect_ratio` defaults to `auto`.


## OpenAPI

````yaml POST /api/v1/task/submit/nano-banana-2-lite
openapi: 3.0.3
info:
  title: Wizzx AI API
  version: 1.2.0
  description: >-
    Wizzx asynchronous image, video, and audio generation API. Model keys are
    placed in the submit URL. Submit returns a Wizzx task_id; poll that ID
    through /api/v1/task/status. Authentication uses a Wizzx API key in the
    Authorization: Bearer <key> header.
  license:
    name: MIT
    url: https://github.com/tonyljx/documentation/blob/main/LICENSE
servers:
  - url: https://api.wizzx.ai
    description: Production API
security: []
tags:
  - name: Discovery
    description: Public model and pricing discovery.
  - name: Credits
    description: Authenticated credit balance.
  - name: Image generation
    description: Asynchronous image tasks.
  - name: Video generation
    description: Asynchronous video tasks.
  - name: Audio generation
    description: Asynchronous speech tasks.
  - name: Tasks
    description: Asynchronous task status.
  - name: Legacy models
    description: >-
      Compatibility-only models hidden from /pricing. Do not select these
      automatically.
paths:
  /api/v1/task/submit/nano-banana-2-lite:
    post:
      tags:
        - Image generation
      summary: Submit Nano Banana 2 Lite task
      description: >-
        Creates one asynchronous paid task. Save data.task_id and poll the
        status endpoint. Do not automatically retry an ambiguous submit.
      operationId: submitNanoBanana2LiteTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NanoBanana2LiteSubmitRequest'
            example:
              prompt: A playful sticker illustration
              aspect_ratio: '1:1'
      responses:
        '200':
          description: Task accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskSubmitResponse'
        '400':
          description: Malformed JSON or binding validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing, invalid, or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Request body exceeds the configured limit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Model-specific validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-Retry-After:
              description: Retry delay in seconds.
              schema:
                type: integer
                minimum: 0
        '500':
          description: Internal or upstream submission error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service or model temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    NanoBanana2LiteSubmitRequest:
      type: object
      additionalProperties: false
      required:
        - prompt
      properties:
        prompt:
          type: string
          minLength: 1
          description: Required prompt. The gateway enforces a 20000-byte UTF-8 limit.
          x-wizzx-maxBytes: 20000
        image_urls:
          type: array
          maxItems: 10
          items:
            type: string
            format: uri
            pattern: ^https?://
            description: Publicly reachable HTTP(S) URL.
        aspect_ratio:
          type: string
          enum:
            - '1:1'
            - '1:4'
            - '1:8'
            - '2:3'
            - '3:2'
            - '3:4'
            - '4:1'
            - '4:3'
            - '4:5'
            - '5:4'
            - '8:1'
            - '9:16'
            - '16:9'
            - '21:9'
            - auto
          default: auto
    TaskSubmitResponse:
      type: object
      required:
        - code
        - message
        - data
        - request_id
      properties:
        code:
          type: integer
          enum:
            - 0
        message:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/TaskSubmitData'
        request_id:
          type: string
          format: uuid
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
        request_id:
          type: string
          format: uuid
        retry_after:
          type: integer
          format: int64
          minimum: 0
          description: Retry delay in seconds. Present for rate-limit errors.
    TaskSubmitData:
      type: object
      required:
        - task_id
        - model_key
        - credits_deducted
      properties:
        task_id:
          type: string
          format: uuid
          description: Wizzx task ID used for status polling.
        model_key:
          type: string
        credits_deducted:
          type: integer
          minimum: 0
          description: Credits reserved when the task is accepted.
        provider_task_id:
          type: string
          description: Diagnostic field returned only when debug=1.
        provider_key:
          type: string
          description: Diagnostic field returned only when debug=1.
    ErrorDetail:
      type: object
      required:
        - message
        - type
        - param
        - code
      properties:
        message:
          type: string
        type:
          type: string
          enum:
            - invalid_request_error
            - authentication_error
            - insufficient_quota
            - permission_denied
            - not_found_error
            - conflict_error
            - unprocessable_entity_error
            - rate_limit_error
            - server_error
            - service_unavailable
        param:
          type: string
          nullable: true
        code:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Wizzx API key. This is not a JWT.

````