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

# Overview

> Endpoints for retriving Inspirations and creating Inspiration Jobs with discoverable input schemas.

## 🚀 Introduction

The **AI Ad Template API** provides a simple interface to explore available **inspirations**, inspect their **input parameter schemas**, and create **inspiration jobs** that generate assets using those inspirations.

1. First, list available inspirations and their **JSON schemas**.
2. Then create an **inspiration job** and **poll or use a webhook** to retrieve the result.

***

## ✅ Prerequisites

* A **Creatify account** with API access
* Your **API credentials** (see [Authentication](/api-reference/authentication))

***

## 1) Discover Inspirations & Input Schemas

Use this endpoint to list all available **inspirations** and view the **JSON schema** for their `input_params`.

**Endpoint:**  [GET /api/inspirations/](/api-reference/inspiration/get-inspirations)

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

  ```json Example Response [expandable] theme={null}
  [
    {
      "id": "d749750d-4102-400d-949d-8e701bd0a800",
      "name": "Luxurious Jewelry",
      "description": "An image turning your jewelry into a luxurious jewelry shot.",
      "gen_type": "image",
      "input_params_schema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {
              "Product Image": {
                  "type": "string",
                  "title": "Product Image",
                  "format": "uri",
                  "default": "https://v3b.fal.media/files/b/rabbit/p5uJwVMfOP7YriRl190xZ.jpg"
              }
          },
          "required": [
              "Product Image"
          ]
      },
      "preview_image": "https://d35ghwdno3nak3.cloudfront.net/community_creation/d749750d-4102-400d-949d-8e701bd0a800/preview_image_pacjBpkmhdxdCioG4glOM.jpg",
      "preview_video": null,
      "credit_cost": 1,
      "categories": [
          "IMAGE ADS"
      ],
      "labels": [
          "Apparel & Acc"
      ]
    }
  ]
  ```
</CodeGroup>

> **Notes**
>
> * `input_params_schema` is the schema of the input\_params for each inspiration.

***

## 2) Create an Inspiration Job

Submit the `inspiration_id` (inspiration ID) and `input_params` to start a new job.\
Optional: add a `webhook_url` to receive automatic notifications.

**Endpoint:**  [POST /api/inspiration\_jobs/](/api-reference/inspiration/post-inspiration-job)

**Body:**

* `inspiration_id` (string, required)
* `input_params` (json, required — must match the input\_params\_schema)
* `webhook_url` (string URL, optional)

<CodeGroup>
  ```bash Example Request theme={null}
  curl --request POST \
    --url https://api.creatify.ai/api/inspiration_jobs/ \
    --header 'Content-Type: application/json' \
    --header 'X-API-ID: your-api-id' \
    --header 'X-API-KEY: your-api-key' \
    --data '{
      "inspiration_id": "d749750d-4102-400d-949d-8e701bd0a800",
      "input_params": {
          "Product Image": "https://d35ghwdno3nak3.cloudfront.net/images/d6ba29c096ae40a9ca7a78ff135b5efd56d990278ae58a6f825caa3942c3c12a.jpg"
      },
      "webhook_url": "https://webhook.site/c424cab8-8ed2-46d6-9b04-d1290ca04276"
    }'
  ```

  ```json Example Response theme={null}
  {
      "id": "7c79daa6-db68-4d81-9ad7-2a88f866d6f6",
      "inspiration_id": "d749750d-4102-400d-949d-8e701bd0a800",
      "gen_type": "image",
      "status": "in_queue",
      "failed_reason": "",
      "input_params": {},
      "webhook_url": "https://webhook.site/c424cab8-8ed2-46d6-9b04-d1290ca04276",
      "output": null,
      "created_at": "2025-11-26T02:48:18.812765-08:00",
      "updated_at": "2025-11-26T02:48:18.812799-08:00"
  }
  ```
</CodeGroup>

***

## 3) Check Job Status (Poll) or Receive Webhook

Poll the job by its ID until status becomes `done`, or use the webhook to receive the final result automatically.

**Endpoint:**  [`GET /api/inspiration_jobs/{id}/`](/api-reference/inspiration/get-inspiration-job)

### Polling Example

<CodeGroup>
  ```bash Example Request theme={null}
  curl --request GET \
    --url https://api.creatify.ai/api/inspiration_jobs/7c79daa6-db68-4d81-9ad7-2a88f866d6f6/ \
    --header 'X-API-ID: your-api-id' \
    --header 'X-API-KEY: your-api-key'
  ```

  ```json Example Response theme={null}
  {
      "id": "7c79daa6-db68-4d81-9ad7-2a88f866d6f6",
      "inspiration_id": "d749750d-4102-400d-949d-8e701bd0a800",
      "gen_type": "image",
      "status": "done",
      "failed_reason": "",
      "input_params": {},
      "webhook_url": "https://webhook.site/c424cab8-8ed2-46d6-9b04-d1290ca04276",
      "output": "https://v3b.fal.media/files/b/zebra/5wm4Y12i3eOf1zobSnbGd.jpg",
      "created_at": "2025-11-26T02:48:18.812765-08:00",
      "updated_at": "2025-11-26T02:48:18.812799-08:00"
  }
  ```
</CodeGroup>

### Webhook Example

If you provided `webhook_url`, Creatify sends:

```json theme={null}
{
  "id": "7c79daa6-db68-4d81-9ad7-2a88f866d6f6",
  "status": "done",
  "failed_reason": "",
  "output": "https://v3b.fal.media/files/b/zebra/5wm4Y12i3eOf1zobSnbGd.jpg"
}
```

> You can verify the job anytime via a GET request to `/api/inspiration_jobs/{id}/`.

***

## 📚 Endpoint Reference

| Action                        | Endpoint                          |
| ----------------------------- | --------------------------------- |
| List inspirations & schemas   | `GET /api/inspirations/`          |
| Create an inspiration job     | `POST /api/inspiration_jobs/`     |
| Check job status / get result | `GET /api/inspiration_jobs/{id}/` |

***

## 🎯 Summary

| Step | What you do                                                                           |
| ---- | ------------------------------------------------------------------------------------- |
| 1    | List **inspirations** and view their **input schema**                                 |
| 2    | Create an **inspiration job** with `inspiration_id` + `input_params`                  |
| 3    | **Poll** `/api/inspiration_jobs/{id}/` or receive a **webhook** with the final result |
