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

# HTML Interactive Ads API

> Generate playable HTML ads from a product page, one self-contained file per style, ready to upload to an ad network.

## 🚀 Introduction

The **HTML Interactive Ad API** turns a **product page** into **playable HTML ads**.

You give it one Link and a list of styles, and get back one ad per style. Every ad is a single
self-contained HTML file — images and fonts inlined, the click-through wired to MRAID, compressed
to fit the size limit ad networks accept — so you upload the file as it is, with no packaging step
of your own. Ads render as a 360×640 portrait card that scales to the screen, and a tap opens the
product URL.

***

## 1. Create Link from URL

Extract content (title, description, images, videos, etc.) from a product URL.

[`POST /api/links/`](/api-reference/links/post-apilinks)

```bash Example Request theme={null}
curl --request POST \
  --url https://api.creatify.ai/api/links/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-id>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
    "url": "https://www.brooklinen.com/products/luxe-core-sheet-set"
}'
```

```json Example Response [expandable] theme={null}
{
    "id": "052e333a-f308-4bad-96b1-ab58e5c413d3",
    "url": "https://www.brooklinen.com/products/luxe-core-sheet-set",
    "link": {
        "id": "bd0fa6e5-2517-48e6-9173-3e534f21a12e",
        "url": "https://www.brooklinen.com/products/luxe-core-sheet-set",
        "title": "Luxe Sateen Core Sheet Set",
        "description": "Why You’ll Love It \n Softness so indulgent, you’ll order room service at home. Our new Luxe Sateen Sheets are made with luxier upgrades like an increased thread count and 100% long-staple cotton for durability and breathability; a unique 4-over-1 weave pattern that’s soft as buttah’; and a silky-smooth, secret-finish softness you can’t get anywhere else but in bed with us. \n How It Feels\n Luxuriously soft, breathable, and smooth like buttah’\n How It Looks\n Indulgent &amp; inviting, with a beautiful drape over your bed &amp; body \n Best For\n Year-round comfort for most sleepers in four-season climates",
        "image_urls": [
            "https://cdn.shopify.com/s/files/1/0951/7126/files/BKL_25-11_Bedding_Luxe_White_CSS_1_x_PDP_WO_9a378fea-9426-49f3-86ef-f15ec88bdae4.jpg?v=1779223625",
            "https://cdn.shopify.com/s/files/1/0951/7126/files/BKL_24-05_Bedding_Luxe_Pebble_Detail_1x_WOgrey_c2e8da80-c9a9-4728-a936-4e99aa7daa82.jpg?v=1779223624",
            "https://cdn.shopify.com/s/files/1/0951/7126/files/BKL_25-01_Bedding_Luxe_TandemStripeinFreshMoss_Detail_1x_WOgrey_41b4c61f-a6ab-4ee6-a053-f469d4617ffb.jpg?v=1779223625",
            "https://cdn.shopify.com/s/files/1/0951/7126/files/BKL_25-01_Bedding_Luxe_TandemStripeInPebble_Detail_1x_WOgrey_05de4385-fcf7-4c4f-940a-125e12178562.jpg?v=1779223624",
            "https://cdn.shopify.com/s/files/1/0951/7126/files/BKL_25-01_Bedding_Luxe_OysterInPebble_COR_1x_WOgrey_b0022608-2095-433e-818f-43caf1ecf245.jpg?v=1779223625"
        ],
        "video_urls": [
            "https://www.brooklinen.com/cdn/shop/videos/c/vp/0a770688672e4f96bfae4252c0e516c1/0a770688672e4f96bfae4252c0e516c1.HD-720p-4.5Mbps-84497806.mp4?v=0"
        ],
        "reviews": [],
        "logo_url": "https://cdn.creatify.ai/products/bd0fa6e5-2517-48e6-9173-3e534f21a12e/logo_8463dc1c.png",
        "ai_summary": "The Luxe Sateen Core Sheet Set includes a flat sheet, fitted sheet, and two pillowcases made from 100% long-staple cotton with a 495 thread count for durability, breathability, and softness. Crafted in Portugal, these sheets feature a unique 4-over-1 weave and a new secret finish that creates a silky-smooth, low-sheen look and luxurious softness.",
        "ai_industry": "Daily Essentials",
        "ai_target_audiences": [
            "Luxury home bedding shoppers",
            "Quality-conscious sleepers",
            "Breathable fabric enthusiasts",
            "Sateen fabric lovers",
            "Eco-conscious cotton buyers",
            "Four-season comfort seekers",
            "Elegant bedroom decorators"
        ],
        "brand_color": "#F0D7BF",
        "qrcode_url": null,
        "primary_image_url": null
    },
    "credits_used": 1
}
```

> 💡 Save the top-level `id` — that is the **Link ID** you pass in step 4.

> 💡 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: {url}"]

