Skip to content
Developers
API docs / Features

MAKEUGC PLATFORM API · DOCS V2

Speech Text Tools

Normalize and enhance scripts before speech synthesis.

Workflow

  1. Normalize numbers and abbreviations in your script.
  2. Optionally enhance phrasing and delivery cues.
  3. Review the result and submit it to /speech/generate or a speaking-video feature.
These operations return text synchronously. No additional credit charge is applied for this operation. Review delivery tags against your selected speech model.
Send X-Api-Key on every MakeUGC request. POST operations require an active paid subscription and a positive credit balance; custom voice creation also requires a plan with custom voices.
Requests are strict JSON: unknown fields, user_id and webhook_url are rejected. Use polling for jobs; these endpoints do not send webhooks.
The outer status boolean indicates request success. Most jobs use data.status: processing, completed or failed; Upscale documents its own statuses. Poll every 5–10 seconds and require a non-empty result URL (or voice_id) before using output.
API credit units × 100 = website display credits. A timeout, network error or 5xx may occur after acceptance: do not automatically resubmit a paid operation. If submission_unknown is true, check the project or contact support with x-request-id; reserved credits remain held until the result is resolved.

Example IDs and media URLs are placeholders. Replace them with values from your account and accessible media files.

Normalize speech text #

POST /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: At least 1 characters; Up to 1500 characters

Request example

cURL
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."
}'
JavaScript
// 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);
Python
# 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

JSON response
{
  "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 #

POST /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: At least 1 characters; Up to 1500 characters

Request example

cURL
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."
}'
JavaScript
// 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);
Python
# 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

JSON response
{
  "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.