# Product Photoshoot API

## 🛍️ Product Photoshoot API Introduction

Transform raw product images into polished ad creatives using AI-powered generation.

This API handles background removal, automatic product tagging, and creative generation through fine-tuned AI models. It allows for both predefined style presets and fully custom prompts, and returns studio-grade ad visuals from simple product photos.

***

### ⚙️ How It Works

The generation engine is powered by:

> **Fine-Tuned Stable Diffusion Inpainting**\
> A fine-tuned version of Stable Diffusion Inpainting, optimized for product placement use cases. It seamlessly embeds products into masked scene regions, maintaining realism and fidelity through domain-specific training.

***

### 🔁 Basic Flow

1. **Authenticate** via `/Authorization/GenerateJwtToken`
2. **Upload a product photo** using `/ProductGeneration/Recommendations`
   * Automatically extracts:\
     ✅ Product name & description\
     ✅ Background-removed image (`imageId`)\
     ✅ Prompt recommendations\
     ✅ Best-matching presetIds from `/ProductGeneration/PresetKeys`
3. **Start generation** via `/Image/ProductGeneration/AdCreative` using the `imageId`
4. **Track progress** via `/Image/ProductGeneration/CheckUserProgress`
   * Completion when: `progress = 100` and all 6 tasks return `renderState = 5`
   * Optional: Configure webhook via `/NotificationChannel` for real-time updates
5. **Download assets** via `/Image/ProductGeneration/Download`
   * Use `imageProductGeneratorProcessId` + `taskId`
   * Options:
     * `lowResolution = true/false`
     * `format = 0 (PNG) | 1 (JPEG) | 2 (PDF 1.6)`

***

### 🧠 Prompt Handling

**PromptObjectsString** (MAX 6 prompts):

```json
[
  {
    "tag": "custom",
    "prompt": "on a sleek black and blue geometric pattern background...",
    "nativeLanguagePrompt": null
  },
  {
    "preset": "white_pink_yellow_gradient_background_monochrome",
    "tag": "preset"
  },
  {
    "tag": "custom",
    "prompt": "custom style prompt",
    "nativeLanguagePrompt": null
  }
]
```

* `custom`: freeform style prompt
* `preset`: predefined styles from `/ProductGeneration/PresetKeys`

> Pass as a stringified array in the request body.

***

### 🎨 Presets

**GET** `/api/v1/Image/ProductGeneration/PresetKeys`

Retrieve predefined prompt styles categorized into groups like "monochrome", "studio", or "holiday".

```json
[
  {
    "id": "on_platform_natural_beige_background",
    "previewImageUrl": "https://api.adcreative.ai/assets/ai-product-preset/on_platform_natural_beige_background.webp",
    "previewName": "On Platform Natural Beige Background",
    "promptText": "on a platform, in front of a natural beige background",
    "categories": [{ "name": "monochrome" }]
  },
  {
    "id": "thanksgiving_rustic_scene",
    "previewImageUrl": "https://api.adcreative.ai/assets/ai-product-preset/thanksgiving_rustic_scene.webp",
    "previewName": "Thanksgiving Rustic Scene",
    "promptText": "product on rustic wood table with autumn leaves and warm lighting, thanksgiving style",
    "tags": ["holiday", "thanksgiving"]
  }
]
```

> Presets may include category-based or tag-based filters.\
> Some seasonal/holiday presets appear under "All" via internal tag logic.

***

### ⚠️ Common Error Scenarios

#### File too large

```json
Error while removing background: 
{
  "errors": [
    {
      "title": "File too large",
      "code": "file_too_large",
      "detail": "File exceeds limit of 22MB"
    }
  ]
}
```

→ Ensure images are in JPG or PNG format and are no larger than 22 MB.

***

#### Unknown foreground

```json
Error while removing background:
 {
  "errors": [
    {
      "title": "Could not identify foreground in image",
      "code": "unknown_foreground"
    }
  ]
}
```