***

## 2. (Optional) Create Link with Parameters

If you don’t have a URL but have product data, create a link directly using parameters.

[`POST /api/links/link_with_params/`](/api-reference/links/post-apilink_with_params)

```bash Example Request theme={null}
curl --request POST \
  --url https://api.creatify.ai/api/links/link_with_params/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-id>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
    "title": "Luxe Sateen Core Sheet Set",
    "description": "100% long-staple cotton, 495 thread count, woven in Portugal. Includes 1 flat sheet, 1 fitted sheet and 2 pillowcases.",
    "image_urls": [
        "https://cdn.shopify.com/s/files/1/0951/7126/files/BKL_25-11_Bedding_Luxe_White_CSS_1_x_PDP_WO_9a378fea-9426-49f3-86ef-f15ec88bdae4.jpg?v=1779223625",
        "https://cdn.shopify.com/s/files/1/0951/7126/files/BKL_24-05_Bedding_Luxe_Pebble_Detail_1x_WOgrey_c2e8da80-c9a9-4728-a936-4e99aa7daa82.jpg?v=1779223624"
    ]
}'
```

The response has the same shape as step 1, and its top-level `id` is the Link ID.

> 💡 Provide at least **1 image** — an ad cannot be generated without one.

***

## 3. (Optional) Update Link

Modify an existing link’s metadata (title, description, images, logo). The ads are built from
exactly what the link holds, so fix anything the scraper got wrong before you generate.

[`PUT /api/links/{id}/`](/api-reference/links/put-apilinks-)

```bash Example Request theme={null}
curl --request PUT \
  --url https://api.creatify.ai/api/links/052e333a-f308-4bad-96b1-ab58e5c413d3/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-id>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
    "title": "Luxe Sateen Core Sheet Set",
    "image_urls": [
        "https://cdn.shopify.com/s/files/1/0951/7126/files/BKL_25-11_Bedding_Luxe_White_CSS_1_x_PDP_WO_9a378fea-9426-49f3-86ef-f15ec88bdae4.jpg?v=1779223625"
    ]
}'
```

> 💡 A link needs a title and at least one image before it can be advertised.

***

## 4. Browse Styles

Each style produces one ad. Fetch the catalog once and keep the ids you like — they are stable, so
you can reuse them for every product.

[`GET /api/html_interactive_ads/styles/`](/api-reference/html-interactive-ads/get-html-interactive-ads-styles)

```bash Example Request theme={null}
curl --request GET \
  --url https://api.creatify.ai/api/html_interactive_ads/styles/ \
  --header 'X-API-ID: <api-id>' \
  --header 'X-API-KEY: <api-key>'
```

```json Example Response [expandable] theme={null}
[
    {
        "id": "wonderskin-01",
        "name": "Wonderskin 01",
        "type": "video",
        "interactive": false,
        "thumbnail_url": "https://cdn.creatify.ai/llm_editor/video_refs/thumbs/Wonderskin_01.jpg",
        "preview_url": "https://cdn.creatify.ai/llm_editor/video_refs/Wonderskin_01.mp4"
    },
    {
        "id": "scratch-card-reveal",
        "name": "Scratch Card Reveal",
        "type": "idea",
        "interactive": true,
        "thumbnail_url": "https://cdn.creatify.ai/user/1/llm_cta/9458d1c6.png",
        "preview_url": "https://cdn.creatify.ai/llm_editor/idea_previews/scratch-card-reveal/health-and-wellness.mp4"
    }
]
```

| Field | Meaning |
| - | - |
| `type` | `video` follows the layout of a real ad; `idea` follows a template concept. |
| `interactive` | The ad responds to taps or swipes beyond the call to action. |
| `preview_url` | A short video showing what the style looks like. |

***

## 5. Create HTML Interactive Ad Task

Create a task using the **Link ID** from step 1 and the style ids from step 4.

[`POST /api/html_interactive_ads/`](/api-reference/html-interactive-ads/post-html-interactive-ads)

```bash Example Request theme={null}
curl --request POST \
  --url https://api.creatify.ai/api/html_interactive_ads/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-id>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
    "link": "052e333a-f308-4bad-96b1-ab58e5c413d3",
    "style_ids": ["wonderskin-01", "scratch-card-reveal"],
    "promotion_info": "20% off this week",
    "max_size_mb": 5,
    "webhook_url": "https://webhook.site/ea6d0ccb-9a41-4a05-bdaa-08664c5f9f84"
}'
```

