MAKEUGC PLATFORM API · DOCS V2
AI Script Writer
Create ad scripts from text descriptions or product images.
Workflow
- Choose text-only writing or product-image writing.
- Provide a description and the tone you want.
- Use the returned script with Talking Actors, Product in Hand or Text to Speech.
Example IDs and media URLs are placeholders. Replace them with values from your account and accessible media files.
Write a script #
/scripts/generate
Create a spoken ad script and optional avatar suggestions from a product description and tone.
Request body
| Parameter | Description |
|---|---|
description
string
Required
|
description input.
Allowed: |
style
string
Required
|
style input.
Allowed: |
max_character
integer
Optional
|
max character input.
Allowed: |
Request example
curl --fail-with-body --max-time 120 -X POST "https://app.makeugc.ai/api/platform/scripts/generate" \
-H "X-Api-Key: $MAKEUGC_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"description": "A lightweight ceramic travel cup that keeps coffee warm.",
"style": "Friendly, conversational",
"max_character": 800
}'
// 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/scripts/generate", {
method: "POST",
headers: {
"X-Api-Key": apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify({
"description": "A lightweight ceramic travel cup that keeps coffee warm.",
"style": "Friendly, conversational",
"max_character": 800
}),
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 = {
"description": "A lightweight ceramic travel cup that keeps coffee warm.",
"style": "Friendly, conversational",
"max_character": 800
}
response = requests.post(
"https://app.makeugc.ai/api/platform/scripts/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": {
"script": "Meet your new everyday coffee companion.",
"avatar_ids": [
"avatar_123"
]
}
}
All requests require X-Api-Key. See
errors & retries for unsuccessful
responses.
Write a script from product images #
/scripts/product
Use one or two product images with your description to write a product ad script.
Request body
| Parameter | Description |
|---|---|
description
string
Required
|
description input.
Allowed: |
style
string
Required
|
style input.
Allowed: |
image_url
string
Required
|
Public HTTP(S) media URL. Private addresses, credentials and data URIs are not accepted. |
second_image_url
string
Optional
|
Public HTTP(S) media URL. Private addresses, credentials and data URIs are not accepted. |
Request example
curl --fail-with-body --max-time 120 -X POST "https://app.makeugc.ai/api/platform/scripts/product" \
-H "X-Api-Key: $MAKEUGC_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"description": "A ceramic travel cup",
"style": "Enthusiastic product demo",
"image_url": "https://your-cdn.example/product.jpg"
}'
// 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/scripts/product", {
method: "POST",
headers: {
"X-Api-Key": apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify({
"description": "A ceramic travel cup",
"style": "Enthusiastic product demo",
"image_url": "https://your-cdn.example/product.jpg"
}),
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 = {
"description": "A ceramic travel cup",
"style": "Enthusiastic product demo",
"image_url": "https://your-cdn.example/product.jpg"
}
response = requests.post(
"https://app.makeugc.ai/api/platform/scripts/product",
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": {
"script": "This is the cup I take everywhere.",
"avatar_ids": []
}
}
All requests require X-Api-Key. See
errors & retries for unsuccessful
responses.