> ## 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.

# Render an AI Avatar v2 task

> This endpoint renders a video with preview genereated. Rendering a video through this endpoint costs 4 credits for every 30 seconds.

### About Request Data Structure of Webhook

When the 'create a AI Avatar task' interface is requested, if the 'webhook\_url' is passed in the parameters, the program will initiate a POST request to this network address when the task succeeds or fails, with the following content:

```json theme={null}
{
    'id': 'string',
    'status': 'string',
    'failed_reason': 'string',
    'output': 'string',
}
```

Arguments:

* `id` (string): The unique identifier of the job
* `status` (string): The status of the job. Possible values are `pending`, `in_queue`, `running`, `failed`, `done`
* `failed_reason` (string): The reason of the failure if the job failed
* `output` (string): The URL of the video if the job is done


## OpenAPI

````yaml post /api/lipsyncs_v2/{id}/render/
openapi: 3.0.3
info:
  title: creatify.ai API
  version: 1.0.0
  description: API for creatify.ai
servers: []
security: []
paths:
  /api/lipsyncs_v2/{id}/render/:
    post:
      tags:
        - lipsyncs_v2
      description: This endpoint triggers the rendering of a lipsync v2 video.
      operationId: lipsyncs_v2_render_create
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
          description: A UUID string identifying this lipsync.
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MultiAvatarLipsyncOutput'
          description: ''
      security:
        - X-API-ID: []
          X-API-KEY: []
components:
  schemas:
    MultiAvatarLipsyncOutput:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          nullable: true
          description: The name of the lipsync request.
          maxLength: 255
        output:
          type: string
          nullable: true
          readOnly: true
          description: Output video
        video_thumbnail:
          type: string
          format: uri
          readOnly: true
          description: Generated Video Thumbnail URL
        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
          nullable: true
          description: The media job associated with the lipsync request.
        status:
          type: string
          readOnly: true
          description: Status of the lipsync request
        webhook_url:
          type: string
          format: uri
          nullable: true
          description: The webhook URL to be called upon completion of the lipsync request
          maxLength: 200
        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. 
        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
        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
        video_inputs:
          type: array
          items: {}
          readOnly: true
      required:
        - aspect_ratio
        - created_at
        - credits_used
        - duration
        - editor_url
        - failed_reason
        - id
        - output
        - preview
        - progress
        - status
        - updated_at
        - video_inputs
        - video_thumbnail
    AspectRatioBc4Enum:
      enum:
        - 16x9
        - 1x1
        - 9x16
      type: string
      description: |-
        * `16x9` - Ratio 16 9
        * `1x1` - Ratio 1 1
        * `9x16` - Ratio 9 16
    ModelVersion699Enum:
      enum:
        - standard
        - aurora_v1
        - aurora_v1_fast
      type: string
      description: |-
        * `standard` - Standard
        * `aurora_v1` - Aurora v1
        * `aurora_v1_fast` - Aurora v1 Fast
  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.

````