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

# Text-to-Video

> Text-to-Video - Generate video from text prompt

This is the **HappyHorse Video API** text-to-video interface.


## OpenAPI

````yaml openapi/en/happyhorse.json POST /happyhorse/api/v1/services/aigc/video-generation/video-synthesis
openapi: 3.1.0
info:
  title: HappyHorse Video API
  version: 1.0.0
  description: >-
    HappyHorse Video API provides efficient video generation and editing
    capabilities, helping developers quickly integrate intelligent video
    features.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /happyhorse/api/v1/services/aigc/video-generation/video-synthesis:
    post:
      description: Text-to-Video - Generate video from text prompt
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateRequest'
      responses:
        '200':
          $ref: '#/components/responses/HappyHorseSuccessResponse'
          description: Success response
      security:
        - CustomApiKey: []
components:
  schemas:
    GenerateRequest:
      type: object
      properties:
        model:
          type: string
          description: Model name. Supports happyhorse-1.0-t2v and happyhorse-1.1-t2v.
          default: happyhorse-1.0-t2v
          example: happyhorse-1.0-t2v
          enum:
            - happyhorse-1.0-t2v
            - happyhorse-1.1-t2v
        input:
          type: object
          description: Model input information
          properties:
            prompt:
              type: string
              description: >-
                Text prompt, used to describe the expected video content to
                generate. Supports any language input, with a maximum length of
                5000 non-Chinese characters or 2500 Chinese characters.
                Exceeding content will be automatically truncated.
          required:
            - prompt
        parameters:
          type: object
          description: >-
            Video processing parameters, such as setting video resolution,
            duration, etc.
          properties:
            resolution:
              type: string
              description: Specify the resolution level for generated video.
              default: 1080P
              enum:
                - 720P
                - 1080P
              example: 720P
            ratio:
              type: string
              description: Specify the aspect ratio of generated video.
              default: '16:9'
              enum:
                - '16:9'
                - '9:16'
                - '1:1'
                - '4:3'
                - '3:4'
              example: '16:9'
            duration:
              type: integer
              description: >-
                Specify the duration of generated video in seconds. Value range:
                integer between 3 and 15. Default: 5.
              default: 5
              minimum: 3
              maximum: 15
              example: 5
            watermark:
              type: boolean
              description: >-
                Whether to add watermark to generated video. Watermark is
                located at the bottom right corner of video, text is fixed as
                "Happy Horse". true: default, add watermark; false: no
                watermark.
              default: true
              example: false
            seed:
              type: integer
              description: >-
                Random seed, value range: [0, 2147483647]. If not specified,
                system will automatically generate a random seed. To improve
                reproducibility of generation results, it is recommended to fix
                the seed value. Note that due to the probabilistic nature of
                model generation, even with the same seed, cannot guarantee
                identical results each time.
              minimum: 0
              maximum: 2147483647
              example: 12345
      required:
        - model
        - input
  responses:
    HappyHorseSuccessResponse:
      description: Request successful
      content:
        application/json:
          schema:
            type: object
            properties:
              output:
                type: object
                description: Task output information
                properties:
                  task_status:
                    type: string
                    description: Task status
                    enum:
                      - PENDING
                      - RUNNING
                      - SUCCEEDED
                      - FAILED
                      - CANCELED
                      - UNKNOWN
                    example: PENDING
                  task_id:
                    type: string
                    description: Task ID. Valid for 24 hours.
                    example: 0385dc79-5ff8-4d82-bcb6-xxxxxx
              request_id:
                type: string
                description: >-
                  Request unique identifier. Can be used for request tracing and
                  troubleshooting.
                example: 4909100c-7b5a-9f92-bfe5-xxxxxx
            example:
              output:
                task_status: PENDING
                task_id: 0385dc79-5ff8-4d82-bcb6-xxxxxx
              request_id: 4909100c-7b5a-9f92-bfe5-xxxxxx
            required:
              - output
              - request_id
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        Please go to <a href='https://dashboard.ttapi.io' target='_blank'>TTAPI
        Console</a> to get the API key.

````