→ Ensure your image has a well-defined object or product against a distinct background

***

### ✅ Tips for Best Results

* Foreground subject should be clear and well-lit
* Use simple backgrounds, avoid clutter
* Minimize shadows, reflections, and logos
* Ensure the product is fully visible, not cropped

***

#### 📋 GET /ProductGeneration/PresetKeys

Retrieve available preset configurations for product photo generation.

***

**Endpoint**

```
GET /api/v1/Image/ProductGeneration/PresetKeys
```

**Query Parameters**

<table data-full-width="true"><thead><tr><th width="165">Name</th><th width="150">Type</th><th width="213">Required</th><th>Description</th></tr></thead><tbody><tr><td>applicationId</td><td>GUID</td><td>Yes</td><td>The unique ID representing your application.</td></tr><tr><td>userId</td><td>GUID</td><td>Yes</td><td>The user ID under the application, used to scope presets.</td></tr></tbody></table>

***

**Example cURL Request**

```bash
curl --location 'https://api.adcreative.ai/api/v1/Image/ProductGeneration/PresetKeys?applicationId=<your-application-id>&userId=<your-user-id>' \\
--header 'Accept: application/json' \\
--header 'x-api-key: <your-api-key>' \\
--header 'x-api-secret: <your-api-secret>'
```

***

**Example Successful Response**

```json
[
  {
    "id": "on_platform_natural_beige_background",
    "previewImageUrl": "https://api.adcreative.ai/assets/ai-product-preset/on_platform_natural_beige_background.webp",
    "previewName": "On Platform Natural Beige Background",
    "promptText": "on a platform, in front of a natural beige background",
    "tags": [],
    "categories": [
      {
        "name": "monochrome"
      }
    ],
    "isOldPreset": false
  },
  {
    "id": "thanksgiving_rustic_scene",
    "previewImageUrl": "https://api.adcreative.ai/assets/ai-product-preset/thanksgiving_rustic_scene.webp",
    "previewName": "Thanksgiving Rustic Scene",
    "promptText": "product on rustic wood table with autumn leaves and warm lighting, thanksgiving style",
    "tags": ["holiday", "thanksgiving"],
    "categories": [],
    "isOldPreset": false
  }
]
```

Here’s a quick example of how categories vs. tag-based filters work:

* The first preset (monochrome category) would appear under “All” with a category label.
* The second one is a holiday-specific preset (Thanksgiving) that doesn’t belong to a category but is surfaced based on name/prompt/tags.

***

**Preset Object Description**

<table data-full-width="true"><thead><tr><th width="295">Field</th><th width="205">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Identifier for the preset</td></tr><tr><td>previewImageUrl</td><td>string</td><td>URL of the preview image</td></tr><tr><td>previewName</td><td>string</td><td>Display name of the preset</td></tr><tr><td>promptText</td><td>string</td><td>Prompt text inserted into the generation prompt</td></tr><tr><td>tags</td><td>string[]</td><td>Optional tags used for internal filtering</td></tr><tr><td>categories</td><td>object[]</td><td>Categories for UI grouping and filtering</td></tr><tr><td>isOldPreset</td><td>boolean</td><td>Whether this preset is marked as legacy or outdated</td></tr></tbody></table>

***

**Notes**

* Presets are logical themes or scene styles for placing your product.
* Presets may be filtered and grouped by `categories`, such as `monochrome`, `studio`, etc.
* Seasonal or promotional presets (like `Thanksgiving`) are surfaced via internal tag or keyword search and may not appear in grouped views.
* The `All` section groups presets by `category.name`.
* Holiday-specific filters use tag-based logic and may not display category groupings.

***

### POST /ProductGeneration/Recommendations

Transform a single product image upload into a comprehensive generation setup.

#### Overview

This endpoint processes a product image and provides:

* Automatically extracted **product name & description**
* **Background-removed** version of the image, returning a unique `imageId` (you’ll use this in /ProductGeneration/AdCreative)
* **Prompt recommendations** based on the uploaded image
* A list of **recommended presetIds** from /ProductGeneration/PresetKeys that best match the uploaded image.

