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

# Generate Preivew of AI Avatar

> This endpoint generates a preiview of AI Avatar video before redering the final video. Generating a video preview through this endpoint costs 1 credit for every 30 seconds.

### About preview Field in the Response

The preview field provides a link to preview the video. This link allows you to preview the video before rendering it, you can put it in an iframe to show the video in your application.
Example: The preview field in the response will look like this:

```arduino theme={null}
"https://app.creatify.ai/preview?layout=videos/20241024/f0c1e1f1-be05-48e0-91d8-3d26ed633d5b.json"
```


## OpenAPI

````yaml post /api/lipsyncs/preview/
openapi: 3.0.3
info:
  title: creatify.ai API
  version: 1.0.0
  description: API for creatify.ai
servers: []
security: []
paths:
  /api/lipsyncs/preview/:
    post:
      tags:
        - lipsyncs
      description: >-
        Mixin to provide a reusable `list` method for filtering and paginating
        queryset results.
      operationId: lipsyncs_preview_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Lipsync'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Lipsync'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Lipsync'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lipsync'
          description: ''
      security:
        - X-API-ID: []
          X-API-KEY: []
components:
  schemas:
    Lipsync:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          nullable: true
          description: The name of the lipsync request.
          maxLength: 255
        text:
          type: string
          nullable: true
          description: The text to be used for voiceover
          maxLength: 8000
        audio:
          type: string
          format: uri
          writeOnly: true
          nullable: true
          description: >-
            Use your own audio file url for lipsync instead of the voiceover
            generated by us from text input. Either audio or text is required.
            If both are provided, audio will be used
        creator:
          type: string
          format: uuid
          nullable: true
          description: >-
            The creator id associated with the lipsync request, you can get the
            list of creators from /api/personas endpoint.
        model_version:
          allOf:
            - $ref: '#/components/schemas/ModelVersion699Enum'
          description: >-
            Model version for the avatar, 'standard', 'aurora_v1' or
            'aurora_v1_fast'. Default is 'standard'. Standard model costs 5
            credits per 30 seconds video, Aurora_v1 model costs 1 credit per
            second, and Aurora_v1_fast renders faster with lower quality for 0.5
            credits per second.


            * `standard` - Standard

            * `aurora_v1` - Aurora v1

            * `aurora_v1_fast` - Aurora v1 Fast
        output:
          type: string
          nullable: true
          readOnly: true
          description: Output video
        video_thumbnail:
          type: string
          format: uri
          readOnly: true
          description: Generated Video Thumbnail URL
        aspect_ratio:
          allOf:
            - $ref: '#/components/schemas/AspectRatioBc4Enum'
          description: |-
            The aspect ratio of the video

            * `16x9` - Ratio 16 9
            * `1x1` - Ratio 1 1
            * `9x16` - Ratio 9 16
        green_screen:
          type: boolean
          description: >-
            When true, the output video will be in .mp4 format with black
            background and subtitles will not be rendered on the video. Default
            is false.
        transparent_background:
          type: boolean
          description: >-
            When true, the output video will be in .webm format with alpha
            channel (transparency support). Default is false.
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Created date
        updated_at:
          type: string
          format: date-time
          readOnly: true
          title: Updated date
        credits_used:
          type: number
          description: Credits used in this API call
          readOnly: true
        duration:
          type: integer
          readOnly: true
          description: Duration of the video in seconds
        progress:
          type: string
          readOnly: true
        failed_reason:
          type: string
          readOnly: true
          nullable: true
          description: The reason for failure, if the lipsync request failed
        media_job:
          type: string
          format: uuid
          readOnly: true
          nullable: true
          description: The media job associated with the lipsync request.
        status:
          type: string
          readOnly: true
          description: Status of the lipsync request
        is_hidden:
          type: boolean
          readOnly: true
          description: Is the video hidden in the website projects page
        audio_url:
          type: string
          readOnly: true
          nullable: true
        webhook_url:
          type: string
          format: uri
          nullable: true
          description: The webhook URL to be called upon completion of the lipsync request
          maxLength: 200
        accent:
          type: string
          format: uuid
          nullable: true
          description: >-
            The avatar id to be used for lipsync, you can get the list of
            accents from /api/voices endpoint.
        preview:
          type: string
          nullable: true
          readOnly: true
          description: Preview video
        editor_url:
          type: string
          nullable: true
          readOnly: true
          description: >-
            Editor URL for the video. Expires in 24 hours. Available only if
            your API account has API editor access enabled. 
        preview_audio:
          type: string
          nullable: true
          readOnly: true
          description: Preview audio
        no_caption:
          type: boolean
          description: >-
            Whether to include captions in the output video. Default is true,
            video without caption.
        no_music:
          type: boolean
          description: >-
            Whether to include background music in the output video. Default is
            true, video without music.
        caption_style:
          allOf:
            - $ref: '#/components/schemas/CaptionStyleEnum'
          description: |-
            The style of the captions

            * `normal-black` - NORMAL_BLACK
            * `normal-white` - NORMAL_WHITE
            * `normal-red` - NORMAL_RED
            * `normal-blue` - NORMAL_BLUE
            * `neo` - NEO
            * `brick` - BRICK
            * `frenzy` - FRENZY
            * `verana` - VERANA
            * `mustard` - MUSTARD
            * `glow` - GLOW
            * `mint` - MINT
            * `coolers` - COOLERS
            * `bilo` - BILO
            * `toons` - TOONS
            * `deep-blue` - DEEP_BLUE
            * `mystique` - MYSTIQUE
            * `caution` - CAUTION
            * `duality` - DUALITY
            * `comic-shadow` - COMIC_SHADOW
            * `clean-bold` - CLEAN_BOLD
            * `soft-pill` - SOFT_PILL
            * `underline-bold` - UNDERLINE_BOLD
            * `classic-duo` - CLASSIC_DUO
            * `hand-script` - HAND_SCRIPT
            * `button-glow` - BUTTON_GLOW
            * `emboss-outline` - EMBOSS_OUTLINE
            * `standard-bold` - STANDARD_BOLD
            * `outlined-text` - OUTLINED_TEXT
            * `quiet-serif` - QUIET_SERIF
            * `editorial-clean` - EDITORIAL_CLEAN
            * `shout-block` - SHOUT_BLOCK
            * `word-flash` - WORD_FLASH
            * `promo-punch` - PROMO_PUNCH
            * `light-word` - LIGHT_WORD
            * `tagline-bold` - TAGLINE_BOLD
            * `glow-speak` - GLOW_SPEAK
            * `black-block` - BLACK_BLOCK
            * `zoom-punch` - ZOOM_PUNCH
        caption_offset_x:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,2})?$
          description: >-
            Caption offset x is horizontaly relative to the center of the canvas
            in percentage, range from -0.5 to 0.5, default to 0
        caption_offset_y:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,2})?$
          description: >-
            Caption offset y is vertically relative to the center of the canvas
            in percentage, range from -0.5 to 0.5, default to -0.4, which is 40%
            below center
      required:
        - aspect_ratio
        - audio_url
        - created_at
        - credits_used
        - duration
        - editor_url
        - failed_reason
        - id
        - is_hidden
        - media_job
        - output
        - preview
        - preview_audio
        - progress
        - status
        - updated_at
        - video_thumbnail
    ModelVersion699Enum:
      enum:
        - standard
        - aurora_v1
        - aurora_v1_fast
      type: string
      description: |-
        * `standard` - Standard
        * `aurora_v1` - Aurora v1
        * `aurora_v1_fast` - Aurora v1 Fast
    AspectRatioBc4Enum:
      enum:
        - 16x9
        - 1x1
        - 9x16
      type: string
      description: |-
        * `16x9` - Ratio 16 9
        * `1x1` - Ratio 1 1
        * `9x16` - Ratio 9 16
    CaptionStyleEnum:
      enum:
        - normal-black
        - normal-white
        - normal-red
        - normal-blue
        - neo
        - brick
        - frenzy
        - verana
        - mustard
        - glow
        - mint
        - coolers
        - bilo
        - toons
        - deep-blue
        - mystique
        - caution
        - duality
        - comic-shadow
        - clean-bold
        - soft-pill
        - underline-bold
        - classic-duo
        - hand-script
        - button-glow
        - emboss-outline
        - standard-bold
        - outlined-text
        - quiet-serif
        - editorial-clean
        - shout-block
        - word-flash
        - promo-punch
        - light-word
        - tagline-bold
        - glow-speak
        - black-block
        - zoom-punch
      type: string
      description: |-
        * `normal-black` - NORMAL_BLACK
        * `normal-white` - NORMAL_WHITE
        * `normal-red` - NORMAL_RED
        * `normal-blue` - NORMAL_BLUE
        * `neo` - NEO
        * `brick` - BRICK
        * `frenzy` - FRENZY
        * `verana` - VERANA
        * `mustard` - MUSTARD
        * `glow` - GLOW
        * `mint` - MINT
        * `coolers` - COOLERS
        * `bilo` - BILO
        * `toons` - TOONS
        * `deep-blue` - DEEP_BLUE
        * `mystique` - MYSTIQUE
        * `caution` - CAUTION
        * `duality` - DUALITY
        * `comic-shadow` - COMIC_SHADOW
        * `clean-bold` - CLEAN_BOLD
        * `soft-pill` - SOFT_PILL
        * `underline-bold` - UNDERLINE_BOLD
        * `classic-duo` - CLASSIC_DUO
        * `hand-script` - HAND_SCRIPT
        * `button-glow` - BUTTON_GLOW
        * `emboss-outline` - EMBOSS_OUTLINE
        * `standard-bold` - STANDARD_BOLD
        * `outlined-text` - OUTLINED_TEXT
        * `quiet-serif` - QUIET_SERIF
        * `editorial-clean` - EDITORIAL_CLEAN
        * `shout-block` - SHOUT_BLOCK
        * `word-flash` - WORD_FLASH
        * `promo-punch` - PROMO_PUNCH
        * `light-word` - LIGHT_WORD
        * `tagline-bold` - TAGLINE_BOLD
        * `glow-speak` - GLOW_SPEAK
        * `black-block` - BLACK_BLOCK
        * `zoom-punch` - ZOOM_PUNCH
  securitySchemes:
    X-API-ID:
      type: apiKey
      in: header
      name: X-API-ID
      description: API ID, from your settings page.
    X-API-KEY:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API Key, from your settings page.

````