AI UGC Review
Workflows and teams

AI Video Ad API Quickstart: Your First Generation With curl

A quickstart for Mantinea's AI video ad API: create a scoped key, price the job with estimate_only, start it with an idempotency key, then wait or webhook.

Your first call to an AI video ad API should cost nothing. With Mantinea's API you can price the job with estimate_only, check the number, and only then start the real generation. This quickstart walks the five calls in order: key, spec, estimate, start, wait.

API facts come from Mantinea's public docs; prices from its live price list of 24 November 2026.

A note on paths. This post deliberately doesn't hard-code operation paths, header names or body fields, because we would rather you copy them from the spec than from a blog. Where you see <...>, take the exact value from the OpenAPI 3.1 document and the API and MCP help page.

What you need

  • A Mantinea account. The 14-day trial gives 1,000 credits with no card, and the API is on every plan.
  • curl and jq.
  • About ten minutes.

Step 1: create a scoped key

Keys are scoped read, generate or admin. For this quickstart, create a generate key. Don't use an admin key in scripts: if it leaks, it can do far more than make videos.

export MANTINEA_KEY="paste-your-key-here"
export MANTINEA_API="https://app.mantinea.com/api/v1"

Store the key in your secret manager, not in the repo.

Step 2: read the spec

The API is described by an OpenAPI 3.1 document, and the docs list dozens of operations. Load it into whatever you use (Postman, Insomnia, an SDK generator) and find three things:

  1. How the key is sent (the auth scheme in the spec's security section).
  2. The operation that starts a generation job and its required fields.
  3. The operation that gets or waits on a job.

Write them down. The rest of this post refers to them as <START_JOB_PATH>, <GET_JOB_PATH> and <AUTH_HEADER>.

Step 3: price it first

Every paid call accepts estimate_only. Set it and the API returns the credit price without running anything.

curl -sS -X POST "$MANTINEA_API/<START_JOB_PATH>" \
  -H "<AUTH_HEADER>: $MANTINEA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "estimate_only": true,
        "<job fields from the spec>": "..."
      }' | jq

What to expect in credits, so you can sanity-check the response:

JobRate30 s result
Standard talking actor15 credits/s450 credits, about $4.50
Pro actor15 credits/s450 credits
Lip-sync route40 credits/s1,200 credits, $12
Narrated (no face)3 credits/s90 credits, $0.90
Script3 credits
Hooks2 credits

If you choose the "Auto" talking-actor route, it reserves at 40 credits per second and you pay for the route that actually ran. A 1,000-credit trial covers about two standard 30-second talking ads, so start with a script or a 10-second test.

Step 4: start the job, with an idempotency key

Now drop estimate_only and add an idempotency key, a unique value per logical job. If your network drops and you retry with the same key, the API won't start a second job. The field or header name is in the spec.

JOB_KEY="first-ad-$(date +%s)"

curl -sS -X POST "$MANTINEA_API/<START_JOB_PATH>" \
  -H "<AUTH_HEADER>: $MANTINEA_KEY" \
  -H "<IDEMPOTENCY_HEADER_OR_FIELD>: $JOB_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "<job fields from the spec>": "..." }' | tee job.json | jq

Save the job id from the response. When the job starts it reserves its quote. You pay for what actually ran, never more than the reserve. If the job fails or is canceled, the credits come back automatically. More on retries in idempotency keys in the Mantinea API.

Step 5: wait for it

Two options.

Long-poll. The API supports waits of up to 50 seconds per request. Renders usually take a few minutes, so loop:

JOB_ID=$(jq -r '<path to the id in job.json>' job.json)

until curl -sS "$MANTINEA_API/<GET_JOB_PATH with $JOB_ID>" \
      -H "<AUTH_HEADER>: $MANTINEA_KEY" | tee status.json \
      | jq -e '<expression that is true when done>' >/dev/null; do
  echo "still rendering..."
done
jq '<path to the result asset>' status.json

Webhooks. For anything beyond a test, register a webhook. Events are signed and cover a job or workflow run succeeding, failing or being canceled. Failed deliveries are retried at 1 min, 5 min, 30 min, 2 h, 6 h and 12 h. Verify the signature in the X-Autonomous-Signature header before trusting the payload ("Autonomous" is an older product name that still appears in developer surfaces).

Limits to design around

  • 600 requests or 60 paid starts per minute per key.
  • Batches of up to 50 jobs per call.
  • Long-poll waits of up to 50 seconds.

If you're queueing a catalog, batch your starts and respect the paid-start limit instead of spraying single calls.

Common first-call mistakes

  • Using an admin key. Use generate.
  • Skipping the estimate. One estimate_only call per new job type catches wrong durations before they cost anything.
  • New idempotency key per retry. The key identifies the job, not the attempt.
  • Polling without a wait. Use the long-poll wait so you aren't burning your 600 requests a minute.

Next steps

  • Read estimate_only explained for pricing batches.
  • Prefer an assistant to curl? Point Claude or Cursor at the hosted MCP server at https://app.mantinea.com/mcp.
  • Run the automatic video quality check on the finished asset through the API before it ships, and send it for client review: reviews and approvals are on the public API as well as in the app.
  • Finished ads can be captioned (2 credits) or given a Brand finish (captions, logo and end card, 2 credits per started minute) in a follow-up call.
  • The AI video ad API page has the overview.

A cheap first test

If you'd rather not spend 450 credits on your first real call, start smaller. A script is 3 credits and hooks are 2, so a script call is a near-free way to confirm your key, auth header and idempotency handling end to end. Then try a short narrated clip at 3 credits per second before your first talking-actor render.

The AI UGC Review editors

We review AI UGC ad tools from their own pricing pages, docs and help centers, and we say who each one suits and who should skip it. We work from vendors' own pricing pages, docs and help centers, and date every price we quote. About us.