POST
/
api
/
link_to_videos
/
preview_list_async
/
curl --request POST \
  --url https://api.creatify.ai/api/link_to_videos/preview_list_async/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-key>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "name": "<string>",
  "target_platform": "<string>",
  "target_audience": "<string>",
  "language": "ar",
  "video_length": 15,
  "aspect_ratio": "9x16",
  "script_style": "BenefitsV2",
  "override_avatar": "<string>",
  "override_voice": "<string>",
  "override_script": "<string>",
  "background_music_url": "<string>",
  "background_music_volume": 0.5,
  "voiceover_volume": 0.5,
  "webhook_url": "<string>",
  "link": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "no_background_music": true,
  "no_caption": true,
  "no_emotion": true,
  "no_cta": true,
  "no_stock_broll": true,
  "caption_style": "normal-black",
  "caption_offset_x": "<string>",
  "caption_offset_y": "<string>",
  "caption_setting": {
    "style": "normal-black",
    "offset": {
      "x": 0,
      "y": 0.4
    },
    "font_family": "Montserrat",
    "font_size": 123,
    "font_style": "font-bold",
    "background_color": "<string>",
    "text_color": "<string>",
    "highlight_text_color": "<string>",
    "max_width": 123,
    "line_height": 123,
    "text_shadow": "<string>",
    "hidden": false
  },
  "visual_styles": [
    "AvatarBubbleTemplate"
  ],
  "aspect_ratios": [
    "9x16"
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "target_platform": "<string>",
  "target_audience": "<string>",
  "language": "ar",
  "video_length": 15,
  "aspect_ratio": "9x16",
  "script_style": "BenefitsV2",
  "override_avatar": "<string>",
  "override_voice": "<string>",
  "override_script": "<string>",
  "background_music_url": "<string>",
  "background_music_volume": 0.5,
  "voiceover_volume": 0.5,
  "webhook_url": "<string>",
  "link": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "media_job": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "failed_reason": "<string>",
  "is_hidden": true,
  "video_output": "<string>",
  "video_thumbnail": "<string>",
  "credits_used": 123,
  "duration": 123,
  "progress": "<string>",
  "no_background_music": true,
  "no_caption": true,
  "no_emotion": true,
  "no_cta": true,
  "no_stock_broll": true,
  "preview": "<string>",
  "previews": [
    {
      "media_job": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "visual_style": "AvatarBubbleTemplate",
      "aspect_ratio": "9x16",
      "url": "<string>"
    }
  ],
  "caption_style": "normal-black",
  "caption_offset_x": "<string>",
  "caption_offset_y": "<string>",
  "caption_setting": {
    "style": "normal-black",
    "offset": {
      "x": 0,
      "y": 0.4
    },
    "font_family": "Montserrat",
    "font_size": 123,
    "font_style": "font-bold",
    "background_color": "<string>",
    "text_color": "<string>",
    "highlight_text_color": "<string>",
    "max_width": 123,
    "line_height": 123,
    "text_shadow": "<string>",
    "hidden": false
  },
  "visual_styles": [
    "AvatarBubbleTemplate"
  ],
  "aspect_ratios": [
    "9x16"
  ]
}

About previews Field in the Response

The previews field provides a list of urls to preview videos. This url 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 previews field in the response will look like this:

[
    {
        "media_job": "4bb66ccf-5f73-401a-8405-d4b29910a059",
        "url": "https://video.creatify.ai/preview?layout=videos/20240808/abd7ac2e-471a-4f0c-b2b2-a4e6580c61f9.json"
    }
]

About Request Data Structure of Webhook

If the ‘webhook_url’ is passed in the parameters, we will initiate a POST request to the webhook_url when the previews generation succeeds or fails, with the following content:

{
    "id": "e3e23f91-6101-44c6-a1b1-fa14408287b8",
    "status": "pending",
    "failed_reason": null,
    "previews": [
        {
            "media_job": "4bb66ccf-5f73-401a-8405-d4b29910a059",
            "url": "https://video.creatify.ai/preview?layout=videos/20240808/abd7ac2e-471a-4f0c-b2b2-a4e6580c61f9.json"
        }
    ],
}

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
  • previews (list[dict]): The URL of the video if the job is done

Note: We might send multiple requests for status changes.

About override_avatar parameter

When using ‘create video from link’ API, if the ‘override_avatar’ (avatar_id is passed in the parameters, we will use it as the avatar of the video. If the ‘override_avatar’ is not passed, we will use the matched avatar for the video.

avatar_id is the unique identifier of an avatar. You can get the avatar_id by calling the Get avatar endpoint.

About override_voice parameter

When using ‘create video from link’ API, if the ‘override_voice’ is passed in the parameters, we will use it for the voiceover of the video. If the ‘override_voice’ is not passed, we’ll use the matched voice (from the avatar) for the video.

voice_id is the unique identifier of the voice. You can get the voice_id by calling the Get voices interface.

Tips: foreach voice has multiple accents, you can choose one from the accents as the voice of the video.

Authorizations

X-API-ID
string
header
required

API ID, from your settings page.

X-API-KEY
string
header
required

API Key, from your settings page.

Body

Response

200 - application/json

The response is of type object.