Skip to main content

URL to Video

This use case demonstrates how to replicate the โ€œLink to Videoโ€ flow from Creatify App.
It demonstrates how to use Creatifyโ€™s APIs to transform a product URL into a complete marketing video โ€” from link scraping, AI script generation, video preview creation, to final video rendering.

Extract content (title, description, images, videos, etc.) from a product URL. POST /api/links/
Example request and response:

curl --request POST \
  --url https://api.creatify.ai/api/links/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-key>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
    "url": "https://www.amazon.com/ATTITUDE-Mineral-Based-Ingredients-Cruelty-free-Moisturizer/dp/B09JZXHJM7"
}'
๐Ÿ’ก Errors:
  1. Successfully scraped the URL but it contains no images or videos.
    status_code: 400
    body: [โ€œLink must have at least one image or one video.โ€]
  2. Failed to scrape the URL (due to anti-scraping or other issues).
    status_code: 400
    body: [โ€œFailed to scrape url: โ€œ]

If you donโ€™t have a URL but have product data, create a link directly using parameters. POST /api/links/link_with_params/
curl --request POST \
  --url https://api.creatify.ai/api/link_with_params/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-key>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
    "title": "ATTITUDE Body Cream, Moisturizer for Dry Skin, EWG Verified, Vegan & Dermatologist-Tested, Deep Hydration, Pear & Amber Scent, 8 Fl Oz (Pack of 6)",
    "description": "About this item    EWG VERIFIED: This body cream for women and men is certified EWG Verified and made with clean ingredients that meet the Environmental Working Group's strict health and safety standards so you can feel confident that it does not contain any potentially concerning ingredients.    CLEAN FORMULA: This ATTITUDE body cream is made with 98% natural-origin ingredients, and free from SLS, SLES, petrolatum, mineral oil, and artificial colors, for a worry-free experience.    HIGH PERFORMANCE: Infused with watercress and Indian cress extracts, this fast-absorbing, non-greasy and non-sticky EWG Verified hand cream leaves hands soft and smooth. Suitable for both women and men.    PEAR & AMBER: This bright and delicate fragrance features juicy pear with vibrant notes of nectarine and ginger for a naturally energizing and refreshing experience.    RESPONSIBLE BEAUTY: Dermatologically tested, 100% vegan, and packaged in an easily recyclable reusable HDPE plastic bottle for a routine thatโ€™s kind to everything.    \n โ€บ  See more product details",
    "image_urls": [
        "https://m.media-amazon.com/images/I/71xB-ss26gL._SL1500_.jpg",
        "https://m.media-amazon.com/images/I/71H9i6r9TUL._SL1500_.jpg",
        "https://m.media-amazon.com/images/I/71PHtZce95L._SL1500_.jpg",
        "https://m.media-amazon.com/images/I/81rjeQ6iLOL._SL1500_.jpg",
        "https://m.media-amazon.com/images/I/61YO5awH0OL._SL1500_.jpg",
        "https://m.media-amazon.com/images/I/61uAyKZ1WFL.jpg",
        "https://m.media-amazon.com/images/I/71O3xDdrjTL.jpg",
        "https://m.media-amazon.com/images/I/91BJZbo4nAL.jpg"
    ],
    "video_urls": [
        "https://d35ghwdno3nak3.cloudfront.net/videos/1984d47b-7110-86c3-f38d-b7b3daff27db.mp4",
        "https://d35ghwdno3nak3.cloudfront.net/videos/ebf4c8b5-b774-55f1-28d9-f24a4aa436db.mp4",
        "https://d35ghwdno3nak3.cloudfront.net/videos/3f036f62-d4e1-9a31-6257-6dfb93567cc9.mp4"
    ]
}'
๐Ÿ’ก If no videos are included, provide at least 3 images.

Modify an existing linkโ€™s metadata (title, description, images, videos). PUT /api/links/{id}/
curl --request PUT \
  --url https://api.creatify.ai/api/links/21ce43ad-ae5e-4f3d-96fa-58a1e5b966f0/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-key>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
    "title": "ATTITUDE Body Cream, Moisturizer for Dry Skin, EWG Verified, Vegan & Dermatologist-Tested, Deep Hydration, Pear & Amber Scent, 8 Fl Oz (Pack of 6)",
    "description": "About this item    EWG VERIFIED: This body cream for women and men is certified EWG Verified and made with clean ingredients that meet the Environmental Working Group's strict health and safety standards so you can feel confident that it does not contain any potentially concerning ingredients.    CLEAN FORMULA: This ATTITUDE body cream is made with 98% natural-origin ingredients, and free from SLS, SLES, petrolatum, mineral oil, and artificial colors, for a worry-free experience.    HIGH PERFORMANCE: Infused with watercress and Indian cress extracts, this fast-absorbing, non-greasy and non-sticky EWG Verified hand cream leaves hands soft and smooth. Suitable for both women and men.",
    "image_urls": [
        "https://m.media-amazon.com/images/I/71xB-ss26gL._SL1500_.jpg",
        "https://m.media-amazon.com/images/I/71H9i6r9TUL._SL1500_.jpg",
        "https://m.media-amazon.com/images/I/71PHtZce95L._SL1500_.jpg",
        "https://m.media-amazon.com/images/I/81rjeQ6iLOL._SL1500_.jpg",
        "https://m.media-amazon.com/images/I/61YO5awH0OL._SL1500_.jpg",
        "https://m.media-amazon.com/images/I/61uAyKZ1WFL.jpg",
        "https://m.media-amazon.com/images/I/71O3xDdrjTL.jpg"
    ],
    "video_urls": [
        "https://d35ghwdno3nak3.cloudfront.net/videos/1984d47b-7110-86c3-f38d-b7b3daff27db.mp4",
        "https://d35ghwdno3nak3.cloudfront.net/videos/ebf4c8b5-b774-55f1-28d9-f24a4aa436db.mp4"
    ]
}'

