DocsDéveloppeurs

API REST

The studio's REST endpoints live under /api/v1/studio and do the same work as the MCP tools.

Conventions

  • Every response is JSON with the result under data; errors are under error with a code and a message.
  • Endpoints that spend credits answer 200 with a quote and "confirm_required": true. Send the same request with "confirm": true to start; the answer is then 202.
  • A request the studio cannot carry out — not enough credits, the daily agent limit, a missing script — is 422 with code STUDIO_REFUSED and the reason.
  • Work runs in the background. Answers include next, which says what to call to follow it.

Endpoints

Method and pathScopeWhat it does
GET /api/v1/studioad.viewCredits, the agent limit and what is left of it, what is set up, and counts.
GET /api/v1/studio/optionsad.viewFormats, ready actors and voices, platforms, lengths, languages, tiers, sizes and layouts.
GET /api/v1/studio/brandworkspace.viewThe brand kit.
GET /api/v1/studio/productsproduct.viewProducts, newest first.
POST /api/v1/studio/productsproduct.manageImport a product from url.
GET /api/v1/studio/products/{id}product.viewOne product, with its allowed claims and review angles.
POST /api/v1/studio/adsad.manageStart an ad and write its scripts.
GET /api/v1/studio/ads/{id}ad.viewStatus, scripts, cast and produced versions with file links.
PATCH /api/v1/studio/ads/{id}ad.manageChoose the script, actor, voice or tier.
POST /api/v1/studio/ads/{id}/producead.manageQuote, then produce the chosen script.
POST /api/v1/studio/image-adsad.manageQuote, then make a batch, carousel or photoshoot.
GET /api/v1/studio/image-ads/{id}ad.viewA picture set with each picture's words and files.
POST /api/v1/studio/referencesresearch.manageQuote, then study an ad from url.
GET /api/v1/studio/references/{id}research.viewA studied ad and its pattern.

Example: from product to video

Start an ad for product 12, with three scripts:

curl -X POST https://your-installation.example/api/v1/studio/ads \
  -H "Authorization: Bearer ag_live_…" \
  -H "Content-Type: application/json" \
  -d '{"product_id": 12, "format": "problem-solution", "length": 30, "language": "en", "scripts": 3}'
{"data": {"started": true, "id": 41, "status": "writing", "next": "Call get_ad until scripts are written, then choose one with update_ad."}}

Read the ad until its scripts are written, then choose a script and the cast:

curl -X PATCH https://your-installation.example/api/v1/studio/ads/41 \
  -H "Authorization: Bearer ag_live_…" \
  -H "Content-Type: application/json" \
  -d '{"script_id": 97, "actor_id": 5, "voice_id": 3}'

Ask for the quote:

curl -X POST https://your-installation.example/api/v1/studio/ads/41/produce \
  -H "Authorization: Bearer ag_live_…" \
  -H "Content-Type: application/json" \
  -d '{"ratios": ["4:5", "1:1"], "captions": "bold"}'
{"data": {"quote": {"credits": 1080, "items": [...], "missing": []}, "credits": 7900, "agent_credits_left_today": 2000, "confirm_required": true, "next": "Call again with confirm: true to spend these credits."}}

Send the same body with "confirm": true to start. The answer gives the version_id; read the ad until that version is done and its files are listed.

Fields

EndpointFields
Create an adproduct_id (required), format, platform (meta, tiktok, youtube_shorts, generic), length (15, 30, 45, 60), language, tier (budget, standard, premium), angle, audience, scripts (1–6).
Produceratios besides 9:16 (1:1, 4:5, 16:9), captions (bold, boxed, clean, none), broll, confirm.
Picture adsproduct_id (required), kind (batch, carousel, photoshoot), count (up to 20; 8 for a carousel), ratios (1:1, 4:5, 9:16), layouts, language, note, confirm.

Limits

Requests are rate-limited per key, and plans include a monthly number of API requests. Send an Idempotency-Key header to make a retried POST safe.

Still stuck? Open a ticket and a person on the team answers by email.