Useful for preparing everything needed for the `/ProductGeneration/AdCreative` step with a single call.

***

#### Endpoint

`POST /api/v1/Image/ProductGeneration/Recommendations`

***

#### Headers

| Name         | Required | Description           |
| ------------ | -------- | --------------------- |
| Content-Type | Yes      | `multipart/form-data` |
| Accept       | Yes      | `application/json`    |
| x-api-key    | Yes      | Your API Key          |
| x-api-secret | Yes      | Your API Secret       |

***

#### Form Data Parameters

| Name          | Type | Required | Description                                   |
| ------------- | ---- | -------- | --------------------------------------------- |
| applicationId | GUID | Yes      | ID of the application (API integrator)        |
| userId        | GUID | Yes      | ID of the user (or internal customer mapping) |
| productImage  | File | Yes      | JPG/PNG file up to 12MB                       |

***

#### Example Request (cURL)

```bash
curl --location 'https://api.adcreative.ai/api/v1/Image/ProductGeneration/Recommendations' \\
--header 'Content-Type: multipart/form-data' \\
--header 'Accept: application/json' \\
--header 'x-api-key: <your-api-key>' \\
--header 'x-api-secret: <your-api-secret>' \\
--form 'applicationId="<your-application-id>"' \\
--form 'userId="<your-user-id>"' \\
--form 'productImage=@"/path/to/image.png"'
```

***

#### Example Success Response

```json
{
  "productInfo": {
    "productName": "headphones",
    "productDescription": "Wireless over-ear headphones with noise-canceling features in vibrant red and black."
  },
  "backgroundRemovedImageAssetId": "ecc767e4-c107-4492-9826-89756e925425",
  "recommendedPrompts": [
    "on a sleek glass surface with a reflection of city skyscrapers...",
    "on a dynamic music waveform graphic...",
    "on a velvet cushion inside a luxurious music studio...",
    "on a vibrant graffiti wall in an urban alley..."
  ],
  "recommendedPresetIds": [
    "natural_beige_background",
    "white_background",
    "light_grey_background",
    "light_blue_background",
    "gray_shadowy_room_sunlight_streaming_studio",
    "gray_shadowy_room_sunlight_streaming_neutral"
  ]
}
```

***

#### Error Responses

**Missing Token or Invalid Token**

```json
{
  "errors": {
    "business:": [
      "Token is missing, invalid or ApplicationId is not found in the token."
    ]
  },
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
  "title": "One or more errors occurred.",
  "status": 401,
  "detail": null,
  "instance": null,
  "extensions": {
    "traceId": "00-6865a20820da1254cdd62ef5de9df71e-60781c154d97f7c6-00"
  }
}
```

**Missing or Invalid File Upload**

```json
{
  "errors": {
    "productImage": [
      "The productImage field is required.",
      "The request does not contain a file. Please make sure to upload the file."
    ]
  },
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "traceId": "00-1342e34cfbba2b448dcaefe49e0b67d6-a3d4e02dd4b7f122-00"
}
```

***

#### 📸 /ProductGeneration/AdCreative Endpoint

**POST** `/api/v1/Image/ProductGeneration/AdCreative`

This endpoint is the core of the Product Photoshoot feature. It takes in a background-removed product image and returns multiple ad creatives generated using preset-based or custom prompts.

***

**🔐 Headers**

* `Content-Type`: multipart/form-data
* `Accept`: application/json
* `x-api-key`: *your api key*
* `x-api-secret`: *your api secret*

***

**🧾 Form Data Parameters**