Generate AI-powered marketing scripts for the product. POST /api/ai_scripts/
ccurl --request POST \
  --url https://api.creatify.ai/api/ai_scripts/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-key>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
    "title": "ATTITUDE Body Cream, Moisturizer for Dry Skin, EWG Verified, Vegan & Dermatologist-Tested, Deep Hydration, Pear & Amber Scent, 8 Fl Oz (Pack of 6)",
    "description": "About this item    EWG VERIFIED: This body cream for women and men is certified EWG Verified and made with clean ingredients that meet the Environmental Working Group's strict health and safety standards so you can feel confident that it does not contain any potentially concerning ingredients.    CLEAN FORMULA: This ATTITUDE body cream is made with 98% natural-origin ingredients, and free from SLS, SLES, petrolatum, mineral oil, and artificial colors, for a worry-free experience.    HIGH PERFORMANCE: Infused with watercress and Indian cress extracts, this fast-absorbing, non-greasy and non-sticky EWG Verified hand cream leaves hands soft and smooth. Suitable for both women and men.",
    "language": "en",
    "target_audience": "young adults",
    "video_length": 15
}'
๐Ÿ’ก The title and description are the same as those in the link.

5. Generate Preview Videos

Generate video previews for the link. POST /api/link_to_videos/preview_list_async/
โš ๏ธ Costs 1 credit per 30 seconds preview video. Even if multiple previews are generated, youโ€™ll only be charged once. For example, 8 previews of 30 seconds each still cost just 1 credit.
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 '{
    "target_platform": "Instagram",
    "target_audience": "young adults",
    "language": "en",
    "video_length": 30,
    "aspect_ratio": "1x1"
    "visual_styles": [
        "VanillaTemplate",
        "GreenScreenEffectTemplate",
        "AvatarBubbleTemplate",
        "FullScreenTemplate",
        "DynamicProductTemplate",
        "QuickTransitionTemplate",
        "ScribbleTemplate",
        "SideBySideTemplate"
    ],
    "override_script": "Are you ready for an unforgettable adventure? Discover the best Iceland tour packages and immerse yourself in stunning landscapes, from majestic volcanoes to breathtaking glaciers. Did you know that 7 out of 10 travelers say Iceland is a top destination for adventure seekers? Explore the magic of Iceland and start your journey today!",
    "link": "e63ce1e4-97cb-4ba6-937a-50e88925a321",
    "webhook_url": "https://webhook.site/541a19ea-ebb0-4521-9cb3-558c11182938"
}'
๐Ÿ’ก link param is the response id of create link
override_script is the response paragraphs of ai_scripts

6. Get Preview Videos Result

๐Ÿ”„ Webhook Callback Example

