MAKEUGC PLATFORM API · DOCS V2
Speech Text Tools
Normalize and enhance scripts before speech synthesis.
Workflow
- Normalize numbers and abbreviations in your script.
- Optionally enhance phrasing and delivery cues.
- Review the result and submit it to /speech/generate or a speaking-video feature.
Example IDs and media URLs are placeholders. Replace them with values from your account and accessible media files.
Normalize speech text #
/speech/normalize
Prepare numbers, abbreviations and text for speech synthesis. Returns the resulting script immediately.
Request body
| Parameter | Description |
|---|---|
script
string
Required
|
script input.
Allowed: |
Request example
curl --fail-with-body --max-time 120 -X POST "https://app.makeugc.ai/api/platform/speech/normalize" \
-H "X-Api-Key: $MAKEUGC_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"script": "Save 20% on orders over $50."
}'
// 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/speech/normalize", {
method: "POST",
headers: {
"X-Api-Key": apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify({
"script": "Save 20% on orders over $50."
}),
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 = {
"script": "Save 20% on orders over $50."
}
response = requests.post(
"https://app.makeugc.ai/api/platform/speech/normalize",
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": "Save twenty percent on orders over fifty dollars.",
"changed": true
}
}
All requests require X-Api-Key. See
errors & retries for unsuccessful
responses.
Enhance speech text #
/speech/enhance
Improve delivery cues and phrasing for speech generation. Review the returned script before synthesizing audio.
Request body
| Parameter | Description |
|---|---|
script
string
Required
|
script input.
Allowed: |
Request example
curl --fail-with-body --max-time 120 -X POST "https://app.makeugc.ai/api/platform/speech/enhance" \
-H "X-Api-Key: $MAKEUGC_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"script": "This cup makes every morning better."
}'
// 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/speech/enhance", {
method: "POST",
headers: {
"X-Api-Key": apiKey,
"Content-Type": "application/json",
},
body: JSON.stringify({
"script": "This cup makes every morning better."
}),
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 = {
"script": "This cup makes every morning better."
}
response = requests.post(
"https://app.makeugc.ai/api/platform/speech/enhance",
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": "[warmly] This cup makes every morning better.",
"changed": true
}
}
All requests require X-Api-Key. See
errors & retries for unsuccessful
responses.