{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"c10655b8-1a29-46c3-aa65-0c7ee8352c11","name":"Dreem AI API Documentation","description":"The **Dreem AI API** collection for **AI Tool**, **Dreem Studio** and **Dreem Platform** public endpoints.\n\nBuild AI-powered fashion imagery — virtual model generation, packshot creation, image-to-video, and external production session management.\n\n## Base URLs\n\n| Studio API | AI Tool API | Platform API |\n| --- | --- | --- |\n| `https://api.dreem.ai/studio` | `https://api.dreem.ai/ai-tool` | `https://api.dreem.ai/platform` |\n\n## Quick Navigation\n\n| Section | Description |\n| --- | --- |\n| **Getting Started** | Authentication, base URLs, webhook setup |\n| **Enums & Reference** | All enum values, validation constraints |\n| **Error Codes** | Studio & Platform error code reference |\n| **Rate Limiting** | Request limits, retry strategies, backoff algorithms |\n| **Best Practices** | Security, integration patterns, error handling |\n| **Studio API** | Resources, video prompts, request status |\n| **AI Tool API** | Generation endpoints (virtual model, packshot, image-to-video) |\n| **Platform API** | External session integration |\n\n---\n\n# Rate Limiting\n\n## Overview\n\nAll endpoints are subject to rate limits based on your API key and subscription tier. Monitor rate limit headers to avoid 429 errors.\n\n## Rate Limit Tiers\n\n| Endpoint Category | Limit | Window |\n| --- | --- | --- |\n| **Read Operations** (GET) | 10 req | per second |\n| **Write Operations** (POST/PUT) | 10 req | per second |\n| **Generation** (AI processing) | 1 req | per second |\n| **Webhooks** (callbacks) | 50 req | per second |\n\n## HTTP 429 Response\n\n``` json\n{\n  \"error\": \"Rate limit exceeded\",\n  \"message\": \"Too many requests. Retry after 3600 seconds.\",\n  \"retryAfter\": 3600\n}\n\n ```\n\n## Retry Strategy\n\n**Exponential backoff with jitter:**\n\n``` javascript\nasync function callWithRetry(url, options, maxRetries = 3) {\n  for (let i = 0; i < maxRetries; i++) {\n    const res = await fetch(url, options);\n    if (res.status === 429) {\n      const delay = Math.pow(2, i) * 1000 + Math.random() * 1000;\n      await sleep(delay);\n      continue;\n    }\n    return res;\n  }\n  throw new Error('Max retries exceeded');\n}\n\n ```\n\n**Best practices:**\n\n- Monitor `X-RateLimit-Remaining` to throttle proactively\n    \n- Use batch endpoints when available\n    \n- Spread requests over time to avoid bursts\n    \n\n---\n\n# Error Codes\n\nComplete error code reference for both Studio and Platform APIs.\n\n---\n\n## Studio API — Error Codes (EnumErrorGeneration)\n\nAll Studio API responses include an `errorCode` integer field. Value `0` means success.\n\n**Response format on error:**\n\n``` json\n{\n  \"errorCode\": 5,\n  \"requestId\": null,\n  \"message\": \"Talent not found\"\n}\n\n ```\n\n### Full Error Code Table\n\n| Code | Name | HTTP | Description | Common Cause |\n| --- | --- | --- | --- | --- |\n| `0` | Success | 200/202 | Request accepted | — |\n| `1` | InvalidInput | 400 | Generic validation failure | Malformed JSON, missing required fields |\n| `2` | InvalidTalentId | 400 | `talentId` is not a valid GUID | Typo in UUID, empty string |\n| `3` | InvalidShotCodes | 400 | `shotCodes` is empty or invalid | Empty array `[]`, codes with typos |\n| `4` | InvalidImages | 400 | `images` is empty or URLs unreachable | Empty array, 404 URLs, private URLs |\n| `5` | TalentNotFound | 400 | Talent doesn't exist or is inactive | Deleted/deactivated talent, wrong env |\n| `6` | ShotNotFound | 400 | Shot codes not found | Shot code typo, wrong shotType |\n| `7` | PoseNotFound | 400 | No pose for talent + shot combo | Talent doesn't support requested shot |\n| `8` | MessageSendFailed | 502 | Failed to queue message (SQS) | Infrastructure issue — retry recommended |\n| `9` | TooManyImages | 400 | More than 10 images | Reduce `images[]` to max 10 |\n| `10` | InvalidOutputFormat | 400 | `outputFormat` not 0 or 1 | Value out of enum range |\n| `11` | InvalidOutputAspectRatio | 400 | `outputAspectRatio` not 0–9 | Value out of enum range |\n| `12` | InvalidShotType | 400 | `shotType` query param invalid | Not 0 or 1 in GET /shots |\n| `13` | InvalidGender | 400 | `gender` query param invalid | Not 0 or 1 in GET /talents |\n| `14` | InvalidCallbackUrl | 400 | `callbackUrl` not valid URL | Missing protocol, malformed |\n| `15` | RequestNotFound | 400 | `requestId` doesn't exist | Wrong ID, different tenant |\n| `16` | InvalidRequestId | 400 | `requestId` not valid GUID | Typo in UUID |\n| `17` | InvalidDuration | 400 | `duration` not \"5s\" or \"10s\" | Wrong format |\n| `18` | InvalidFrameType | 400 | `frameType` not 0 or 1 | Value out of enum range |\n| `19` | InvalidImageFormat | 400 | Image not allowed format | Only .jpg/.jpeg/.png/.webp |\n| `20` | Forbidden | 403 | No permission | Feature not enabled for account |\n| `22` | InvalidResolution | 400 | Invalid resolution tier | Not 0 (1K), 1 (2K), or 2 (4K) |\n| `500` | InternalError | 500 | Server error | Contact support with requestId |\n\n### Error Codes by Endpoint\n\n| Endpoint | Applicable Codes |\n| --- | --- |\n| `POST /virtual-model` | `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `14`, `19`, `20`, `22`, `500` |\n| `POST /packshot` | `3`, `4`, `6`, `8`, `9`, `10`, `11`, `14`, `19`, `20`, `22`, `500` |\n| `POST /image-to-video` | `4`, `8`, `11`, `14`, `17`, `18`, `19`, `20`, `22`, `500` |\n| `GET /requests/{requestId}` | `15`, `16`, `500` |\n| `GET /shots` | `12` |\n| `GET /talents` | `13` |\n\n---\n\n## Platform API — Error Handling\n\nPlatform API uses standard HTTP status codes with a simple error body.\n\n**Error response format:**\n\n``` json\n{\n  \"ErrorCode\": 400,\n  \"Message\": \"Invalid Data\"\n}\n\n ```\n\n### HTTP Status Codes\n\n| Status | Meaning | When |\n| --- | --- | --- |\n| `200` | OK | GET success, POST files success, DELETE success |\n| `201` | Created | `POST /connectors` success, `POST /sessions` success |\n| `400` | Bad Request | Missing required fields, invalid data format |\n| `404` | Not Found | Connector or Session ID doesn't exist or was deleted |\n\n### Error Scenarios by Endpoint\n\n| Endpoint | Status | Scenario |\n| --- | --- | --- |\n| `POST /sessions` | 400 | Missing `sessionName` or `externalKey`, invalid file data |\n| `POST /sessions/{id}/files` | 400 | Missing `fileUrl`, malformed JSON, empty files array, or exceeds 10 files limit |\n| `POST /sessions/{id}/files` | 404 | Session not found or belongs to another tenant |\n| `GET /sessions/{id}` | 404 | Session not found or belongs to another tenant |\n\n# Enums & Reference\n\nComplete reference for all enum values and validation rules used across Dreem APIs.\n\n---\n\n## Studio API — Enums\n\nAll enum fields in Studio API requests accept **integer values**.\n\n### EnumOutputFormat\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | Png | Lossless compression, supports transparency, larger file size |\n| `1` | Jpeg | Lossy compression, smaller file size, no transparency |\n\n**Used in:** `outputFormat` field of `/virtual-model`, `/packshot`\n\n---\n\n### EnumOutputAspectRatio\n\n| Value | Name | Ratio | Typical Use Case |\n| --- | --- | --- | --- |\n| `0` | Ratio1x1 | 1:1 | Instagram feed, product thumbnails |\n| `1` | Ratio4x3 | 4:3 | Standard photography, product listing pages |\n| `2` | Ratio3x2 | 3:2 | DSLR standard, editorial layouts |\n| `3` | Ratio2x3 | 2:3 | Portrait orientation, mobile product cards |\n| `4` | Ratio5x4 | 5:4 | Medium format photography, print catalogs |\n| `5` | Ratio4x5 | 4:5 | Instagram portrait posts, vertical ads |\n| `6` | Ratio3x4 | 3:4 | Portrait product display, lookbook pages |\n| `7` | Ratio9x16 | 9:16 | Instagram/TikTok Stories, mobile full-screen |\n| `8` | Ratio16x9 | 16:9 | Website hero banners, YouTube thumbnails |\n| `9` | Ratio21x9 | 21:9 | Ultra-wide banners, cinematic displays |\n\n**Used in:** `outputAspectRatio` field of all generation endpoints\n\n---\n\n### EnumResolution\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | OneK | 1K resolution (\\~1024×1024) — default |\n| `1` | TwoK | 2K resolution (\\~2048×2048) |\n| `2` | FourK | 4K resolution (\\~4096×4096) |\n\n**Used in:** `resolution` field of `/virtual-model`, `/packshot`\n\n---\n\n### EnumViewType\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | Front | Front-facing view — main design, logo, print |\n| `1` | Back | Back-facing view — rear design, labels |\n\n**Used in:** `images[].viewType` of `/virtual-model`, `/packshot`\n\n---\n\n### EnumProductType\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | Main | Primary hero product being showcased |\n| `1` | Outfit | Complementary styling garment |\n\n**Used in:** `images[].productType` of `/virtual-model`, `/packshot`\n\n---\n\n### EnumFrameType\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | FirstFrame | Opening/starting frame of the video |\n| `1` | LastFrame | Ending/closing frame of the video |\n\n**Used in:** `images[].frameType` of `/image-to-video`\n\n---\n\n### ShotType (Query Filter)\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | VirtualModel | Shots with a virtual talent wearing the product |\n| `1` | Packshot | Product-only shots (flat lay, mannequin, hanging) |\n\n**Used in:** `shotType` query parameter of `GET /shots`\n\n---\n\n### Gender (Query Filter)\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | Male | Male virtual talents |\n| `1` | Female | Female virtual talents |\n\n**Used in:** `gender` query parameter of `GET /talents`\n\n---\n\n## Platform API — Enums\n\n### ExternalViewType\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | Front | Front-facing view of the garment |\n| `1` | Back | Back-facing view of the garment |\n\n**Used in:** `files[].viewType` of `POST /sessions`, `POST /sessions/{id}/files`\n\n---\n\n### ExternalProductType\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | Main | Primary hero product being processed |\n| `1` | Outfit | Supporting garment for styling context |\n\n**Used in:** `files[].productType` of `POST /sessions`, `POST /sessions/{id}/files`\n\n---\n\n### SessionFileResourceType\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | Normal | Standard input file — accepted for processing |\n| `1` | Reject | Rejected file — flagged for re-work by external QC |\n\n**Used in:** `files[].resourceType` of `POST /sessions`, `POST /sessions/{id}/files`\n\n---\n\n### SessionType\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `0` | ToolBase | Studio tool-based workflow |\n| `1` | ChatBase | Studio chat-based workflow |\n| `2` | Guest | Guest/anonymous session |\n| `3` | ExternalSession | Created via Platform Public API |\n\n---\n\n### ConnectorState\n\n| Value | Name | Description |\n| --- | --- | --- |\n| `1` | Active | Connector is operational |\n\n---\n\n## Validation Constraints\n\n### Studio API\n\n| Rule | Value | Description |\n| --- | --- | --- |\n| Max images per request | **10** | Maximum number of image URLs in `images[]` array |\n| Allowed image formats | `.jpg`, `.jpeg`, `.png`, `.webp` | Only these extensions are accepted |\n| Video duration | `\"5s\"` or `\"10s\"` | Only two values supported (string format) |\n| Pre-signed URL expiry | **12 hours** (43,200 seconds) | S3 download URLs in outputs expire after this |\n| Default page size | **50** | Default items returned per page |\n| Min page number | **1** | Pages are 1-indexed |\n| prompt vs promptId | Mutually exclusive | Provide one or the other, not both |\n\n### Platform API\n\n| Rule | Description |\n| --- | --- |\n| File URLs | Must be publicly accessible — downloaded asynchronously by background job |\n| API Key | Only returned **once** at connector creation — store securely |\n| Session files | Can be added at creation or later via `POST /sessions/{id}/files` (max 10 files per request) |\n\n# Getting Started\n\n## Authentication Setup API Key\n\n### Setup Steps:\n\n1. Login to [Dreem Dashboard](https://dreem.ai)\n    \n2. Go to **Settings** → **API Keys**\n    \n3. Click **Create API Key**\n    \n4. Copy the key (starts with `dreem_pk_`)\n    \n\n## Webhooks & Callbacks\n\nDreem supports webhook notifications for async operations. Provide a `callbackUrl` in your request to receive results automatically.\n\n---\n\n## Studio Webhook\n\nTriggered when a generation request completes (success or failure).\n\n**Setup:** Include `callbackUrl` and `callbackSecret` in your `POST /virtual-model`, `/packshot`, or `/image-to-video` request.\n\n**Headers sent by Dreem:**\n\n| Header | Description |\n| --- | --- |\n| `Content-Type` | `application/json` |\n| `X-Dreem-Signature` | HMAC-SHA256 hex digest of the request body, computed using your `callbackSecret` |\n\n**Payload:** Same JSON structure as `GET /requests/{requestId}` response.\n\n**Signature verification (pseudo-code):**\n\n```\nexpected = HMAC_SHA256(callbackSecret, requestBody)\nvalid = (request.headers[\"X-Dreem-Signature\"] == expected)\n\n ```\n\n---\n\n## Platform Webhook\n\nTriggered when session outputs are saved to the external system.\n\n**Setup:** Provide `webhookPayloadUrl` and `webhookSecretKey` when creating a connector (`POST /connectors`).\n\n**Headers sent by Dreem:**\n\n| Header | Description |\n| --- | --- |\n| `Content-Type` | `application/json` |\n| `X-Dreem-Signature` | HMAC-SHA256 hex digest using `webhookSecretKey` |\n| `X-Dreem-Event` | Event type identifier |\n\n**Event types:**\n\n| Event | Description |\n| --- | --- |\n| `session.outputs_saved` | AI-generated outputs have been submitted to the external system |\n\n# Integrations\n\nThird-party integrations and workflow automation tools for Dreem API.\n\n## n8n Integrations\n\n### 1.Installation\n\n**n8n** is an open-source workflow automation tool. Install the Dreem community node to access all Dreem API features.\n\n---\n\n#### Via n8n UI (Recommended)\n\n1. Open your n8n instance\n    \n2. Go to **Settings** → **Community Nodes**\n    \n3. Click **Install a community node**\n    \n4. Enter: `n8n-nodes-dreem`\n    \n5. Click **Install**\n    \n6. Wait for installation to complete\n    \n\n---\n\n#### Via npm (Self-hosted)\n\nSSH into your n8n server and run:\n\n``` bash\nnpm install n8n-nodes-dreem\n\n ```\n\nRestart n8n:\n\n``` bash\nn8n restart\n\n ```\n\n---\n\n#### Verify Installation\n\n1. Create new workflow\n    \n2. Click **Add node** (+)\n    \n3. Search for **\"Dreem\"**\n    \n4. You should see the Dreem node with logo\n    \n\n✅ If node appears → Installation successful# Best Practices\n\n### 2.Authentication Setup\n\nDreem node supports **2 authentication methods**. Choose based on your use case.\n\n---\n\n#### Method 1: API Key (Recommended)\n\n##### Setup Steps\n\n1. **Get your API Key:**\n    \n    - Login to [Dreem Dashboard](https://dreem.ai)\n        \n    - Go to **Settings** → **API Keys**\n        \n    - Click **Create API Key**\n        \n    - Copy the key (starts with `dreem_pk_`)\n        \n2. **Add credentials in n8n:**\n    \n    - Go to the **Credentials** tab in n8n\n        \n    - Click **Create credential**\n        \n    - Search for and select **Dreem API**\n        \n    - Click **Continue**\n        \n    - Paste your API key\n        \n    - Click **Save**\n        \n\n**Format:**\n\n```\ndreem_pk_12345678_abcdefghijklmnopqrstuvwxyz123456\n\n ```\n\n---\n\n#### Method 2: OAuth 2.0\n\n##### Setup Steps\n\n1. **Add credentials in n8n:**\n    \n    - Go to the **Credentials** tab in n8n\n        \n    - Click **Create credential**\n        \n    - Search for and select **Dreem OAuth2 API**\n        \n    - Click **Continue**\n        \n    - Click **Connect to Dreem**\n        \n2. **Authorize:**\n    \n    - Browser opens Dreem login page\n        \n    - Login with your Dreem account\n        \n    - Click **Authorize**\n        \n    - You'll be redirected back to n8n\n        \n3. **Done:**\n    \n    - Token stored securely\n        \n    - Auto-refreshed when expired\n        \n\n---\n\n#### Test Connection\n\n1. Add a **Dreem** node to canvas\n    \n2. Select **Resource**: `Library`\n    \n3. Select **Operation**: `Get Available Talents`\n    \n4. Click **Execute Node**\n    \n5. Check output shows talent list\n    \n\n✅ If you see data → Authentication working\n\n### 3.Available Operations\n\nThe Dreem node organizes operations into **3 resources**.\n\n---\n\n#### Resource: Generative Content\n\n**Purpose:** Generate AI-powered imagery and video.\n\n##### Operations\n\n| Operation | API Endpoint | Input | Output |\n| --- | --- | --- | --- |\n| **Generate Model Shots** | `POST /virtual-model` | Talent ID, product images, shot codes | Request ID |\n| **Generate Product Shots** | `POST /packshot` | Product images, shot codes | Request ID |\n| **Generate Video** | `POST /image-to-video` | Images, prompt, duration | Request ID |\n\n##### Input Requirements\n\n**Generate Model Shots:**\n\n- `Talent`: Choose from dropdown (loads from API)\n    \n- `Shots`: Select multiple shots\n    \n- `Front Image URL`: Required — Public URL to front product photo\n    \n- `Back Image URL`: Optional — Public URL to back product photo\n    \n- `Styling Image URLs`: Optional — Additional styling/outfit images\n    \n- `Output Format`: PNG or JPEG\n    \n- `Output Aspect Ratio`: 1:1, 4:5, 9:16, etc.\n    \n- `Webhook URL` (optional): Webhook for results\n    \n\n**Generate Product Shots:**\n\n- Same as Model Shots, but **no talent selection** and **no styling images**\n    \n- `Front Image URL`: Required\n    \n- `Back Image URL`: Optional\n    \n- Shots limited to packshot types\n    \n\n**Generate Video:**\n\n- `First Frame URL`: Required — Public URL to starting frame image\n    \n- `Last Frame URL`: Optional — Public URL to ending frame image\n    \n- `Duration`: 5s or 10s\n    \n- `Prompt (Library)`: Select from video prompt library (optional)\n    \n- `Custom Prompt`: Text description (alternative to library prompt)\n    \n- `Output Aspect Ratio`: 1:1, 3:4, or 9:16 (portrait)\n    \n\n##### Output\n\nAll generation operations return:\n\n``` json\n{\n  \"errorCode\": 0,\n  \"requestId\": \"e5f6a7b8-c9d0-1234-efab-567890123456\",\n  \"message\": null\n}\n\n ```\n\n💡 **Save the** **`requestId`** to check status later.\n\n---\n\n#### Resource: Library\n\n**Purpose:** Browse available resources (talents, shots, prompts).\n\n##### Operations\n\n| Operation | API Endpoint | Parameters | Output |\n| --- | --- | --- | --- |\n| **Get Available Talents** | `GET /talents` | Gender filter, search keyword, pagination | Talent list |\n| **Get Available Shots** | `GET /shots` | Shot type filter, search keyword, pagination | Shot list |\n| **Get Video Prompts** | `POST /video-prompts/list` | Search keyword, pagination | Video prompt list |\n\n##### Parameters\n\n**Get Available Talents:**\n\n- `Gender`: All / Male / Female / Unisex\n    \n- `Search Keyword`: Search by name\n    \n- `Page Number`: 1-based (default: 1)\n    \n- `Page Size`: Items per page (default: 50)\n    \n\n**Get Available Shots:**\n\n- `Shot Type`: All / Virtual Model / Packshot\n    \n- `Search Keyword`: Search by code or name\n    \n- `Page Number`: 1-based\n    \n- `Page Size`: Items per page\n    \n\n**Get Video Prompts:**\n\n- `Search Keyword`: Search by prompt name\n    \n- `Page Number`: 1-based\n    \n- `Page Size`: Items per page\n    \n\n---\n\n#### Resource: Task\n\n**Purpose:** Check status of generation requests.\n\n##### Operations\n\n| Operation | API Endpoint | Input | Output |\n| --- | --- | --- | --- |\n| **Get Status** | `GET /requests/{requestId}` | Request ID | Status, outputs, download URLs |\n\n##### Parameters\n\n- `Request ID`: The UUID returned from generation operation\n    \n\n##### Output Statuses\n\n| Status | Description | Next Action |\n| --- | --- | --- |\n| `InQueue` | Request queued | Wait and poll again |\n| `Processing` | AI generating | Wait and poll again |\n| `Completed` | Success | Download outputs |\n| `Failed` | Error occurred | Check error message |\n\n⚠️ **Download URLs expire after 12 hours** — download files promptly.\n\n### 4.Example Workflows\n\nSimple workflow examples for each generation operation.\n\n---\n\n#### Workflow 1: Generate Model Shots\n\n**Use case:** Create virtual model images wearing your product.\n\n**Workflow:**\n\n```\n[Manual Trigger] → [Dreem: Get Talents] → [Dreem: Generate Model Shots] → [Wait 2-3 min] → [Dreem: Get Status]\n\n ```\n\n**Configuration:**\n\n1. { \"frontImageUrl\": \"[https://cdn.example.com/tshirt-front.jpg\"](https://cdn.example.com/tshirt-front.jpg), \"backImageUrl\": \"[https://cdn.example.com/tshirt-back.jpg\"](https://cdn.example.com/tshirt-back.jpg) }\n    \n2. **Dreem: Get Available Talents**\n    \n    - **Resource**: `Library`\n        \n    - **Operation**: `Get Available Talents`\n        \n    - **Gender**: `Female`\n        \n3. **Dreem: Generate Model Shots**\n    \n    - **Resource**: `Generative Content`\n        \n    - **Operation**: `Generate Model Shots`\n        \n    - **Talent**: `{{ $json.data.items[0].talentId }}`\n        \n    - **Shots**: _select shots from list_\n        \n    - **Front Image URL**: `{{ $node[\"Manual Trigger\"].json.frontImageUrl }}`\n        \n    - **Back Image URL**: `{{ $node[\"Manual Trigger\"].json.backImageUrl }}`\n        \n    - **Output Format**: `JPEG`\n        \n    - **Output Aspect Ratio**: `4:5 Portrait`\n        \n4. **Wait** — 2-3 min\n    \n5. **Dreem: Get Status**\n    \n    - **Resource**: `Task`\n        \n    - **Operation**: `Get Status`\n        \n    - **Request ID**: `{{ $node[\"Dreem 1\"].json.requestId }}`\n        \n\n**Output:** Check status and download URLs in final node output.\n\n---\n\n#### Workflow 2: Generate Product Shots (Webhook)\n\n**Use case:** Create clean packshot images without a model. Uses a webhook callback — no polling needed.\n\n**Workflow:**\n\n```\n[Manual Trigger] → [Dreem: Generate Product Shots] → [Wait: Resume on Webhook] → [HTTP Request: Download]\n\n ```\n\n**Configuration:**\n\n1. { \"productUrl\": \"[https://cdn.example.com/shoe-front.jpg\"](https://cdn.example.com/shoe-front.jpg) }\n    \n2. **Dreem: Generate Product Shots**\n    \n    - **Resource**: `Generative Content`\n        \n    - **Operation**: `Generate Product Shots`\n        \n    - **Shots**: _select shots from list_\n        \n    - **Front Image URL**: `{{ $json.productUrl }}`\n        \n    - **Output Format**: `PNG`\n        \n    - **Output Aspect Ratio**: `1:1 Square`\n        \n    - **Webhook URL**: `{{ $execution.resumeUrl }}`\n        \n3. **Wait** — Configure: **Resume execution → On Webhook Call**\n    \n    - n8n pauses here and automatically resumes when Dreem calls back.\n        \n4. **HTTP Request** — Download image:\n    \n    - **Method**: `GET`\n        \n    - **URL**: `{{ $json.body.data.outputs[0].files[0].url }}`\n        \n    - **Response Format**: `File`\n        \n\n**Output:** Downloaded packshot image file.\n\n> 💡 `$execution.resumeUrl` is a built-in n8n variable that generates a one-time webhook URL for the current execution. When Dreem calls it upon completion, the workflow resumes from the Wait node with the callback payload available under `$json.body`. \n  \n\n---\n\n#### Workflow 3: Generate Video\n\n**Use case:** Convert product images into animated video.\n\n**Workflow:**\n\n```\n[Manual Trigger] → [Dreem: Get Video Prompts] → [Dreem: Generate Video] → [Wait 5-6 min] → [Dreem: Get Status]\n\n ```\n\n**Configuration:**\n\n1. { \"firstFrame\": \"[https://cdn.example.com/model-pose-1.jpg\"](https://cdn.example.com/model-pose-1.jpg), \"lastFrame\": \"[https://cdn.example.com/model-pose-2.jpg\"](https://cdn.example.com/model-pose-2.jpg) }\n    \n2. **Dreem: Get Video Prompts**\n    \n    - **Resource**: `Library`\n        \n    - **Operation**: `Get Video Prompts`\n        \n    - **Search Keyword**: `runway`\n        \n3. **Dreem: Generate Video**\n    \n    - **Resource**: `Generative Content`\n        \n    - **Operation**: `Generate Video`\n        \n    - **First Frame URL**: `{{ $node[\"Manual Trigger\"].json.firstFrame }}`\n        \n    - **Last Frame URL**: `{{ $node[\"Manual Trigger\"].json.lastFrame }}`\n        \n    - **Duration**: `5s`\n        \n    - **Prompt (Library)**: `{{ $json.data.items[0].id }}`\n        \n    - **Output Aspect Ratio**: `9:16 Portrait`\n        \n4. **Wait** — 5-6 min\n    \n5. **Dreem: Get Status**\n    \n    - **Request ID**: `{{ $node[\"Dreem 1\"].json.requestId }}`\n        \n\n**Output:** Video download URL in status response.\n\n---\n\n#### Tips\n\n- **Polling:** Add loop logic to check status multiple times if not complete\n    \n- **Error handling:** Check `errorCode` field in responses\n    \n- **URL expiry:** Download URLs expire after 12 hours\n    \n- **Webhooks:** Use callback URL for instant notification instead of polling","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"18031763","team":5513979,"collectionId":"c10655b8-1a29-46c3-aa65-0c7ee8352c11","publishedId":"2s9YBxXasW","public":true,"publicUrl":"https://developer.dreem.ai","privateUrl":"https://go.postman.co/documentation/18031763-c10655b8-1a29-46c3-aa65-0c7ee8352c11","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"}}]}},"version":"8.10.1","publishDate":"2023-09-21T09:07:00.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"Production","id":"9e932da3-fc61-4e2b-a092-3c4d41247bf3","owner":"18031763","values":[{"key":"client_secret","value":"c6d2408000000000000000390f","enabled":true},{"key":"client_id","value":"5b3497fc-6b0e-4991-9b1c-93d906d4758e","enabled":true,"type":"default"},{"key":"token","value":"B3664D8B4F","enabled":true,"type":"default"},{"key":"baseurl_copywriter","value":"https://api.dreem.ai/v1/copywriter","enabled":true},{"key":"baseurl_stream","value":"https://apistream.dreem.ai/v1","enabled":true},{"key":"baseurl_tagging","value":"https://api.dreem.ai/v1/tagging","enabled":true},{"key":"baseurl_result","value":"https://api.dreem.ai/v1/result","enabled":true},{"key":"baseurl_recognition","value":"https://api.dreem.ai/v1/recognition","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/e973377d3a3eb0454a47726287dbd70e78069d67e9d99eab23456adce8e16da1","favicon":"https://postman-image-service.postman.com/api/cloudinary-proxy/postman/image/upload/v1776671008/team/790b89b5b9dc6abce0e88f9fb637cc07"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Production","value":"18031763-9e932da3-fc61-4e2b-a092-3c4d41247bf3"}],"canonicalUrl":"https://developer.dreem.ai/view/metadata/2s9YBxXasW"}