```json Example Response theme={null}
{
    "id": "57ccb485-fa7d-46aa-995a-9fb3eb5b4534",
    "created_at": "2026-09-20T04:47:40.230348-07:00",
    "updated_at": "2026-09-20T04:47:40.230348-07:00",
    "link": "052e333a-f308-4bad-96b1-ab58e5c413d3",
    "style_ids": ["wonderskin-01", "scratch-card-reveal"],
    "promotion_info": "20% off this week",
    "custom_prompt": null,
    "max_size_mb": 5,
    "webhook_url": "https://webhook.site/ea6d0ccb-9a41-4a05-bdaa-08664c5f9f84",
    "status": "pending",
    "failed_reason": null,
    "ads": [],
    "credits_used": 0
}
```

| Field | Required | Notes |
| - | - | - |
| `link` | Yes | The Link ID from step 1. |
| `style_ids` | Yes | 1–20 styles, no repeats. One ad per style. |
| `promotion_info` | No | An offer to feature, e.g. `20% off this week`. Without it the ads make no discount claim. |
| `custom_prompt` | No | Extra direction, e.g. tone or what to emphasize. |
| `max_size_mb` | No | Largest file size per ad, 5–15. Defaults to 5, the AppLovin limit. |
| `webhook_url` | No | Called once, when every ad has finished. |

> 🎬 Save the returned `id` and use it to check the task status.

***

## 6. Check Task Status

An ad takes a few minutes, and a task finishes when all of its ads do. Poll the status endpoint
until `status` becomes `done`.

[`GET /api/html_interactive_ads/{id}/`](/api-reference/html-interactive-ads/get-html-interactive-ads-)

```bash Example Request theme={null}
curl --request GET \
  --url https://api.creatify.ai/api/html_interactive_ads/57ccb485-fa7d-46aa-995a-9fb3eb5b4534/ \
  --header 'X-API-ID: <api-id>' \
  --header 'X-API-KEY: <api-key>'
```

```json Example Response [expandable] theme={null}
{
    "id": "57ccb485-fa7d-46aa-995a-9fb3eb5b4534",
    "created_at": "2026-09-20T04:47:40.230348-07:00",
    "updated_at": "2026-09-20T04:51:35.286228-07:00",
    "link": "052e333a-f308-4bad-96b1-ab58e5c413d3",
    "style_ids": ["wonderskin-01", "scratch-card-reveal"],
    "promotion_info": "20% off this week",
    "custom_prompt": null,
    "max_size_mb": 5,
    "webhook_url": "https://webhook.site/ea6d0ccb-9a41-4a05-bdaa-08664c5f9f84",
    "status": "done",
    "failed_reason": null,
    "ads": [
        {
            "id": "738a25b2-fd2c-4972-b7f5-8cf20d43df5b",
            "style_id": "wonderskin-01",
            "status": "done",
            "html_url": "https://cdn.creatify.ai/llm_editor/download/738a25b2-fd2c-4972-b7f5-8cf20d43df5b/f7e87b53.html",
            "size_bytes": 1840620,
            "failed_reason": null
        },
        {
            "id": "1f5fc4a0-b19b-4868-8d68-c513b3592e25",
            "style_id": "scratch-card-reveal",
            "status": "done",
            "html_url": "https://cdn.creatify.ai/llm_editor/download/1f5fc4a0-b19b-4868-8d68-c513b3592e25/74fc00e7.html",
            "size_bytes": 1024429,
            "failed_reason": null
        }
    ],
    "credits_used": 20
}
```

> ✅ When `status` is `done`, download each `html_url` and upload the file to your ad network.

A task is `done` when at least one ad succeeded, and `failed` when none did. Ads are billed
individually, so `credits_used` counts only the ads you received — an ad that fails is refunded.

***

## 7. Webhook Option

Instead of polling, you can provide a `webhook_url` in the request to receive the result
automatically. Once every ad has finished, Creatify sends a POST request to your webhook with the
same body the status endpoint returns.

***

## 🎯 Summary

| Step | Endpoint |
| - | - |
| Create Link | `POST /api/links/` |
| Browse Styles | `GET /api/html_interactive_ads/styles/` |
| Create Task | `POST /api/html_interactive_ads/` |
| Check Status | `GET /api/html_interactive_ads/{id}/` |
| API Reference | [HTML Interactive Ad Reference](/api-reference/html-interactive-ads/post-html-interactive-ads.md) |

***

## 💳 Pricing

Each successfully generated ad costs **10 credits**. A request for 5 styles costs **50 credits**.
Ads that fail, or that cannot be compressed under `max_size_mb`, are refunded.

***

## 📌 Notes and Limits

* Ads are 360×640 portrait and the click-through always opens the product URL; a custom landing
  page and a language setting are not supported.
* Files are validated against the AppLovin/MRAID requirements: assets inlined, no direct page
  redirects, and a size under `max_size_mb`. An ad that does not pass is failed and refunded rather
  than delivered.
* Generating ads for many products means one task per product.

***

## 🤝 Need Help?

If you run into any issues, check out our [API Reference](/api-reference) or contact [api@creatify.ai](mailto:api@creatify.ai).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.