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

# Create a WonderClip image task

> Create an asynchronous WonderClip text-to-image or image-to-image task.



## OpenAPI

````yaml openapi/wonderclip-image.yaml POST /wonderclip-images/generations
openapi: 3.1.0
info:
  title: WonderClip image API
  version: 1.0.0
  description: Provider-specific GENGEN reference for WonderClip image generation.
servers:
  - url: https://gengen.farm/api/gengen/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /wonderclip-images/generations:
    post:
      summary: Create a WonderClip image task
      description: |
        Create an asynchronous WonderClip text-to-image or image-to-image task.
        This operation exposes only WonderClip image models and parameters.
      operationId: createWonderClipImageTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWonderClipImageTaskRequest'
            examples:
              textToImage:
                summary: Text to image
                value:
                  model: wonder-banana-pro
                  mode: text_to_image
                  prompt: A glass greenhouse floating above a misty forest at sunrise.
                  controls:
                    resolution: 2K
                    ratio: '16:9'
                    outputCount: 1
              imageToImage:
                summary: Image to image
                value:
                  model: wonder-image-2
                  mode: image_to_image
                  prompt: Restyle the scene as a clean editorial illustration.
                  assets:
                    referenceImages:
                      - https://example.com/reference.jpg
                  controls:
                    resolution: 1K
                    ratio: '1:1'
                    outputCount: 2
      responses:
        '200':
          description: The task was accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageTask'
              example:
                id: wonderclip-image10:ag_123
                model: wonder-banana-pro
                status: queued
                outputs:
                  images: []
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: bash
          label: Text to image
          source: |
            curl --request POST \
              --url https://gengen.farm/api/gengen/v1/wonderclip-images/generations \
              --header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
              --header 'Content-Type: application/json' \
              --data '{
                "model": "wonder-banana-pro",
                "mode": "text_to_image",
                "prompt": "A glass greenhouse floating above a misty forest at sunrise.",
                "controls": {
                  "resolution": "2K",
                  "ratio": "16:9",
                  "outputCount": 1
                }
              }'
components:
  schemas:
    CreateWonderClipImageTaskRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: |
            Supported WonderClip image model IDs:

            - `wonder-banana-pro` — WonderClip Banana Pro
            - `wonder-image-2` — WonderClip Image 2
          enum:
            - wonder-banana-pro
            - wonder-image-2
        mode:
          type: string
          description: |
            When omitted, GENGEN selects the mode from the supplied assets.

            Supported values:

            - `text_to_image` — generate from a text prompt
            - `image_to_image` — transform one or more reference images
          enum:
            - text_to_image
            - image_to_image
        prompt:
          type: string
          minLength: 1
        assets:
          $ref: '#/components/schemas/WonderClipImageAssets'
        controls:
          $ref: '#/components/schemas/WonderClipImageControls'
        providerOptions:
          $ref: '#/components/schemas/WonderClipProviderOptions'
      additionalProperties: false
    ImageTask:
      type: object
      required:
        - id
        - model
        - status
        - outputs
      properties:
        id:
          type: string
        model:
          type: string
        status:
          type: string
          description: Common values are `queued`, `running`, `succeeded`, and `failed`.
        outputs:
          $ref: '#/components/schemas/ImageOutputs'
        failureReason:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        statusUpdateTime:
          type: string
          format: date-time
      additionalProperties: true
    WonderClipImageAssets:
      type: object
      properties:
        referenceImages:
          type: array
          minItems: 1
          maxItems: 9
          description: Required for `image_to_image`; omit for `text_to_image`.
          items:
            type: string
            format: uri
      additionalProperties: false
    WonderClipImageControls:
      type: object
      properties:
        resolution:
          type: string
          default: 1K
          description: |
            Supported values:

            - `1K` — standard output resolution
            - `2K` — high-resolution output
            - `4K` — maximum-resolution output
          enum:
            - 1K
            - 2K
            - 4K
        ratio:
          type: string
          default: '16:9'
          description: |
            Supported values:

            - `1:1` — square image
            - `4:3` / `3:4` — landscape or portrait standard format
            - `16:9` / `9:16` — landscape or portrait widescreen format
          enum:
            - '16:9'
            - '9:16'
            - '4:3'
            - '3:4'
            - '1:1'
        outputCount:
          type: integer
          minimum: 1
          maximum: 4
          default: 1
      additionalProperties: false
    WonderClipProviderOptions:
      type: object
      properties:
        wonderclip:
          type: object
          properties:
            scene:
              type: string
              const: general
              default: general
          additionalProperties: false
      additionalProperties: false
    ImageOutputs:
      type: object
      required:
        - images
      properties:
        images:
          type: array
          items:
            type: string
            format: uri
      additionalProperties: true
    Error:
      type: object
      properties:
        error_code:
          type: string
        error:
          type: string
        error_params:
          type: object
          additionalProperties: true
      additionalProperties: true
  responses:
    BadRequest:
      description: The request is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: The workspace does not have enough available balance.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The API key is not authorized for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnexpectedError:
      description: GENGEN or WonderClip could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: GENGEN API key
      description: A workspace API key beginning with `gengen_live_`.

````