<table data-full-width="true"><thead><tr><th>Name</th><th width="114">Required</th><th width="159">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>applicationId</code></td><td>✅</td><td>string</td><td>Application ID</td></tr><tr><td><code>userId</code></td><td>✅</td><td>string</td><td>User ID</td></tr><tr><td><code>renderKind</code></td><td>✅</td><td>int</td><td>One of: <code>0</code>, <code>1</code>, <code>2</code>, <code>4</code>, <code>8</code>, <code>16</code>, <code>31</code>, <code>32</code>, <code>64</code>, <code>128</code>, <code>256</code>, <code>512</code>, <code>992</code>, <code>1023</code></td></tr><tr><td><code>productImageAssetId</code></td><td>✅</td><td>string</td><td>Image Asset ID retrieved from <code>/ProductGeneration/Recommendations</code></td></tr><tr><td><code>PromptObjectsString</code></td><td>✅</td><td>string</td><td>JSON string containing an array of prompt objects (<code>preset</code> or <code>custom</code>)</td></tr><tr><td><code>productName</code></td><td>✅</td><td>string</td><td>Product name (recommended: extracted from <code>/Recommendations</code>)</td></tr><tr><td><code>productDescription</code></td><td>✅</td><td>string</td><td>Product description (recommended: extracted from <code>/Recommendations</code>)</td></tr><tr><td><code>DisableSafeMargin</code></td><td>❌</td><td>boolean</td><td>When true, returns images in strict 1200x628 instead of 1674x628 (see below)</td></tr><tr><td><code>UseSameStyleReferenceImage</code></td><td>❌</td><td>boolean</td><td>When true (default), uses the style, background and color palette from the preset image</td></tr></tbody></table>

***

**🖼️ Image Dimensions Behavior (DisableSafeMargin)**

By default, generated images are **1674x628**, offering **safe margins** to allow for design alignment (e.g. centering or left/right placement of products). This provides flexibility in use cases where further cropping or positioning is needed.

* `DisableSafeMargin = true`: returns **exact 1200x628** images (no margins)
* `DisableSafeMargin = false` or omitted: returns **1674x628** images with safe zones for alignment

***

**🎨 UseSameStyleReferenceImage**

When enabled (default), the preset’s background — represented by its previewImageUrl — is used as a visual style guide during generation. The AI blends the style and color palette from the preset image (e.g., white background, studio, floral themes) with the product image’s dominant colors to create a more personalized and brand-consistent Product Photoshoot.

For example, given a preset like:

```json
{
  "id": "white_background",
  "previewImageUrl": "https://api.adcreative.ai/assets/ai-product-preset/white_background.webp",
  "previewName": "White Background",
  "promptText": ", in front of a white background",
  "categories": [ { "name": "monochrome" } ]
}
```

...if UseSameStyleReferenceImage is set to true, the AI will consider both the white background style and the uploaded product’s color scheme when composing the final output image.

***

**🧪 Example `curl` Request**

```bash
curl --location 'https://api.adcreative.ai/api/v1/Image/ProductGeneration/AdCreative' \
--header 'Content-Type: multipart/form-data' \
--header 'Accept: application/json' \
--header 'x-api-key: f8a3d2c6e9b1a7d4c5f0e6b3a9d7c2f1' \
--header 'X-API-SECRET: b7e4c1d9a5f2e8c6d3a9b0f1c7e2d5a3f6b8c9a1d4e7f0b3c2a5d9f6e1b7c4a8' \
--form 'applicationId="6a9d3f2c-1b0e-4c7f-a8d5-e3f0c1b9a4d6"' \
--form 'userId="2f1e3c4d-5b6a-4d8f-9c01-e2d3c4b5f6a7"' \
--form 'renderKind="4"' \
--form 'productImageAssetId="d7f5c3b1-c029-4df5-8908-896ab0c1f24d"' \
--form 'PromptObjectsString="[{\"preset\":\"mid_century_modern_office\",\"tag\":\"preset\"},{\"preset\":\"mid_century_modern_office\",\"tag\":\"preset\"},{\"preset\":\"mid_century_modern_office\",\"tag\":\"preset\"},{\"preset\":\"mid_century_modern_office\",\"tag\":\"preset\"},{\"preset\":\"mid_century_modern_office\",\"tag\":\"preset\"},{\"preset\":\"mid_century_modern_office\",\"tag\":\"preset\"}]"' \
--form 'productName="vodka bottle"' \
--form 'productDescription="A clear glass bottle of vodka with blue and black text, set against a marble background with green leaves."' \
--form 'DisableSafeMargin="true"' \
--form 'UseSameStyleReferenceImage=""'
```

