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

# Create Video from Text

> Generate an AI avatar video from text



## OpenAPI

````yaml post /project/assets/generate_video_from_text/
openapi: 3.0.3
info:
  title: DeepReel API Documentation (latest)
  version: 1.0.0
  description: DeepReel API OpenApi Specification
  x-logo:
    url: /icons/deepreel-logo-main.png
servers: []
security: []
paths:
  /project/assets/generate_video_from_text/:
    post:
      tags:
        - project
      description: Generate an AI avatar video from text.
      operationId: Generate Video from text
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateVideoFromTextRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateVideoResponse'
          description: ''
        '400':
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    nullable: false
                    description: Text of the error message.
                  detail:
                    type: object
                    nullable: true
                    description: Detail of the error message.
          description: ''
      security:
        - apiKeyAuth: []
components:
  schemas:
    GenerateVideoFromTextRequest:
      type: object
      properties:
        avatar_id:
          type: string
          format: uuid
          description: The avatar to be used to generate the video
        background_color:
          type: string
          default: '#3D3D3D'
          description: >-
            The background color video. A six-bit hex color code starts with #.
            (e.g. #DRDRDR)                                      NOTE: The
            `background_image` will get preference over `background_color` if
            both are specified.
        background_image:
          type: string
          format: uri
          nullable: true
          description: A public HTTPS link of an image (jpg/jpeg/png).
        aspect_ratio:
          allOf:
            - $ref: '#/components/schemas/AspectRatioEnum'
          description: |-
            Aspect ratio of the video.

            * `16:9` - 16:9 - Standard widescreen
            * `9:16` - 9:16 - Vertical
            * `4:3` - 4:3 - Traditional TV format
            * `1:1` - 1:1 - Square
        title:
          type: string
          nullable: true
          description: Title of the video. Length should be less than 100 characters.
        slate_script:
          type: array
          items:
            $ref: '#/components/schemas/NodeParagraph'
        language_id:
          type: integer
          default: 94
          description: >-
            Language used to generate the audio. Language Id for `English -
            Default (en-us)` is `94`
        stability:
          type: number
          format: double
          maximum: 1
          minimum: 0
          default: 0.5
          description: >-
            This controls the level of variation in generated audio.            
            Low stability will increase expressiveness of speech while
            high             stability will lower expressiveness but increase
            the predictability of how the script is spoken.
        style_exaggeration:
          type: number
          format: double
          maximum: 1
          minimum: 0
          default: 0
          description: >-
            Level of exaggeration of the speaking style. Available only for
            custom voices.             Higher values will make increase
            similarity of cloned voice but may cause the audio to be less
            stable.
      required:
        - aspect_ratio
        - avatar_id
        - slate_script
    GenerateVideoResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique Identifier of the video.
        estimated_completion_time:
          type: integer
          description: Video generation estimated completion time in seconds.
        message:
          type: string
          description: Extra detail.
      required:
        - id
    AspectRatioEnum:
      enum:
        - '16:9'
        - '9:16'
        - '4:3'
        - '1:1'
      type: string
      description: |-
        * `16:9` - 16:9 - Standard widescreen
        * `9:16` - 9:16 - Vertical
        * `4:3` - 4:3 - Traditional TV format
        * `1:1` - 1:1 - Square
    NodeParagraph:
      type: object
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/NodeParagraphTypeEnum'
          readOnly: true
        children:
          type: array
          items:
            $ref: '#/components/schemas/NodeChild'
      required:
        - children
        - type
    NodeParagraphTypeEnum:
      enum:
        - paragraph
      type: string
      description: '* `paragraph` - paragraph'
    NodeChild:
      oneOf:
        - $ref: '#/components/schemas/NodeText'
        - $ref: '#/components/schemas/NodeTag'
    NodeText:
      type: object
      properties:
        text:
          type: string
        speedValue:
          type: integer
          readOnly: true
        volumeValue:
          type: string
          readOnly: true
        pitchValue:
          type: string
          readOnly: true
        customPronounciation:
          type: string
          readOnly: true
      required:
        - customPronounciation
        - pitchValue
        - speedValue
        - text
        - volumeValue
    NodeTag:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/NodeTagTypeEnum'
        value:
          type: string
      required:
        - type
        - value
    NodeTagTypeEnum:
      enum:
        - pause
        - variable
      type: string
      description: |-
        * `pause` - pause
        * `variable` - variable
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: >-
        Your API key with the prefix: `dr_`. This is required by all endpoints
        to access our API programatically.                             You can
        view your API Key by navigating to the account settings panel (In the
        bottom left corner click on your                             `Account` →
        `profile`)

````