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

# Generate Video

> Generates a video based on provided input, words, and configuration, then returns a URL to download the generated file.



## OpenAPI

````yaml post /generate
openapi: 3.0.1
info:
  title: AutoCaption API
  description: >-
    An API to use AutoCaption's services for video transcription and video
    generation with captions.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.autocaption.io/v1
security:
  - ApiKeyAuth: []
paths:
  /generate:
    post:
      summary: Generate Video
      description: >-
        Generates a video based on provided input, words, and configuration,
        then returns a URL to download the generated file.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  type: string
                  description: Identifier of the input file for generation.
                words:
                  type: array
                  items:
                    $ref: '#/components/schemas/Word'
                  description: Array of words to be included in the generated file.
                config:
                  $ref: '#/components/schemas/TemplateConfig'
              required:
                - input
                - words
                - config
      responses:
        '200':
          description: URL to download the generated file.
          content:
            application/json:
              schema:
                type: object
                properties:
                  download_url:
                    type: string
                    description: Direct URL to download the generated file.
components:
  schemas:
    Word:
      type: object
      properties:
        start:
          type: number
          format: float
          description: Start time of the word in seconds.
        end:
          type: number
          format: float
          description: End time of the word in seconds.
        word:
          type: string
          description: The word as transcribed.
        punctuated_word:
          type: string
          description: The word with punctuation.
      required:
        - start
        - end
        - word
        - punctuated_word
    TemplateConfig:
      type: object
      properties:
        colors:
          $ref: '#/components/schemas/TemplateColors'
        modes:
          $ref: '#/components/schemas/TemplateModes'
        sizes:
          $ref: '#/components/schemas/TemplateSizes'
        linesCount:
          type: integer
        wordsPerLineCount:
          type: integer
        wordHasBackground:
          type: boolean
        wordHasPunctuation:
          type: boolean
        wordHasShadow:
          type: boolean
        wordHasCustomShadowColor:
          type: boolean
        emojiAnimated:
          type: boolean
        capitalizationType:
          $ref: '#/components/schemas/CapitalizationTypeEnum'
    TemplateColors:
      type: object
      properties:
        defaultColor:
          $ref: '#/components/schemas/ColorArray'
        spokenColor:
          $ref: '#/components/schemas/ColorArray'
        hilightColor:
          $ref: '#/components/schemas/ColorArray'
        strokeColor:
          $ref: '#/components/schemas/ColorArray'
        backgroundColor:
          $ref: '#/components/schemas/ColorArray'
        shadowColor:
          $ref: '#/components/schemas/ColorArray'
    TemplateModes:
      type: object
      properties:
        displayMode:
          $ref: '#/components/schemas/DisplayModeEnum'
        displayWords:
          $ref: '#/components/schemas/DisplayWordsEnum'
        spokenMode:
          $ref: '#/components/schemas/SpokenModeEnum'
        effectType:
          $ref: '#/components/schemas/EffectTypeEnum'
        effectMode:
          $ref: '#/components/schemas/EffectModeEnum'
        displayEmojis:
          $ref: '#/components/schemas/DisplayEmojiEnum'
    TemplateSizes:
      type: object
      properties:
        fontSize:
          type: integer
        strokeSize:
          type: integer
        blurSize:
          type: integer
        emojiSize:
          type: integer
        backgroundRadius:
          type: integer
      required:
        - fontSize
    CapitalizationTypeEnum:
      type: string
      enum:
        - UPPERCASE
        - LOWERCASE
        - TITLECASE
    ColorArray:
      type: object
      properties:
        colors:
          type: array
          items:
            $ref: '#/components/schemas/Color'
    DisplayModeEnum:
      type: string
      enum:
        - ALL
        - LINE
        - WORD
    DisplayWordsEnum:
      type: string
      enum:
        - PUNCTUATION
        - FIXED_COUNT
    SpokenModeEnum:
      type: string
      enum:
        - LINE
        - WORD
    EffectTypeEnum:
      type: string
      enum:
        - DISABLED
        - POP
        - BIG
        - SMOOTH_POP
        - FADE
        - FONT
    EffectModeEnum:
      type: string
      enum:
        - LINE
        - WORD
        - GROUP
    DisplayEmojiEnum:
      type: string
      enum:
        - WORD
        - LINE
    Color:
      type: object
      properties:
        r:
          type: integer
          format: int32
          minimum: 0
          maximum: 255
        g:
          type: integer
          format: int32
          minimum: 0
          maximum: 255
        b:
          type: integer
          format: int32
          minimum: 0
          maximum: 255
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````