***

**✅ Example Response**

```json
{
  "messageType": "ImageProductGenerationProgress",
  "requestRenderState": 1,
  "applicationId": "6a9d3f2c-1b0e-4c7f-a8d5-e3f0c1b9a4d6",
  "userId": "2f1e3c4d-5b6a-4d8f-9c01-e2d3c4b5f6a7",
  "imageRenderProcessId": "60a743a6-c761-4168-9288-40a729dd407e",
  "totalTaskCount": 6,
  "completedTaskCount": 0,
  "progress": 0,
  "tasks": {
    "e790c565-d56a-4e32-b00a-66be90cfcd43": 1,
    "5a172e34-dbb0-4459-90fe-f8c228fc367a": 1,
    "076804ca-0e0d-40ac-bbbb-3d4db390f05a": 1,
    "6c7a0759-96d7-4bf5-9109-526d9fce1c47": 1,
    "8610c0a9-2b3e-4934-ad02-26e786caf921": 1,
    "1f4f1c97-8215-4920-aceb-5f67dc9f38d7": 1
  },
  "renderType": 4,
  "isSuccessful": false,
  "errorMessage": ""
}
```

***

#### GET /ProductGeneration/Download

This endpoint is used to retrieve generated product visuals based on a `taskId` and `imageProductGeneratorProcessId`. It supports optional format and resolution flags.

***

**🔗 Endpoint**

```
GET /api/v1/Image/ProductGeneration/Download
```

**📥 Query Parameters**

<table data-full-width="true"><thead><tr><th width="301">Name</th><th width="112">Type</th><th width="123">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>applicationId</code></td><td>Guid</td><td>✅ Yes</td><td>Unique identifier of the application</td></tr><tr><td><code>taskId</code></td><td>Guid</td><td>✅ Yes</td><td>ID of the individual generation task</td></tr><tr><td><code>imageProductGeneratorProcessId</code></td><td>Guid</td><td>✅ Yes</td><td>ID of the overall product generation process</td></tr><tr><td><code>lowResolution</code></td><td>Boolean</td><td>❌ No</td><td>Default: <code>false</code>. Whether to return a low-resolution version.</td></tr><tr><td><code>format</code></td><td>Integer</td><td>❌ No</td><td>Format of the image: <code>0=PNG (default)</code>, <code>1=JPEG</code>, <code>2=PDF</code></td></tr></tbody></table>

***

**📤 Headers**

| Key             | Value                |
| --------------- | -------------------- |
| `Accept`        | `application/json`   |
| `x-api-key`     | `{your_api_key}`     |
| `x-api-secret`  | `{your_api_secret}`  |
| `Authorization` | `Bearer {jwt_token}` |

***

**📦 Example cURL Request**

```bash
curl --location 'https://api.adcreative.ai/api/v1/Image/ProductGeneration/Download?applicationId={applicationId}&taskId={taskId}&imageProductGeneratorProcessId={imageProductGeneratorProcessId}&lowResolution=false&format=0' \\
--header 'Accept: application/json' \\
--header 'x-api-key: {your_api_key}' \\
--header 'x-api-secret: {your_api_secret}' \\
--header 'Authorization: Bearer {jwt_token}'
```

***

**✅ Response**

Returns the image as a file stream or downloadable content. If an error occurs, the following structure may be returned:

```json
{
  "errors": {
    "engine: ProductGeneration/Download": [
      "Image content not found."
    ],
    "business: ProductGeneration/Download": [
      "Not found error occurred while getting image content stream"
    ]
  },
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
  "title": "One or more errors occurred.",
  "status": 404,
  "detail": null,
  "instance": null,
  "extensions": {
    "traceId": "00-599b17ae93900d22ce7df8169f3188f6-edcd222ed89634ed-00"
  }
}
```