If you provide a webhook_url, Creatify will notify your backend of the preview generation result:
{
  "id": "20b5d452-89f4-4245-9480-10defaa8fb4d",
  "status": "pending",
  "failed_reason": null,
  "previews": [
    {
      "media_job": "43e2b17c-e272-453a-96d4-c047acd2ab0e",
      "visual_style": "FullScreenTemplate",
      "url": "https://app.creatify.ai/preview?layout=videos/20250521/bdc461ad-cc18-449c-b4b2-43cc12db0013.json",
      "aspect_ratio": "9x16"
    },
    {
      "media_job": "cd08733a-5067-4643-9237-346998c5849c",
      "visual_style": "EnhancedVanillaTemplate",
      "url": "https://app.creatify.ai/preview?layout=videos/20250521/5ce154f9-6954-4c58-bc17-e33bb077e2f5.json",
      "aspect_ratio": "9x16"
    },
    {
      "media_job": "02cdc0a9-17dc-44dc-9560-e8fd0b2f78a1",
      "visual_style": "FeatureHighlightTemplate",
      "url": "https://app.creatify.ai/preview?layout=videos/20250521/c3341e4a-531d-48f1-b426-87e45f0badd2.json",
      "aspect_ratio": "9x16"
    },
    {
      "media_job": "8323b4bc-d5c3-4976-9e04-f86c0cea7ee8",
      "visual_style": "SimpleAvatarOverlayTemplate",
      "url": "https://app.creatify.ai/preview?layout=videos/20250521/61b40cc5-2cfb-4afb-81fe-0698ad796eb4.json",
      "aspect_ratio": "9x16"
    },
    {
      "media_job": "50036921-ffbe-4b3f-ad1d-ef367847db7d",
      "visual_style": "QuickTransitionTemplate",
      "url": "https://app.creatify.ai/preview?layout=videos/20250521/ae100137-e12f-4f0f-86d9-4b54e041ac4d.json",
      "aspect_ratio": "9x16"
    },
    {
      "media_job": "188f92ac-6281-41e5-ac4b-94d0af4b2493",
      "visual_style": "GreenScreenEffectTemplate",
      "url": "https://app.creatify.ai/preview?layout=videos/20250521/13cda7fd-e54f-44d3-acc3-5cc6c34beba7.json",
      "aspect_ratio": "9x16"
    },
    {
      "media_job": "198080fa-6369-4724-829f-2e57bb8538b8",
      "visual_style": "DynamicProductTemplate",
      "url": "https://app.creatify.ai/preview?layout=videos/20250521/41601095-6549-4898-89ab-b62879dbf88d.json",
      "aspect_ratio": "9x16"
    },
    {
      "media_job": "0c6a5fda-e58a-442c-9681-a431b6195203",
      "visual_style": "DynamicGreenScreenEffect",
      "url": "https://app.creatify.ai/preview?layout=videos/20250521/1f39ca8e-bdf8-4423-81c1-1629fcaeabbd.json",
      "aspect_ratio": "9x16"
    },
    {
      "media_job": "d2110d2d-b2b5-4f0a-99dd-7d0ee07b8b13",
      "visual_style": "AvatarBubbleTemplate",
      "url": "https://app.creatify.ai/preview?layout=videos/20250521/a67532d0-0764-40c3-b1f4-36d645b935f5.json",
      "aspect_ratio": "9x16"
    }
  ]
}

๐Ÿ”„ Poll API to get Result without Webhook

If you did not provide a webhook_url, you will have to pool Creatify API to the preview generation result: GET /api/link_to_videos/{id}/
curl --request GET \
  --url https://api.creatify.ai/api/link_to_videos/20b5d452-89f4-4245-9480-10defaa8fb4d/ \
  --header 'X-API-ID: <your-api-id>' \
  --header 'X-API-KEY: <your-api-key>'
โ„น๏ธ You can embed the preview URLs using <iframe> tags in your UI to display them.

7. Render Selected Preview

Render a chosen preview video into a final output. POST /api/link_to_videos/{id}/render_single_preview/
curl --request POST \
  --url https://api.creatify.ai/api/link_to_videos/20b5d452-89f4-4245-9480-10defaa8fb4d/render_single_preview/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <your-api-id>' \
  --header 'X-API-KEY: <your-api-key>' \
  --data '{
    "media_job": "0c6a5fda-e58a-442c-9681-a431b6195203"
  }'

8. Get Render result

๐Ÿ”„ Webhook Callback Example

If you provide a webhook_url, Creatify will notify your backend of the render result:
{
  "id": "20b5d452-89f4-4245-9480-10defaa8fb4d",
  "status": "done",
  "failed_reason": null,
  "video_output": "https://s3.us-west-2.amazonaws.com/remotionlambda-uswest2-30tewi8y5c/renders/phnafddwja/output.mp4",
  "video_thumbnail": "https://dpbavq092lwjh.cloudfront.net/amzptv/0c6a5fda-e58a-442c-9681-a431b6195203-1747847145/thumbnail.jpg"
}

๐Ÿ”„ Poll API to get Result without Webhook

If you did not provide a webhook_url, you will have to pool Creatify API to the render result: GET /api/link_to_videos/{id}/
curl --request GET \
  --url https://api.creatify.ai/api/link_to_videos/20b5d452-89f4-4245-9480-10defaa8fb4d/ \
  --header 'X-API-ID: <your-api-id>' \
  --header 'X-API-KEY: <your-api-key>'

Status values in link to video response:
statusdescription
pending and previews is emptyCreated
pending and previews is not emptyPreviews generated
failedFailed (check failed_reason)
doneSuccessfully completed
rejectedRejected (content is moderated by our system)

โœ… Summary of Endpoints

StepEndpointDescription
1/api/links/Create link from URL
2/api/links/link_with_params/(Optional) Create link from parameters
3/api/links/{id}/(Optional) Update link
4/api/ai_scripts/Generate scripts
5/api/link_to_videos/preview_list_async/Generate preview videos
6/api/link_to_videos/{id}/ (GET)Get preview videos
7/api/link_to_videos/{id}/render_single_preview/Render selected preview
8/api/link_to_videos/{id}/ (GET)Check job status
โŒ˜I