MAKEUGC PLATFORM API · DOCS V2
Image Ads
Turn product references, brand details and promotional copy into ad images.
Workflow
- Prepare one to four product references.
- Add brand, promotion and composition details.
- Submit and poll for image_urls.
Example IDs and media URLs are placeholders. Replace them with values from your account and accessible media files.
Generate image ads #
/image-ads/generate
Create branded ads from one to four product references, optional promotion details and a visual prompt.
Request body
| Parameter | Description |
|---|---|
project_id
string
Optional
|
Existing project owned by your account. Omit to create one.
Allowed: |
image_urls
string[]
Required
|
image urls input.
Allowed: |
prompt
string
Optional
|
prompt input.
Allowed: |
brand_name
string
Optional
|
brand name input.
Allowed: |
brand_description
string
Optional
|
brand description input.
Allowed: |
promotion
object
Optional
|
promotion input. |
promotion.original_price
string
Optional
|
original price input.
Allowed: |
promotion.promo_price
string
Optional
|
promo price input.
Allowed: |
promotion.details
string
Optional
|
details input.
Allowed: |
num_images
integer
Optional
|
num images input.
Allowed:
Default: |
aspect_ratio
string
Optional
|
aspect ratio input.
Allowed:
Default: |
output_format
string
Optional
|
output format input.
Allowed:
Default: |
resolution
string
Optional
|
resolution input.
Allowed:
Default: |
Request example
curl --fail-with-body --max-time 120 -X POST "https://app.makeugc.ai/api/platform/image-ads/generate" \
-H "X-Api-Key: $MAKEUGC_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"project_id": "project_123",
"image_urls": [
"https://your-cdn.example/product.jpg"
],
"brand_name": "Morning Cup",
"brand_description": "Reusable ceramic travel cups",
"prompt": "Minimal product ad with a warm cream background.",
"promotion": {
"original_price": "$40",
"promo_price": "$32",
"details": "Launch offer"
},
"num_images": 1,
"aspect_ratio": "1:1",
"resolution": "1K",
"output_format": "png"
}'
// Run on your server with Node.js 20+.
const apiKey = process.env.MAKEUGC_API_KEY;
if (!apiKey) throw new Error("Set MAKEUGC_API_KEY first");
const response = await fetch("https://app.makeugc.ai/api/platform/image-ads/generate", {
method: "POST",
headers: {
"X-Api-Key": apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify({
"project_id": "project_123",
"image_urls": [
"https://your-cdn.example/product.jpg"
],
"brand_name": "Morning Cup",
"brand_description": "Reusable ceramic travel cups",
"prompt": "Minimal product ad with a warm cream background.",
"promotion": {
"original_price": "$40",
"promo_price": "$32",
"details": "Launch offer"
},
"num_images": 1,
"aspect_ratio": "1:1",
"resolution": "1K",
"output_format": "png"
}),
signal: AbortSignal.timeout(120000),
});
const text = await response.text();
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${text} (request ${response.headers.get("x-request-id")})`);
}
const result = JSON.parse(text);
console.log(result);
# Install the requests package before running.
import os
import requests
payload = {
"project_id": "project_123",
"image_urls": ["https://your-cdn.example/product.jpg"],
"brand_name": "Morning Cup",
"brand_description": "Reusable ceramic travel cups",
"prompt": "Minimal product ad with a warm cream background.",
"promotion": {
"original_price": "$40",
"promo_price": "$32",
"details": "Launch offer"
},
"num_images": 1,
"aspect_ratio": "1:1",
"resolution": "1K",
"output_format": "png"
}
response = requests.post(
"https://app.makeugc.ai/api/platform/image-ads/generate",
headers={"X-Api-Key": os.environ["MAKEUGC_API_KEY"]},
json=payload,
timeout=120,
)
if not response.ok:
raise RuntimeError(f"HTTP {response.status_code}: {response.text} "
f"(request {response.headers.get('x-request-id')})")
print(response.json())
200 response example
{
"status": true,
"data": {
"id": "job_123",
"project_id": "project_123",
"status": "processing"
}
}
All requests require X-Api-Key. See
errors & retries for unsuccessful
responses.
Get image ad status #
/image-ads/status
Poll data.id. Completed output is an array in data.image_urls.
Parameters
| Parameter | Description |
|---|---|
id
string · query
Required
|
id input.
Allowed: |
Request example
curl --fail-with-body --max-time 120 -X GET "https://app.makeugc.ai/api/platform/image-ads/status?id=ID" \
-H "X-Api-Key: $MAKEUGC_API_KEY"
// Run on your server with Node.js 20+.
const apiKey = process.env.MAKEUGC_API_KEY;
if (!apiKey) throw new Error("Set MAKEUGC_API_KEY first");
const response = await fetch("https://app.makeugc.ai/api/platform/image-ads/status?id=ID", {
method: "GET",
headers: {
"X-Api-Key": apiKey,
},
signal: AbortSignal.timeout(120000),
});
const text = await response.text();
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${text} (request ${response.headers.get("x-request-id")})`);
}
const result = JSON.parse(text);
console.log(result);
# Install the requests package before running.
import os
import requests
response = requests.get(
"https://app.makeugc.ai/api/platform/image-ads/status?id=ID",
headers={"X-Api-Key": os.environ["MAKEUGC_API_KEY"]},
timeout=120,
)
if not response.ok:
raise RuntimeError(f"HTTP {response.status_code}: {response.text} "
f"(request {response.headers.get('x-request-id')})")
print(response.json())
200 response example
{
"status": true,
"data": {
"id": "job_123",
"project_id": "project_123",
"status": "completed",
"image_urls": [
"https://your-cdn.example/ad.png"
]
}
}
All requests require X-Api-Key. See
errors & retries for unsuccessful
responses.