***

**📝 Download Behavior**

<table data-header-hidden data-full-width="true"><thead><tr><th width="213"></th><th width="179"></th><th></th></tr></thead><tbody><tr><td><code>lowResolution</code></td><td><code>format</code></td><td>Description</td></tr><tr><td><code>false</code></td><td><code>0</code> (PNG)</td><td>Original high-res PNG is served as-is</td></tr><tr><td><code>false</code></td><td><code>1</code> (JPEG)</td><td>High-res PNG is converted to JPEG</td></tr><tr><td><code>true</code></td><td><code>1</code> (JPEG)</td><td>Thumbnail JPEG served as-is</td></tr><tr><td><code>true</code></td><td><code>0</code> (PNG)</td><td>Thumbnail JPEG is converted to PNG (increased file size due to full color)</td></tr><tr><td><code>false</code></td><td><code>2</code> (PDF)</td><td>Original is embedded into PDF 1.6</td></tr><tr><td><code>true</code></td><td><code>2</code> (PDF)</td><td>Thumbnail is embedded into PDF 1.6</td></tr></tbody></table>

***

**❗️Common Error Responses**

* **401 Unauthorized**

```json
{
    "errors": {
        "business:": [
            "Token is missing, invalid or ApplicationId is not found in the token."
        ]
    },
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more errors occurred.",
    "status": 401,
    "detail": null,
    "instance": null,
    "extensions": {
        "traceId": "00-6865a20820da1254cdd62ef5de9df71e-60781c154d97f7c6-00"
    }
}
```

* **400 Bad Request – API Key Credits for Application does not exist**

```json
{
  "errors": {
    "engine: ProductGeneration/Download": [
      "Error decreasing Api Key Credits for Application e790c565-d56a-4e32-b00a-66be90cfcd43. ErrorMessage: API Key Credits for Application does not exist."
    ],
    "business: ProductGeneration/Download": [
      "Bad request error occurred while getting image content stream"
    ]
  },
  "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
  "title": "One or more errors occurred.",
  "status": 400,
  "detail": null,
  "instance": null,
  "extensions": {
    "traceId": "00-5593df94b6415482f5d01c65f51de46f-9a0a8bfb206eae96-00"
  }
}
```

* **400 Bad Request – Validation Error**

```json
{
  "errors": {
    "imageProductGeneratorProcessId": [
      "The value '60a743a6-c761-4168-9288-40a729dd407e1' is not valid."
    ]
  },
  "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
  "title": "One or more validation errors occurred.",
  "status": 400,
  "traceId": "00-ae0c64f2970933d69b2a159253a68fea-9e4a75471688ac32-00"
}
```

***

#### 🧠 Check User Progress

**Endpoint:**\
`GET /api/v1/Image/ProductGeneration/CheckUserProgress`

**Description:**\
Check the real-time rendering progress of Product Photoshoot generation requests for a specific user and render process.

**URL:**\
`https://api.adcreative.ai/api/v1/Image/ProductGeneration/CheckUserProgress?userId=2f1e3c4d-5b6a-4d8f-9c01-e2d3c4b5f6a7&imageProductGeneratorProcessId=60a743a6-c761-4168-9288-40a729dd407e`

**Authorization:**\
Bearer Token (Required)\
This request uses the Bearer Token

**Headers:**

```
Accept: application/json  
x-api-key: f8a3d2c6e9b1a7d4c5f0e6b3a9d7c2f1  
x-api-secret: b7e4c1d9a5f2e8c6d3a9b0f1c7e2d5a3f6b8c9a1d4e7f0b3c2a5d9f6e1b7c4a8
```

**Query Parameters:**

* `userId` (Required): The user ID of the requester
* `imageProductGeneratorProcessId` (Required): ID of the render process you wish to check

