REST API
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 undererrorwith acodeand amessage. - Endpoints that spend credits answer
200with a quote and"confirm_required": true. Send the same request with"confirm": trueto start; the answer is then202. - A request the studio cannot carry out — not enough credits, the daily agent limit, a missing script — is
422with codeSTUDIO_REFUSEDand the reason. - Work runs in the background. Answers include
next, which says what to call to follow it.
Endpoints
| Method and path | Scope | What it does |
|---|---|---|
GET /api/v1/studio | ad.view | Credits, the agent limit and what is left of it, what is set up, and counts. |
GET /api/v1/studio/options | ad.view | Formats, ready actors and voices, platforms, lengths, languages, tiers, sizes and layouts. |
GET /api/v1/studio/brand | workspace.view | The brand kit. |
GET /api/v1/studio/products | product.view | Products, newest first. |
POST /api/v1/studio/products | product.manage | Import a product from url. |
GET /api/v1/studio/products/{id} | product.view | One product, with its allowed claims and review angles. |
POST /api/v1/studio/ads | ad.manage | Start an ad and write its scripts. |
GET /api/v1/studio/ads/{id} | ad.view | Status, scripts, cast and produced versions with file links. |
PATCH /api/v1/studio/ads/{id} | ad.manage | Choose the script, actor, voice or tier. |
POST /api/v1/studio/ads/{id}/produce | ad.manage | Quote, then produce the chosen script. |
POST /api/v1/studio/image-ads | ad.manage | Quote, then make a batch, carousel or photoshoot. |
GET /api/v1/studio/image-ads/{id} | ad.view | A picture set with each picture's words and files. |
POST /api/v1/studio/references | research.manage | Quote, then study an ad from url. |
GET /api/v1/studio/references/{id} | research.view | A 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
| Endpoint | Fields |
|---|---|
| Create an ad | product_id (required), format, platform (meta, tiktok, youtube_shorts, generic), length (15, 30, 45, 60), language, tier (budget, standard, premium), angle, audience, scripts (1–6). |
| Produce | ratios besides 9:16 (1:1, 4:5, 16:9), captions (bold, boxed, clean, none), broll, confirm. |
| Picture ads | product_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.