Skip to content
Developers
API docs / Features

MAKEUGC PLATFORM API · DOCS V2

Content Library

Generate videos from reusable templates with fields discovered from the live template catalog.

Workflow

  1. List categories and templates.
  2. Read the selected template’s require_fields and credit value.
  3. Send template_id with every required template field at the top level.
  4. Save data.db_id and poll /content-library/status.
Template fields are dynamic. Replace the example’s product_image, product_name and script with the selected template’s actual required fields and limits.
Images are public HTTP(S) URLs, not file uploads. Credit values returned by the API use API credit units.

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

List templates #

GET /content-library/templates

Discover template IDs, credit costs and require_fields. credit is a numeric string or null. Template field types include input, textarea, image and select; honor max, options and required: false when present. Returned values vary by template; this example is illustrative.

Parameters

Parameter Description
category
string · query
Optional
Category value from the categories endpoint.

Default: all

Request example

cURL
curl --fail-with-body --max-time 120 -X GET "https://app.makeugc.ai/api/platform/content-library/templates" \
  -H "X-Api-Key: $MAKEUGC_API_KEY"
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/content-library/templates", {
  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);
Python
# Install the requests package before running.
import os
import requests

response = requests.get(
    "https://app.makeugc.ai/api/platform/content-library/templates",
    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

JSON response
{
  "status": true,
  "message": "Templates retrieved successfully",
  "data": [
    {
      "id": "template_123",
      "title": "Product introduction",
      "description": "Introduce a product with a short script.",
      "preview_url": "https://your-cdn.example/template-preview.mp4",
      "credit": "1",
      "category": [
        "product"
      ],
      "require_fields": {
        "product_image": {
          "type": "image",
          "label": "Product image"
        },
        "product_name": {
          "type": "input",
          "label": "Product name"
        },
        "script": {
          "type": "textarea",
          "label": "Script",
          "max": 400
        }
      }
    }
  ]
}

All requests require X-Api-Key. See errors & retries for unsuccessful responses.

List categories #

GET /content-library/categories

Use a returned value to filter templates.

Parameters

No request parameters.

Request example

cURL
curl --fail-with-body --max-time 120 -X GET "https://app.makeugc.ai/api/platform/content-library/categories" \
  -H "X-Api-Key: $MAKEUGC_API_KEY"
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/content-library/categories", {
  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);
Python
# Install the requests package before running.
import os
import requests

response = requests.get(
    "https://app.makeugc.ai/api/platform/content-library/categories",
    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

JSON response
{
  "status": true,
  "message": "Categories retrieved successfully",
  "data": [
    {
      "label": "All",
      "value": "all"
    }
  ]
}

All requests require X-Api-Key. See errors & retries for unsuccessful responses.

Generate from a template #

POST /content-library/generate

Start a template job. Omit project_id to create a project automatically.

Request body

Parameter Description
template_id
string
Required
ID from the templates list.
project_id
string
Optional
Existing project ID. Omit to create a project automatically.
webhook_url
string
Optional
Public HTTP(S) callback URL. Use status polling as a fallback.
add_watermark
boolean
Optional
Whether to add a watermark.
<template fields>
dynamic
Required
All fields specified in require_fields, at the top level; types and limits depend on the template.

Request example

cURL
curl --fail-with-body --max-time 120 -X POST "https://app.makeugc.ai/api/platform/content-library/generate" \
  -H "X-Api-Key: $MAKEUGC_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "template_id": "TEMPLATE_ID",
  "product_image": "https://your-cdn.example/product.jpg",
  "product_name": "Everyday cup",
  "script": "Your new morning favorite."
}'
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/content-library/generate", {
  method: "POST",
  headers: {
    "X-Api-Key": apiKey,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "template_id": "TEMPLATE_ID",
  "product_image": "https://your-cdn.example/product.jpg",
  "product_name": "Everyday cup",
  "script": "Your new morning favorite."
}),
  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 = {
    "template_id": "TEMPLATE_ID",
    "product_image": "https://your-cdn.example/product.jpg",
    "product_name": "Everyday cup",
    "script": "Your new morning favorite."
}

response = requests.post(
    "https://app.makeugc.ai/api/platform/content-library/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

JSON response
{
  "status": true,
  "message": "Video generation started",
  "data": {
    "db_id": "video_123"
  }
}

All requests require X-Api-Key. See errors & retries for unsuccessful responses.

Get video status #

GET /content-library/status

Poll every 5–10 seconds. Stop on failed, or completed with a non-empty URL. The outer status boolean describes the API request; data.status describes the job.

While processing, data.status is processing and url is absent. On failure, data.status is failed; a reason may be included. Save output files if you need permanent access.

Parameters

Parameter Description
id
string · query
Required
Job ID returned by the matching generation endpoint.

Request example

cURL
curl --fail-with-body --max-time 120 -X GET "https://app.makeugc.ai/api/platform/content-library/status?id=ID" \
  -H "X-Api-Key: $MAKEUGC_API_KEY"
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/content-library/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);
Python
# Install the requests package before running.
import os
import requests

response = requests.get(
    "https://app.makeugc.ai/api/platform/content-library/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

JSON response
{
  "status": true,
  "message": "Video is completed",
  "data": {
    "db_id": "video_123",
    "status": "completed",
    "url": "https://your-cdn.example/result.mp4"
  }
}

All requests require X-Api-Key. See errors & retries for unsuccessful responses.