***

**🧪 Example Request**

```bash
curl --location 'https://api.adcreative.ai/api/v1/Image/ProductGeneration/CheckUserProgress?userId=2f1e3c4d-5b6a-4d8f-9c01-e2d3c4b5f6a7&imageProductGeneratorProcessId=60a743a6-c761-4168-9288-40a729dd407e' \\
--header 'Accept: application/json' \\
--header 'x-api-key: f8a3d2c6e9b1a7d4c5f0e6b3a9d7c2f1' \\
--header 'x-api-secret: b7e4c1d9a5f2e8c6d3a9b0f1c7e2d5a3f6b8c9a1d4e7f0b3c2a5d9f6e1b7c4a8'
```

***

**✅ Example Response**

```json
[
  {
    "messageType": "ImageProductGenerationProgress",
    "requestRenderState": 5,
    "applicationId": "6a9d3f2c-1b0e-4c7f-a8d5-e3f0c1b9a4d6",
    "userId": "2f1e3c4d-5b6a-4d8f-9c01-e2d3c4b5f6a7",
    "imageRenderProcessId": "60a743a6-c761-4168-9288-40a729dd407e",
    "totalTaskCount": 6,
    "completedTaskCount": 6,
    "progress": 100,
    "taskUrls": [
      {
        "taskId": "e790c565-d56a-4e32-b00a-66be90cfcd43",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/d177d546-3049-47c2-afdf-b320d38d63fc.png"
      },
      {
        "taskId": "5a172e34-dbb0-4459-90fe-f8c228fc367a",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/1a6cdca8-bf29-49e6-b2a6-2978e4739b05.png"
      },
      {
        "taskId": "076804ca-0e0d-40ac-bbbb-3d4db390f05a",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/fb75a55b-f95f-4e60-bfbd-18b984380dff.png"
      },
      {
        "taskId": "6c7a0759-96d7-4bf5-9109-526d9fce1c47",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/c794def5-1870-4699-8e4d-9381174b40bd.png"
      },
      {
        "taskId": "8610c0a9-2b3e-4934-ad02-26e786caf921",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/bd748e54-90ea-42d0-bee3-201fa9e11e49.png"
      },
      {
        "taskId": "1f4f1c97-8215-4920-aceb-5f67dc9f38d7",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/63bd51b3-3942-4ed7-b4ab-eb7cc41c83f1.png"
      }
    ],
    "renderType": 4,
    "isSuccessful": true,
    "errorMessage": ""
  }
]
```

***

**Notes:**

* `renderState` value `5` indicates that the generation task is completed.
* The `taskUrls` array contains publicly accessible image URLs for each generated product photo.
* Use the `taskId` values from this response when calling the `Download` endpoint.

***

#### 📊 GET /api/v1/Image/ProductGeneration/CheckApplicationAllProgresses

Checks the progress of all user-level image generations within a specific application.

**Endpoint**: `GET /api/v1/Image/ProductGeneration/CheckApplicationAllProgresses`\
**Auth**: Bearer Token

**🔐 Headers**

| Key          | Value                                       |
| ------------ | ------------------------------------------- |
| Accept       | application/json                            |
| x-api-key    | f8a3d2c6e9b1a7d4c5f0e6b3a9d7c2f1            |
| x-api-secret | b7e4c1d9a5f2e8c6d3a9b0f1c7e2d5a3f6b8c9a1... |

**📥 Params**

| Key           | Description |
| ------------- | ----------- |
| applicationId | Required    |

**🧪 Example Request**

```bash
curl --location 'https://api.adcreative.ai/api/v1/Image/ProductGeneration/CheckApplicationAllProgresses?applicationId=6a9d3f2c-1b0e-4c7f-a8d5-e3f0c1b9a4d6' \\
--header 'Accept: application/json' \\
--header 'x-api-key: f8a3d2c6e9b1a7d4c5f0e6b3a9d7c2f1' \\
--header 'x-api-secret: b7e4c1d9a5f2e8c6d3a9b0f1c7e2d5a3f6b8c9a1d4e7f0b3c2a5d9f6e1b7c4a8'
```

