> ## 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 Happy Horse video task

> Create a Happy Horse 1.1 text-to-video, first-frame, or reference-to-video task.



## OpenAPI

````yaml openapi/happy-horse-video.yaml POST /contents/generations/tasks
openapi: 3.1.0
info:
  title: Happy Horse video API
  version: 1.0.0
  description: Provider-specific GENGEN reference for Happy Horse video generation.
servers:
  - url: https://gengen.farm/api/gengen/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /contents/generations/tasks:
    post:
      summary: Create a Happy Horse video task
      description: >
        Create an asynchronous Happy Horse 1.1 task through the shared GENGEN

        video endpoint. This page intentionally exposes only Happy Horse models,

        modes, assets, and controls.


        [Try Happy Horse in the API
        Explorer](https://gengen.farm/api-explorer/demos/video-generation?model=happyhorse-1.1).
      operationId: createHappyHorseVideoTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateHappyHorseVideoTaskRequest'
            examples:
              textToVideo:
                summary: Text to video
                value:
                  model: happyhorse-1.1
                  mode: text_to_video
                  prompt: A paper train crosses a miniature bridge at sunrise.
                  controls:
                    resolution: 720P
                    ratio: '16:9'
                    duration: 5
                    watermark: false
                    seed: 1234
              firstFrame:
                summary: First-frame image to video
                value:
                  model: happyhorse-1.1
                  mode: image_first_frame
                  prompt: The product rotates on a clean studio turntable.
                  assets:
                    firstFrameImage: https://example.com/product.png
                  controls:
                    resolution: 1080P
                    duration: 5
              referenceToVideo:
                summary: Reference images to video
                value:
                  model: happyhorse-1.1
                  mode: reference_to_video
                  prompt: '[Image 1] walks through the scene with [Image 2].'
                  assets:
                    referenceImages:
                      - https://example.com/character.jpg
                      - https://example.com/object.webp
                  controls:
                    resolution: 720P
                    ratio: '9:16'
                    duration: 8
      responses:
        '200':
          description: The task was accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTask'
              example:
                id: happyhorse11:task_123
                model: happyhorse-1.1
                status: pending
                outputs:
                  videos: []
                  images: []
                createdAt: '2026-06-25T02:00:00.000Z'
                updatedAt: '2026-06-25T02:00:00.000Z'
                statusUpdateTime: '2026-06-25T02:00:00.000Z'
        '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 video
          source: |
            curl --request POST \
              --url https://gengen.farm/api/gengen/v1/contents/generations/tasks \
              --header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
              --header 'Content-Type: application/json' \
              --data '{
                "model": "happyhorse-1.1",
                "mode": "text_to_video",
                "prompt": "A paper train crosses a miniature bridge at sunrise.",
                "controls": {
                  "resolution": "720P",
                  "ratio": "16:9",
                  "duration": 5,
                  "watermark": false,
                  "seed": 1234
                }
              }'
components:
  schemas:
    CreateHappyHorseVideoTaskRequest:
      type: object
      required:
        - model
        - mode
      properties:
        model:
          type: string
          const: happyhorse-1.1
          description: Happy Horse public model ID.
        mode:
          type: string
          description: |
            Happy Horse generation mode.

            Supported values:

            - `text_to_video` — generate a video from a text prompt
            - `image_first_frame` — animate a supplied first-frame image
            - `reference_to_video` — guide generation with reference images
          enum:
            - text_to_video
            - image_first_frame
            - reference_to_video
        prompt:
          type: string
          description: |
            Required for `text_to_video` and `reference_to_video`. Optional for
            `image_first_frame`.
        assets:
          $ref: '#/components/schemas/HappyHorseAssets'
        controls:
          $ref: '#/components/schemas/HappyHorseControls'
      additionalProperties: false
    VideoTask:
      type: object
      required:
        - id
        - model
        - status
        - outputs
      properties:
        id:
          type: string
        model:
          type: string
        status:
          type: string
        outputs:
          $ref: '#/components/schemas/GenerationOutputs'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        statusUpdateTime:
          type: string
          format: date-time
      additionalProperties: true
    HappyHorseAssets:
      type: object
      properties:
        firstFrameImage:
          type: string
          description: >
            Required for `image_first_frame`. Use a public HTTP(S) image URL or
            a

            JPEG, PNG, or WebP image data URL. `asset://` references are not
            supported.
        referenceImages:
          type: array
          minItems: 1
          maxItems: 9
          description: Required for `reference_to_video`.
          items:
            type: string
      additionalProperties: false
    HappyHorseControls:
      type: object
      properties:
        resolution:
          type: string
          default: 1080P
          description: |
            Supported values:

            - `720P` — HD output
            - `1080P` — Full HD output
          enum:
            - 720P
            - 1080P
        duration:
          type: integer
          minimum: 3
          maximum: 15
          default: 5
        ratio:
          type: string
          description: |
            Supported for `text_to_video` and `reference_to_video`. Omit for
            `image_first_frame`, which follows the input image ratio.

            Supported values:

            - `1:1` — square video
            - `4:3` / `3:4` — landscape or portrait standard format
            - `16:9` / `9:16` — landscape or portrait widescreen format
            - `5:4` / `4:5` — landscape or portrait social format
            - `21:9` / `9:21` — landscape or portrait ultrawide format
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
            - '3:4'
            - '4:5'
            - '5:4'
            - '9:21'
            - '21:9'
        watermark:
          type: boolean
        seed:
          description: Omit or pass `null` for provider-selected randomness.
          oneOf:
            - type: integer
              minimum: 0
              maximum: 2147483647
            - type: 'null'
      additionalProperties: false
    GenerationOutputs:
      type: object
      required:
        - videos
        - images
      properties:
        videos:
          type: array
          items:
            type: string
            format: uri
        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 Happy Horse 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 Happy Horse 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_`.

````