**📤 Example Response**

```json
[
  {
    "messageType": "ImageProductGenerationProgress",
    "requestRenderState": 5,
    "applicationId": "6a9d3f2c-1b0e-4c7f-a8d5-e3f0c1b9a4d6",
    "userId": "2f1e3c4d-5b6a-4d8f-9c01-e2d3c4b5f6a7",
    "imageRenderProcessId": "51b81216-fd1f-4af3-935f-c7e7f1a0b5af",
    "totalTaskCount": 6,
    "completedTaskCount": 6,
    "progress": 100,
    "taskUrls": [
      {
        "taskId": "7bf3c04a-c159-4e42-81fa-1bd5d2280372",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/6cc1319d-81b5-427e-8f43-238f326b9381.png"
      },
      {
        "taskId": "9855e1fc-d859-4307-b9d3-dac0f5951227",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/99071d6b-946c-4815-9eca-c508373d129b.png"
      },
      {
        "taskId": "9033d6b8-ac39-4c3b-a326-9e61fdf98b34",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/d9f085fb-8884-4e6c-879f-1b647e5091b7.png"
      },
      {
        "taskId": "d0417a50-a42f-48cc-a23c-0d4d00d277c5",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/465f9731-fbfd-4301-8a27-b7bb919e30eb.png"
      },
      {
        "taskId": "301eb9f8-ac82-4e53-ab49-9dcb66729383",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/9e52d180-e067-4220-b7f9-ba33c7d3e2af.png"
      },
      {
        "taskId": "b7a45b59-e022-47b0-a527-7dd2ba0d3ba2",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/36196d3f-bd10-4410-bf00-32fbe298bc25.png"
      }
    ],
    "renderType": 4,
    "isSuccessful": true,
    "errorMessage": ""
  },
  {
    "messageType": "ImageProductGenerationProgress",
    "requestRenderState": 5,
    "applicationId": "6a9d3f2c-1b0e-4c7f-a8d5-e3f0c1b9a4d6",
    "userId": "2f1e3c4d-5b6a-4d8f-9c01-e2d3c4b5f6a7",
    "imageRenderProcessId": "e1fafe2b-40dd-4448-8c12-13a4738185b0",
    "totalTaskCount": 6,
    "completedTaskCount": 6,
    "progress": 100,
    "taskUrls": [
      {
        "taskId": "a033cadf-4d15-49fd-bfa2-51cc5956a6f7",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/ffd01f2b-9b3a-4d31-8b44-92594c7a87aa.png"
      },
      {
        "taskId": "c3233c50-88e5-46bf-93b0-ebe839480360",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/b84468f5-c21a-49d2-83ae-1edcb65427b9.png"
      },
      {
        "taskId": "f1266bfb-9c01-4867-964b-de0a2ee57a64",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/33b856a6-0c04-4c88-8da8-6bbac963e37a.png"
      },
      {
        "taskId": "6decfe70-1713-4966-8580-68337d3278a7",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/e1a213ac-2a1a-484a-a529-658e9472a266.png"
      },
      {
        "taskId": "42e2406e-34ee-4f1b-9550-59de81bca30f",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/fdbcc767-0a34-4931-8257-7e7472fe2ba8.png"
      },
      {
        "taskId": "ac96db4e-b066-41b8-b86e-579346d66d73",
        "renderState": 5,
        "publicImageUrl": "https://storage.googleapis.com/adcreative-bucket/images/ai-product-images/45c5ee7a-0861-402d-bd96-6a3394d3a65a.png"
      }
    ],
    "renderType": 4,
    "isSuccessful": true,
    "errorMessage": ""
  }
]
```

> This endpoint is ideal for applications managing multiple users and monitoring all ongoing generation jobs across the system.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api-docs.adcreative.ai/docs/features/product-photoshoot-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
