# Scenelabs > Scenelabs makes finished video ads for a brand from its product page. It writes the script, films it with an AI actor, a voice and a room, and cuts and captions it, then sends the ads to the brand's own Meta ad account. No slop: every ad comes out edited, captioned on the real word timings, and checked word by word against its script. People use it in the browser; an agent uses it through the API written out below. ## What Scenelabs is - Who it is for: a brand that runs video ads on Meta (Facebook and Instagram), and an AI agent that makes and runs them for one. - Why it is picked: A creator charges about $180 for one ad. Here one costs about $2 on the Growth plan, and nobody films or edits anything. - What goes in: a link to the product's page. Nobody films anything and nobody edits; a finished video comes out, cut and captioned. - What comes out: an ad set, which is one script and one actor made with 6 different openings, so 6 finished ads to test. An ad is 15 or 30 seconds. - Styles: 30 templates. With an actor: Talking, Cinematic, Mic on a thing, Multi-cam, Podcast, Podcast for two, HD UGC, Tier list, Long text, Text overlay, Green screen, Stages of grief, Show the app, List, Problem and solution, Myth bust and Storytelling. Animated, with no actor: Text messages, Front page, Static ad, Paper story, Chart question, Iceberg, Two side by side, Bar chart race, Map explainer, Whiteboard, Whiteboard story, Two paths and Out of ten. Plus 152 creative openers. Through the API there are also short effect films drawn by code, like a search bar or a flight path. - Meta: finished ads go into a new campaign or an existing ad set in the brand's own ad account. They arrive paused, to be reviewed in Ads Manager before they are switched on. - Plans, for making ads in the app: Starter $79 a month (70 ads a month), Growth $249 a month (232 ads a month), Scale $699 a month (660 ads a month). Ads are counted as an even mix: half 15-second actor ads with standard hooks, half animated ads (Text messages, Front page or Static ad). Every plan has the same tools; the bigger plans carry more credits. Billed yearly, a plan costs 30% less. - The API needs no plan. It is paid in dollars from a balance on the account, by what gets made; the prices are under "How to call it" below. - Pages: [Scenelabs](https://www.scenelabs.io/) (the product, example videos and pricing), [API docs](https://www.scenelabs.io/docs) (the API, for people). ## The API Scenelabs makes fully finished videos for a brand, in many styles, so an agent can sell it. This API lets a program or an agent do it end to end on a Scenelabs account: make a product from its page, make an ad set, send the finished ads to the account's own Meta ad account, turn them on or off, and read how they did. It also edits a finished ad (an effect, a picture or the green screen look put in at the right words, each with its sound) and makes the effects as films of their own. - [Spec file](https://www.scenelabs.io/api/v1/openapi.json): OpenAPI 3.1, no $ref - [Site origin](https://www.scenelabs.io): every path below starts with /api/v1 - [MCP server](https://www.scenelabs.io/mcp): every call below as a tool, for an app that speaks MCP. Send the same key as `Authorization: Bearer`, or sign in from an app that connects by address (Claude) - Keys: made in the Scenelabs app under Settings, Connect your AI, by any signed-in account (no plan needed). A key is shown once, and has a daily spending limit its owner picks. - [The same, as a page for people](https://www.scenelabs.io/docs) ## How to call it - Send the key on every call: `Authorization: Bearer sl_live_…`. No other header is needed. - Answers are JSON. An error is always `{"error": "one sentence", "code": "…"}`. Show the sentence to the person; it says what to do. Nothing is guessed from a request that is wrong: a call that would cost money refuses a missing or unknown field instead of filling it in. - Each key has its own call limit: 120 calls a minute. Past it: 429 with a `Retry-After` header in seconds. Wait that long, then go on. An account can start 12 ad sets an hour, 30 effect films an hour and 20 edits an hour, and have 3 ad sets in the making at once. - Call `GET /api/v1/me` first: it tells you the balance in dollars and what this key may still spend today. - `POST /api/v1/ads` takes an `Idempotency-Key` header (any text of your own, up to 120 characters). Send the same key again, after a timeout say, and you get the set it already started; nothing new is made or charged. `POST /api/v1/meta/send` is safe to repeat by its `key` field. - Making is not instant, and there is no call-back: you ask. An ad set usually takes 5 to 10 minutes (ask about once a minute). An effect film, an edit or a cut-out takes a minute or two: ask about every ten seconds and read the answer within ten minutes of starting it, because a finished film is filed when you ask for it. - The API is paid in dollars, from a balance of its own on the account. Calls are not charged; what gets MADE is. Talking, Mic on a thing, Podcast (`yapping`, `mic-thing`, `podcast`), 6 ads: $4.81 at 15 seconds, $6.61 at 30 seconds (the same at 1080p). List, Problem and solution, Myth bust, Storytelling (`listicle`, `problem-solution`, `myth-bust`, `storytelling`), 6 ads: $4.81 at 15 seconds, $6.61 at 30 seconds (the same at 1080p). Creative hooks (`creative`), 6 ads: $10.42 at 15 seconds, $12.22 at 30 seconds ($22.09 and $23.89 at 1080p). Green screen (`green-screen`), 6 ads: $7.40 at 15 seconds, $11.36 at 30 seconds (the same at 1080p). Multi-cam (`multicam`), 6 ads: $5.45 at 15 seconds, $7.90 at 30 seconds (the same at 1080p). Stages of grief (`grief`), 6 ads: $5.89 at 15 seconds, $7.69 at 30 seconds (the same at 1080p). Long text (`long-text`), 6 ads, no voice: the words are a block of text on screen, with music: $4.90 at 15 seconds, $7.00 at 30 seconds (the same at 1080p). Text overlay (`text-overlay`), 6 ads, no voice: a fast phone montage and quiet shots under a block of text, with music; 15 seconds only: $5.56 at 15 seconds, $5.56 at 30 seconds ($8.55 and $8.55 at 1080p). Cinematic (`cinematic`), 6 ads, a voice-over film cut on the words, with big type and music: $16.38 at 15 seconds, $24.05 at 30 seconds ($38.41 and $56.45 at 1080p). Text messages, Front page (`chat-ad`, `news-ad`), one ad, no actor, 10 to 20 seconds, any length or size asked: $0.07. Static ad (`static-ad`), one ad, a picture ad that moves a little, no actor, 8 seconds, any length or size asked: $0.07. Paper story (`paper-story`), one ad, a narrated cut-paper cartoon, no actor, about 20 seconds, any length or size asked: $0.11. Chart question, Iceberg, Bar chart race, Map explainer, Whiteboard, Two paths, Out of ten (`explain-chart-question`, `explain-iceberg`, `explain-race`, `explain-map`, `explain-whiteboard`, `explain-two-paths`, `explain-stick-crowd`), one ad, explainers drawn by code, facts checked on their pages, no actor, 10 to 20 seconds: $1.26. Two side by side (`explain-cartoon-pair`), one ad, an explainer with one cartoon picture, no actor, 8 to 15 seconds: $1.35. Whiteboard story (`explain-whiteboard-story`), one ad, an explainer with three or four marker drawings, no actor, 16 to 21 seconds; pictures it did not need are given back: $1.62. Podcast for two (`podcast-duo`), one ad, two actors at studio mics; the price is for its longest film, a shorter one costs less: $8.03. HD UGC (`hd-ugc`), one ad, one actor talking to the camera; the price is for its longest film, a shorter one costs less: $4.55. Tier list (`tier-list`), one ad, one actor ranking you against the rest on a tier board, about 30 to 40 seconds; the price is for its longest film, a shorter one costs less: $9.65. A set is six finished ads, so a 30-second talking ad is about $1.10. A set can be asked for with fewer openings (`openings`, 1 to 6), and so fewer ads: the main video is made once either way, so each opening left out takes only its own share off the price (`perOpening` in `GET /api/v1/ads/options`). Each figure is the estimate the balance is checked against before a set starts; what is charged is what was actually rendered, which is usually a little less. Making a product from its page: $0.07. A product's pitches, drafted once with its first ad set: $0.07. A paper cut-out's subject, cut out of its photo: $0.04. A person cut-out is priced by the second of video (about $0.81 for a 30-second ad). Free: reading anything; the script library; an effect film; an edit; bringing a picture in; checking and picking the Meta link; sending to Meta, turning ads on and off, results. `GET /api/v1/ads/options` gives each template's price today, and `GET /api/v1/me` the balance. A call the balance cannot cover answers 402 with code `funds`, what it costs, and the address to add dollars. No plan is needed: a person signed in to the app adds dollars in Settings, Connect your AI (https://scenelabs.io/home/avatars?settings=api), $20, $50, $100, $250 at a time. Every key of the account spends that balance, and it does not expire. A key cannot add dollars. Plan credits are a different thing: they pay for work in the app, and a key never spends them. Each key also has a daily limit its owner picked when making it ($25, $50, $100, $250, $1,000; $50 unless chosen): the most the key can spend in a day, and the highest daily budget it can set on a Meta campaign. Past it: 429 with code `key_limit` until midnight UTC. - A voice says the product's name in every ad, and nothing on a page says how a made-up name is spoken: a brand written Qelvo may be said "kelvo". We cannot know; the people behind the brand do. Until someone says, the ads say the name the way it is written: right for most names, and nothing waits on it. CHECK IT ONCE IF THE NAME IS A MADE-UP WORD OR AN ODD SPELLING: a name said wrong makes every ad in the set unusable, and the set is still paid for. A product made through the API comes back with `nameConfirmed: false` and `nameAudio`, our voice saying the name the way the ads will: play it to the person, or ask them how the name is said. Then `PATCH /api/v1/products/{id}` with `sayAs` (the name spelled the way it sounds) or with `nameConfirmed: true` (it is said the way it is written). A product set up in the app has already been played to a person there. - The people in the ads hold, wear or show a product only when it has a picture. Bring one in with `POST /api/v1/uploads` and put it on the product with `photos`. Without one they talk about it and it is never in frame. The templates marked `showsProduct` in `GET /api/v1/ads/options` are the ones that put it in hand; `podcast-duo` and `hd-ugc` put its pictures on screen above the speaker instead, and nobody holds it. ## Status codes - 400: The request is wrong. The sentence says what to fix. - 401: No key, a wrong key, or a revoked key. - 202: On a send to Meta: the video is still being processed. Send the same request again in a few seconds. - 402: The API balance does not cover what was asked, or the account has never added dollars (code: funds). The sentence says what it costs, what the balance is, and the address where a person adds dollars (also in `addFundsAt`). No plan is needed. - 403: The key was made read-only (only keys from before 25 November 2026 can be) and the call changes something (code: read_only). - 404: No such route, product, ad set, film, edit, cut-out or Meta id; or, on apply, Meta no longer lists that suggestion (code: stale). - 409: The ad named is not finished yet (read its set again in a minute); or Meta is not linked (code: not_linked); or the account already holds as many products as it can (code: product_limit). - 422: A product's page could not be read (code: unreadable). Nothing was charged; the sentence says what to send instead. - 429: Too many calls with this key; or three ad sets already in the making (code: busy); or this key has reached its day limit (code: key_limit). Wait `Retry-After` seconds when it is there; a day limit resets at midnight UTC. - 503: Try again in a moment (code: transient). ## Endpoints ### GET /api/v1/me Check the key: the API balance in dollars, what this key has spent today, and calls left this minute. Make this the first call. It changes nothing and costs nothing, and it answers even when the balance is zero (with `addFundsAt`, the address where a person adds dollars). ``` curl https://www.scenelabs.io/api/v1/me \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "balance": 42.1, "currency": "usd", "addFundsAt": "https://scenelabs.io/home/avatars?settings=api", "key": { "id": "c5b8ebf4-910e-40eb-9b49-87acce87fb4e", "name": "my agent", "dailyLimit": 50, "spentToday": 7.9 }, "limit": { "max": 120, "perSeconds": 60, "remaining": 119 } } ``` ### GET /api/v1/products The products this account makes ads for. An ad set is made for one product. `chosen` marks the one used when you name none. `most` is how many the account can hold (one with no plan). `nameConfirmed: false` means nobody has said how the name is spoken, so its ads say it the way it is written (change that with `PATCH /api/v1/products/{id}`). ``` curl https://www.scenelabs.io/api/v1/products \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "products": [ { "id": "prd-m3k2x9a1b2", "name": "Everyday bottle", "sayAs": null, "nameConfirmed": true, "url": "https://example.com/bottle", "facts": { "does": "It keeps a drink cold for 24 hours.", "problem": "Water that is warm by lunch." }, "pitches": [ { "problem": "You fill your bottle at seven and by lunch the water is warm.", "sell": "Everyday bottle keeps a drink cold for 24 hours. The water you poured in the morning is still cold at five." } ], "photos": [], "chosen": true } ], "most": 1 } ``` ### POST /api/v1/products (changes things) Read a product's page and save it as a product to make ads for. Send the page's address. The page is read, the plain facts an ad must get right are drafted from it, and the product is saved. It costs a few cents. The same page sent again is read again and updates that product; it never makes a second copy. If the page cannot be read (some sites refuse), nothing is charged and the answer says so: send `name` and `does` with the url and the product is made from your words instead. HOW THE NAME IS SPOKEN: a voice says the name in every ad, the way it is written. That is right for most names, and nothing waits on it. If the brand says its name another way (written Qelvo, said "kelvo"), send `sayAs` here or with `PATCH /api/v1/products/{id}`, or every ad says it wrong. `nameAudio` is our voice saying the name: play it to the person if the name is a made-up word. `notes` lists what is still unanswered, each with the call that answers it. Send: - `url` (required): The product's page. - `name`: The product's name, up to 80 characters. Left out, it is taken from the page's title. - `sayAs`: The name spelled the way it SOUNDS, up to 40 characters: "kelvo" for a brand written Qelvo. The voice reads this; captions keep the name as written. Sending it answers how the name is spoken. - `nameConfirmed`: true when the name is said the way it is written. It only ends the note about the name; the ads say it as written either way. - `photos`: Up to 4 pictures of the product, each an address `POST /api/v1/uploads` answered with. With one, the person in a `showsProduct` template holds it. Without one nobody holds, wears or shows it. - `does`: What it does, in a sentence. Your words win over the draft. - `problem`: What it fixes, in a sentence. Your words win over the draft. - `choose`: true to make it the product used when an ad set names none. The first product is chosen anyway. ``` curl -X POST https://www.scenelabs.io/api/v1/products \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"url":"https://example.com/bottle"}' ``` Answer: ```json { "id": "prd-m3k2x9a1b2", "name": "Everyday bottle", "sayAs": null, "nameConfirmed": false, "url": "https://example.com/bottle", "facts": { "does": "It keeps a drink cold for 24 hours.", "problem": "Water that is warm by lunch." }, "pitches": [ { "problem": "You fill your bottle at seven and by lunch the water is warm.", "sell": "Everyday bottle keeps a drink cold for 24 hours. The water you poured in the morning is still cold at five." } ], "photos": [], "chosen": true, "updated": false, "notes": [ "Nobody has said how \"Everyday bottle\" is spoken, so the voice in its ads says it the way it is written. That is right for most names and it stops nothing. If this name is said another way (a brand written Qelvo may be said \"kelvo\"), every ad says it wrong and the set is still paid for: PATCH /api/v1/products/prd-m3k2x9a1b2 with {\"sayAs\": \"...\"} (the name spelled the way it sounds). If it is said the way it is written, {\"nameConfirmed\": true} ends this note. `nameAudio` on the product is our voice saying it." ], "nameAudio": "https://…/voice/everyday-bottle.mp3" } ``` ### PATCH /api/v1/products/{id} (changes things) Change one product: how its name is spoken, its pictures, its name or its facts. Only what you send changes, and it costs nothing. This is the call that says how the name is spoken: `sayAs` (the name spelled the way it sounds) or `nameConfirmed: true` (said as written). Until one of them is sent, the ads say the name the way it is written and nothing is stopped. We cannot know how a brand says its own name, and a name said wrong makes every ad in a set unusable: if the name is a made-up word, ask the people behind the brand. `nameAudio` in the answer is our voice saying the name the way the ads will. A new `name` is a new word to say, so the question opens again unless the same call answers it. `photos` gives the product its pictures (an empty list takes them off). - `id` (in the path, required): The product's id. Send: - `sayAs`: The name spelled the way it sounds, up to 40 characters: "kelvo" for a brand written Qelvo. An empty text takes the spelling off. - `nameConfirmed`: true: the name is said the way it is written. false: the question is open again. - `photos`: Up to 4 addresses `POST /api/v1/uploads` answered with. They replace the pictures the product had. - `name`: A new name, up to 80 characters. - `does`: What it does, in a sentence. - `problem`: What it fixes, in a sentence. - `choose`: true to make it the product used when an ad set names none. ``` curl -X PATCH https://www.scenelabs.io/api/v1/products/prd-m3k2x9a1b2 \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"sayAs":"kelvo"}' ``` Answer: ```json { "id": "prd-k8w2m4q7z1", "name": "Qelvo", "sayAs": "kelvo", "nameConfirmed": true, "url": "https://example.com", "facts": { "does": "It waters your plants while you are away." }, "photos": [], "chosen": true, "notes": [ "\"Qelvo\" has no picture on file, so the people in its ads talk about it and never hold, wear or show it. If you want it in their hands, bring a picture in with POST /api/v1/uploads and PATCH /api/v1/products/prd-k8w2m4q7z1 with {\"photos\": [\"\"]}." ], "nameAudio": "https://…/voice/qelvo.mp3" } ``` ### DELETE /api/v1/products/{id} (changes things) Take a product off the account. Ad sets already made for it stay. If it was the chosen product, the first one left becomes the chosen one. - `id` (in the path, required): The product's id. ``` curl -X DELETE https://www.scenelabs.io/api/v1/products/prd-m3k2x9a1b2 \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "ok": true, "chosen": null } ``` ### GET /api/v1/ads/options List the templates (and what one set of each costs, in dollars), the account's products, the actors and the places. Read this before making an ad set. An account with no product makes one first: `POST /api/v1/products` with the product page's address. ``` curl https://www.scenelabs.io/api/v1/ads/options \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "templates": [ { "id": "yapping", "name": "Talking", "price": 6.61, "price15": 4.81, "showsProduct": false }, { "id": "creative", "name": "Creative hooks", "price": 12.22, "price15": 10.42, "showsProduct": false }, { "id": "listicle", "name": "List", "price": 6.61, "price15": 4.81, "showsProduct": true }, { "id": "chat-ad", "name": "Text messages", "price": 0.07, "price15": 0.07, "showsProduct": true, "actor": false, "ads": 1 }, { "id": "podcast-duo", "name": "Podcast for two", "price": 8.03, "price15": 8.03, "showsProduct": true, "actor": true, "ads": 1, "people": 2 } ], "currency": "usd", "products": [ { "id": "prd-m3k2x9a1b2", "name": "Everyday bottle", "url": "https://example.com/bottle", "chosen": true, "nameConfirmed": true, "hasPhoto": false } ], "seconds": [ 15, 30 ], "quality": [ "720p", "1080p" ], "actors": [ { "id": "maya", "name": "Maya", "gender": "woman", "age": 25 } ], "places": [ { "id": "bedroom", "name": "Bedroom" } ] } ``` ### GET /api/v1/openers List every creative opener: what happens on camera in the first seconds of a Creative hooks ad. Free, and it changes nothing. A Creative hooks ad set (`template: creative`) opens each of its six ads on one of these while the line is said: a card fan, a fruit cut, a car passing behind. Leave `moves` out of `POST /api/v1/ads` and they are picked for the product, a different mix each set; or send ids (or a whole `kind`) from here in `moves` to choose. Only the ones marked `usable` can be sent: in that template one hand holds the mic, so a move that needs both hands is never filmed there. `clip` is a real opener the app filmed, for the few that have one. - `kind` (in the query): Only the openers of one kind, e.g. `kitchen` or `selfie`. The kinds are in `kinds`. ``` curl https://www.scenelabs.io/api/v1/openers \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "count": 158, "kinds": [ { "id": "sleight", "name": "Tricks", "line": "Cards and coins", "count": 9 }, { "id": "kitchen", "name": "Kitchen", "line": "Cuts, pours, cracks, pops", "count": 22 } ], "openers": [ { "id": "card-fan", "name": "Card fan", "kind": "sleight", "what": "The deck opens into a wide, even fan in one sweep with only the plain red backs facing the lens — no card face is ever shown — holds a beat, and snaps shut", "firstFrame": "Holding a deck of plain red-backed playing cards squared in one hand, thumb on the edge, the red backs toward the lens", "hands": 1, "handHeld": false, "reveal": false, "usable": true, "clip": "https://www.scenelabs.io/landing/showcase/cards-fan.mp4" } ] } ``` ### POST /api/v1/ads (changes things) Start ONE ad set: a script, an actor and up to six openings, each made into a finished ad. The set is written, filmed and edited on our servers, with nobody at a screen. It usually takes 5 to 10 minutes: this call only starts it and gives you its `id`. Read it back with `GET /api/v1/ads/{id}`. It is paid in dollars from the API balance, taken as each part is made (`price` in the answer is the estimate; the whole estimate has to be in the balance before the set starts). To make a repeat safe, send an `Idempotency-Key` header with any text of your own: the same key again within a day returns the set it already started (`repeat: true`) and makes nothing new. Nothing is guessed: a missing `template`, a field this call does not know, or an id that is not on the account is refused with a sentence. A voice says the product's name in every ad, the way it is written unless the product has a `sayAs`: for a name said another way, send `sayAs` with `PATCH /api/v1/products/{id}` BEFORE this call (while nobody has said, `notes` in the answer repeats it; the set is made all the same). Nothing is sent to Meta: you send the finished ads yourself. An account can have 3 sets in the making at once, and start 12 an hour. The effect-ad templates (`chat-ad`, `news-ad`, `static-ad`; `actor: false` in the options) make ONE ad with nobody filmed, in about two minutes, written for the product: `chat-ad` is a text message chat that ends on the product's link, `news-ad` is a front-page headline that cuts into fast word cuts and ends on the invitation. They take `template`, `productId` and `steer` only. The two cast templates (`podcast-duo`, `hd-ugc`; `people` in the options) film our actors but also make ONE ad each, from a talk written for the product: they take `template`, `productId`, `steer` and `actorId`, and `podcast-duo` takes `guestId`. Send: - `template` (required): A template id from /api/v1/ads/options. `chat-ad`, `news-ad` and `static-ad` are the effect ads: one ad, no actor, and no `seconds`, `quality`, `actorId`, `settingId` or `script`. `static-ad` (Static ad) is a picture ad that moves a little: one picture for 8 seconds that loops, with a headline, one line under it, the product's own photo (its name in big type when it has none), the product's site and a button of a few words, all on screen from the first frame. `paper-story` is a story ad: a narrated cut-paper cartoon written for the product (one ad of about 20 seconds, no actor; the read's words are in the picture as captions), and it takes the same few fields as an effect ad. The product is shown from its own photo when it has one, and by its name alone when it has none: it is never drawn from imagination. The explainer templates (`explain-chart-question`, `explain-iceberg`, `explain-cartoon-pair`, `explain-race`, `explain-map`, `explain-whiteboard`, `explain-whiteboard-story`, `explain-two-paths`, `explain-stick-crowd`) teach one true thing about the subject the product lives in, in that animation style, and name the product once at the end with a line taken from its own description: the facts are found on the web for each ad, and we open every source page and keep a fact only if its sentence and every number shown with it are on that page (the set's `sources` lists them). One ad of 10 to 30 seconds, no actor, no voice; they take the same few fields as an effect ad. When too few facts hold up, the set fails and its price is given back. `podcast-duo` (Podcast for two) is a clip from a video podcast: two actors at studio mics, the picture cutting to whoever speaks, with the product's own pictures on screen while it is explained. `hd-ugc` (HD UGC) is one actor in a dim, lit room talking to the camera, with a line of text over the opening and the product's own pictures, or a short note, above them. `tier-list` (Tier list) is one actor on a sofa ranking three to five products of one kind on a tier board (S to D), yours among them and ending in A or S: each one comes up big as it is talked about and jumps into its row when its tier is said. The others are the product's saved competitors when it has some, or the best-known alternatives, or the ones you name in `steer`; each is shown by its own site's icon. It ends on the speaker's last word, not on an invitation, and runs about 30 to 40 seconds. Each of the three is ONE ad of its own length (about 20 to 30 seconds for the first two), filmed in its own room from a talk written for the product, with its captions in the picture: no `seconds`, `quality`, `settingId`, `script`, `openings`, `night` or `moves`. They take `actorId` (in `podcast-duo`, the guest who knows the product), and `podcast-duo` takes `guestId` for the second guest. `multicam` is Talking cut between up to seven camera spots; `grief` (Stages of grief) is Multi-cam with one feeling per cut. `long-text` has no voice: quiet shots of the actor with the words as one block of text on screen and music under, so its ads have no `words`. `cinematic` is a voice-over film: the actor is seen in a dozen quiet shots cut on the words, with big type and music; it films its own places, so it takes no `settingId`, and it takes longer to make than a talking set (it has many more shots): keep reading the set until `status` is `done`. - `productId`: One of the account's products. Leave out for the chosen one. - `actorId`: An actor's id from /api/v1/ads/options. Leave out and one is picked for you, a different one each time. - `guestId`: Only with `template: podcast-duo`: the second guest, an actor's id from /api/v1/ads/options. It cannot be the same actor as `actorId`. Leave out and one is picked for you. Any other template refuses it. - `settingId`: A place's id from /api/v1/ads/options. Leave out for the usual one. - `seconds`: 15 or 30. Leave out for 30. - `quality`: 720p or 1080p. Leave out for 720p. - `openings`: How many openings the set is made with, 1 to 6. Leave out for 6. Each opening is its own first line and first shot on the same main video, so this is also how many finished ads come back: 1 makes one ad. The main video is made once whatever the number, so each opening left out takes only its own share off the price (`perOpening` in /api/v1/ads/options). Not for the effect ads, `podcast-duo` or `hd-ugc`, which are one ad. - `steer`: A note to the writer, up to 1,200 characters: the angle, the offer, who it is for. The script itself is written for you. In a talking template or `problem-solution` it is built on one of the product's `pitches` (`GET /api/v1/products`): each new ad set takes the one used least so far, so the next set argues something else. - `script`: A saved script's id from /api/v1/scripts. The set is then made from those exact words, for the product the script was written for: nothing is rewritten. Only the templates that change the picture take one (yapping, mic-thing, podcast, green-screen, multicam); the others are ways of writing the script. Send this or `steer`, not both. - `moves`: Only with `template: creative`: which creative hooks to try. Opener ids or kinds from GET /api/v1/openers (the ones marked `usable`; also in /api/v1/ads/options `moves`), up to 20, e.g. `["walk-up", "selfie"]`. Every opening in the set uses one of them, so naming fewer than six repeats some with different words. Leave it out and the moves are picked for the product, a different mix each set. - `night`: true: the set is filmed at night. The room, its light and the places the openings move to are their night versions (lamps on, windows black). A place that is night already (`campfire`, `fireplace`, `screen`, `neon`, `laundromat`) is night either way. Not for the effect ads, `podcast-duo` or `hd-ugc`. Same price. ``` curl -X POST https://www.scenelabs.io/api/v1/ads \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"template":"yapping","seconds":30,"steer":"Lead with the 24-hour cold claim. For people who commute."}' ``` Answer: ```json { "id": "3f0c9c1e-5b7a-4a52-9d3e-2a6f1c8b7e10", "status": "queued", "step": "Waiting for the next tick", "price": 7.9, "currency": "usd" } ``` ### GET /api/v1/ads The last 20 ad sets this account's keys asked for, newest first. Only sets made through the API are listed, not ones made in the app. ``` curl https://www.scenelabs.io/api/v1/ads \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "ads": [ { "id": "3f0c9c1e-5b7a-4a52-9d3e-2a6f1c8b7e10", "status": "done", "step": "Done", "error": null, "createdAt": "2026-11-25T18:02:11.000Z", "finishedAt": "2026-11-25T18:31:40.000Z", "template": "yapping", "product": "Everyday bottle", "seconds": 30, "quality": "720p", "script": "I stopped buying plastic bottles in March. …", "ads": [ { "id": "h1", "hook": "Why is your water warm by lunch?", "video": "https://…/ads/3f0c9c1e/h1-captioned.mp4", "captioned": true, "dropped": null, "seconds": 31.4 } ] } ] } ``` ### GET /api/v1/ads/{id} How far one ad set has got, and its files once they exist. Ask about once a minute until `status` is `done`, `failed` or `stopped`; asking faster gains nothing. Each entry of `ads` gets its `video` as that ad is finished, and its `words` with their times (the example's are cut short). - `id` (in the path, required): The id POST /api/v1/ads gave you. ``` curl https://www.scenelabs.io/api/v1/ads/3f0c9c1e-5b7a-4a52-9d3e-2a6f1c8b7e10 \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "id": "3f0c9c1e-5b7a-4a52-9d3e-2a6f1c8b7e10", "status": "done", "step": "Done", "error": null, "createdAt": "2026-11-25T18:02:11.000Z", "finishedAt": "2026-11-25T18:31:40.000Z", "template": "yapping", "product": "Everyday bottle", "seconds": 30, "quality": "720p", "script": "I stopped buying plastic bottles in March. …", "ads": [ { "id": "h1", "hook": "Why is your water warm by lunch?", "video": "https://…/ads/3f0c9c1e/h1-captioned.mp4", "captioned": true, "dropped": null, "seconds": 31.4, "words": [ { "w": "Why", "s": 0.12, "e": 0.34 }, { "w": "is", "s": 0.34, "e": 0.46 }, { "w": "your", "s": 0.46, "e": 0.62 }, { "w": "water", "s": 0.62, "e": 0.96 }, { "w": "warm", "s": 0.96, "e": 1.3 }, { "w": "by", "s": 1.3, "e": 1.44 }, { "w": "lunch?", "s": 1.44, "e": 1.98 }, { "w": "I", "s": 2.4, "e": 2.52 }, { "w": "stopped", "s": 2.52, "e": 2.9 }, { "w": "buying", "s": 2.9, "e": 3.24 }, { "w": "plastic", "s": 3.24, "e": 3.7 }, { "w": "bottles", "s": 3.7, "e": 4.12 }, { "w": "in", "s": 4.12, "e": 4.24 }, { "w": "March.", "s": 4.24, "e": 4.8 }, { "w": "It", "s": 5.3, "e": 5.42 }, { "w": "stays", "s": 5.42, "e": 5.78 }, { "w": "cold", "s": 5.78, "e": 6.14 }, { "w": "for", "s": 6.14, "e": 6.3 }, { "w": "24", "s": 6.3, "e": 6.74 }, { "w": "hours.", "s": 6.74, "e": 7.3 } ] } ] } ``` ### GET /api/v1/scripts Every script written for this account, with its pitch, the templates it was made in and, when asked, how each did on Meta. A script is filed here by itself the moment an ad set's writer writes it, for sets made by the API and by the app's own loop. Each script lists its `uses`: the ad sets made from it and the template of each. With `results=1` every use gets a `verdict` and the script gets `byTemplate`. The sets of one product are ranked AGAINST EACH OTHER by the rule the app's Analyze screen uses (cost per result, or how often the opening held when nothing was bought yet): the best of at least three shown sets is winning, the worse half losing, and with fewer than three shown sets every one is early. A verdict is for a script IN a template: a script that lost as one template may still win as another. `results=1` reads Meta, so a few times a day is plenty. - `productId` (in the query): Only this product's scripts. Leave out for all. - `results` (in the query): Send 1 to also read Meta once and judge every use (winning, holding, losing, early). ``` curl "https://www.scenelabs.io/api/v1/scripts?results=1" \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "scripts": [ { "id": "8d2b6f0a-3c41-4e7d-9a15-6b0e2f7c9d21", "product": "Everyday bottle", "productId": "product-1", "pitch": "Cold water at 5pm without ice, for people who commute.", "title": "Warm by lunch", "text": "You fill it at seven. By lunch it is warm. This one keeps it cold for 24 hours. The link is below.", "lines": [ "You fill it at seven.", "By lunch it is warm.", "This one keeps it cold for 24 hours.", "The link is below." ], "hooks": [ { "text": "Why is your water warm by lunch?", "angle": "question" } ], "source": "writer", "createdAt": "2026-11-26T10:00:00.000Z", "uses": [ { "set": "3f0c9c1e-5b7a-4a52-9d3e-2a6f1c8b7e10", "template": "yapping", "status": "done", "madeAt": "2026-11-26T10:00:00.000Z", "sent": 6, "verdict": "winning", "ads": 6, "spend": 61.2, "impressions": 9140, "linkClicks": 118, "results": 7, "costPerResult": 8.74, "metaAds": [ "120250000000000001" ] } ], "byTemplate": { "yapping": "winning" }, "verdict": "winning" } ], "results": { "since": "2026-08-28", "until": "2026-11-26", "currency": "USD" } } ``` ### POST /api/v1/scripts (changes things) Save a script you wrote, to make ad sets from it. Give the main video's words as `text` (or `lines`, its sentences in order), up to 3,200 characters, and the argument it makes as `pitch`. `hooks` are its opening lines, up to six; leave them out and they are written for it when a set is made. Nothing is rewritten. Then `POST /api/v1/ads` with `script` set to the id you get back. Send: - `text`: The words of the main video. Send this or `lines`. - `lines`: The same, as sentences in order. - `pitch`: The argument it makes, in one line. - `title`: string - `hooks`: Up to six opening lines. - `productId`: One of the account's products. Leave out for the chosen one. ``` curl -X POST https://www.scenelabs.io/api/v1/scripts \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"text":"You fill it at seven. By lunch it is warm. This one keeps it cold for 24 hours. The link is below.","pitch":"Cold water at 5pm without ice, for people who commute."}' ``` Answer: ```json { "id": "8d2b6f0a-3c41-4e7d-9a15-6b0e2f7c9d21", "product": "Everyday bottle", "productId": "product-1", "pitch": "Cold water at 5pm without ice, for people who commute.", "title": "Warm by lunch", "text": "You fill it at seven. By lunch it is warm. This one keeps it cold for 24 hours. The link is below.", "lines": [ "You fill it at seven.", "By lunch it is warm.", "This one keeps it cold for 24 hours.", "The link is below." ], "hooks": [ { "text": "Why is your water warm by lunch?", "angle": "question" } ], "source": "yours", "createdAt": "2026-11-26T10:00:00.000Z", "uses": [] } ``` ### GET /api/v1/scripts/next Which script to make in which template next, from how the scripts so far did on Meta. Reads Meta once and answers a short list, in order: a script that is WINNING, in a picture template it has not been made in yet (yapping, mic-thing, podcast, green-screen, multicam; winners are favoured); then a NEW script (`script: null`: it is built on the pitch of the product used least so far, see `pitches` on the product); then a script that lost in ONE template, in one more template before it is dropped. A script that lost in two templates is left alone, and the same script and template are never offered twice. Each entry is one `POST /api/v1/ads`: `{template, script}`, or `{template}` for a new pitch. Nothing is started by this call. `judged: false` means Meta could not be read, and the list is then only a new pitch. - `productId` (in the query): The product to plan for. Leave out for all the account's scripts. ``` curl https://www.scenelabs.io/api/v1/scripts/next \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "next": [ { "script": "8d2b6f0a-3c41-4e7d-9a15-6b0e2f7c9d21", "template": "podcast", "why": "Its script is winning as yapping. Not made as podcast yet.", "pitch": "Cold water at 5pm without ice, for people who commute." }, { "script": null, "template": "storytelling", "why": "A new script: 4 already written for this product. It is built on the pitch used least so far.", "pitch": null } ], "judged": true, "scripts": 4 } ``` ### GET /api/v1/scripts/{id} One script in full: its words, its openings, every ad set made from it and how each did, template by template. This is the call to make when a result row says an ad is winning or losing: the row's `script` is this id, and here are the words it spoke and how the same words did in each template. - `id` (in the path, required): A script's id from /api/v1/scripts, or `scriptId` on an ad set. - `results` (in the query): Send 0 to leave Meta out (no verdicts). ``` curl https://www.scenelabs.io/api/v1/scripts/8d2b6f0a-3c41-4e7d-9a15-6b0e2f7c9d21 \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "id": "8d2b6f0a-3c41-4e7d-9a15-6b0e2f7c9d21", "product": "Everyday bottle", "productId": "product-1", "pitch": "Cold water at 5pm without ice, for people who commute.", "title": "Warm by lunch", "text": "You fill it at seven. By lunch it is warm. This one keeps it cold for 24 hours. The link is below.", "lines": [ "You fill it at seven.", "By lunch it is warm.", "This one keeps it cold for 24 hours.", "The link is below." ], "hooks": [ { "text": "Why is your water warm by lunch?", "angle": "question" } ], "source": "writer", "createdAt": "2026-11-26T10:00:00.000Z", "uses": [ { "set": "3f0c9c1e-5b7a-4a52-9d3e-2a6f1c8b7e10", "template": "yapping", "status": "done", "madeAt": "2026-11-26T10:00:00.000Z", "sent": 6, "verdict": "winning", "ads": 6, "spend": 61.2, "impressions": 9140, "linkClicks": 118, "results": 7, "costPerResult": 8.74, "metaAds": [ "120250000000000001" ] } ], "byTemplate": { "yapping": "winning" }, "verdict": "winning" } ``` ### GET /api/v1/effects List the effects the API can make, and every option each one takes. Read this before making one. Each option says its type, what it may be and what you get when you leave it out. The example below is cut short: the real answer lists every effect with every option, and 243 places. ``` curl https://www.scenelabs.io/api/v1/effects \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "effects": [ { "kind": "match-cut", "name": "Text match cut", "line": "One word locked in the middle while the page round it changes on every cut.", "options": [ { "key": "text", "name": "Your line", "type": "text", "max": 80, "required": true, "default": null, "note": "The words on the page, 14 at most." }, { "key": "pages", "name": "Pages", "type": "pick", "values": [ "mixed", "newspaper", "book", "typewriter", "notebook" ], "default": "mixed" }, { "key": "seconds", "name": "Length", "type": "number", "min": 2, "max": 8, "step": 0.5, "unit": "seconds", "default": 4 } ] }, { "kind": "cut-out", "name": "Paper cut-out", "line": "Your photo cut out with a paper edge, jiggling like stop-motion.", "options": [ { "key": "photo", "name": "Photo", "type": "photo", "note": "A picture's address from POST /api/v1/uploads. A person or a thing. It is cut out of its background for you.", "default": null, "required": true }, { "key": "edge", "name": "Paper edge", "type": "pick", "values": [ "thin", "medium", "thick" ], "default": "medium" } ] }, { "kind": "flight-path", "name": "Flight path", "line": "A plane flying a dashed route between two places on a map.", "options": [ { "key": "from", "name": "From", "type": "place", "note": "A place `id` from `places` in this answer.", "default": "london" }, { "key": "look", "name": "Map", "type": "pick", "values": [ "paper", "dark", "blue" ], "default": "paper" } ] } ], "places": [ { "id": "london", "name": "London", "country": "United Kingdom" }, { "id": "tokyo", "name": "Tokyo", "country": "Japan" } ] } ``` ### POST /api/v1/effects (changes things) Start ONE short film of an effect, on its own. The film is 2 to 10 seconds, drawn on our servers from the options alone. This call only starts it and gives you its `id`. Read it back with `GET /api/v1/effects/{id}`. It costs nothing, except the paper cut-out, which pays 4 cents to cut the subject out of its photo. A value that is not allowed is refused with a sentence; the answer shows every option as the film will be made. An account can start 30 an hour. This call is for looking at an effect before you use it, or for taking the clip somewhere else. You do NOT need it to put an effect into an ad: `POST /api/v1/edits` draws the effect straight into the ad, at the words you name. Send: - `kind` (required): match-cut | cut-out | fold-out | confidential | flight-path | newspaper | search-bar | text-thread | notifications | review-stars | receipt | sticky-notes | before-after | handwritten | chart | polaroids | price-slash | calendar | delivery | scratch-card | inbox | coupon | compare | feature-card | notes | post | quiz | alert | chart-question | cartoon-story | crayon-page | cartoon-pair | body-timeline | race | size-lineup | map | iceberg | whiteboard | whiteboard-story | two-paths | stick-crowd: a `kind` from GET /api/v1/effects. - `options`: The effect's options by `key`, as GET /api/v1/effects lists them. Leave one out for its default. The text match cut needs `text`; the paper cut-out and the paper fold-out need `photo`. ``` curl -X POST https://www.scenelabs.io/api/v1/effects \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"kind":"match-cut","options":{"text":"Stop scrolling. Start selling.","from":3,"pages":"newspaper","seconds":4}}' ``` Answer: ```json { "id": "fx_WyJzYnhfOFFtMmRLNHZUMXhZIiwiY21kXzVacjlwTDBhVzNuQiIsIm1hdGNoLWN1dCIsIjk6MTYiXQ", "status": "making", "kind": "match-cut", "options": { "text": "Stop scrolling. Start selling.", "from": 3, "to": 3, "shape": "9:16", "seconds": 4, "pace": 10, "pages": "newspaper", "marker": "yellow", "mark": "marker", "zoom": 0.5, "blur": 0.5, "sound": "shutter", "hold": true, "seed": 1 } } ``` ### GET /api/v1/effects/{id} How far one film has got, and its file once it exists. Ask every few seconds until `status` is `done` or `failed`. The finished film is also kept in the account's Library in the app. - `id` (in the path, required): The id POST /api/v1/effects gave you. ``` curl https://www.scenelabs.io/api/v1/effects/fx_WyJzYnhfOFFtMmRLNHZUMXhZIiwiY21kXzVacjlwTDBhVzNuQiIsIm1hdGNoLWN1dCIsIjk6MTYiXQ \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "id": "fx_WyJzYnhfOFFtMmRLNHZUMXhZIiwiY21kXzVacjlwTDBhVzNuQiIsIm1hdGNoLWN1dCIsIjk6MTYiXQ", "status": "done", "kind": "match-cut", "progress": 1, "video": "https://…/films/match-cut-8f21.mp4", "error": null } ``` ### POST /api/v1/uploads (changes things) Copy a picture from the web onto your account, to use in an effect or an edit. Every other call takes only pictures that were brought in this way: the `url` in the answer is what you hand to an effect's `photo` or an insert's `src`. `rights: true` is your word that you have the right to use the picture and that anyone in it agreed; it is required every time. A picture can be 25 MB at most. It costs nothing. Send: - `url` (required): The picture's web address (http or https): a jpg, png or webp. - `rights` (required): Must be true: you have the right to use this picture, and anyone in it agreed. ``` curl -X POST https://www.scenelabs.io/api/v1/uploads \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"url":"https://example.com/images/bottle-on-desk.jpg","rights":true}' ``` Answer: ```json { "url": "https://…/refs/mh2k1x-9fq2a.jpg", "kind": "image" } ``` ### POST /api/v1/cutouts (changes things) Start cutting the person out of an ad's video, for the green screen look. The answer of `GET /api/v1/cutouts/{id}`, once done, has a `video`: the same video with everything but the person made clear. Hand it to `POST /api/v1/edits` as `person`, and a picture with layout `behind` draws the person small in a corner, cut out. Name the SAME video here as in the edit (`set` and `ad` for both, or the same `video` for both): the two play frame for frame. It is priced by the video's length (about $0.86 for a 31-second ad), paid from the API balance and returned if it fails. A video can be 90 seconds at most. Send: - `set`: An ad set's id from /api/v1/ads. With `ad`. - `ad`: The id of one finished ad in that set. - `video`: Or, in place of `set` and `ad`: a finished file's own address. ``` curl -X POST https://www.scenelabs.io/api/v1/cutouts \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"set":"3f0c9c1e-5b7a-4a52-9d3e-2a6f1c8b7e10","ad":"h1"}' ``` Answer: ```json { "id": "0d1f6a3c-52be-4c0e-9f5d-7a1c2e9b4d11", "status": "making", "price": 0.86, "currency": "usd", "seconds": 31.4 } ``` ### GET /api/v1/cutouts/{id} How one cut-out is going, and its file once it exists. Ask every ten seconds or so until `status` is `done` or `failed`. A cut-out that fails gives its money back to the API balance. - `id` (in the path, required): The id POST /api/v1/cutouts gave you. ``` curl https://www.scenelabs.io/api/v1/cutouts/0d1f6a3c-52be-4c0e-9f5d-7a1c2e9b4d11 \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "id": "0d1f6a3c-52be-4c0e-9f5d-7a1c2e9b4d11", "status": "done", "video": "https://…/person/0d1f6a3c-52be-4c0e-9f5d-7a1c2e9b4d11.webm", "price": 0.86, "refunded": false, "error": null } ``` ### POST /api/v1/edits (changes things) Put effects, pictures, rings and arrows INTO one finished ad, each at its moment. Name the ad with `set` and `ad`: it is made again from its own video, with the inserts under its captions and each one landing on the words you name (`when`) or the second you give (`at`). Or give any finished file as `video`: the inserts are laid over it as it is, and only `at` works, since its words are not known. Things that cover the frame (an effect, a `full` or a `behind` picture) may not overlap each other; cards, rings and arrows may sit on anything. The captions hide while an effect is up and move to the middle beside a small person. Every insert arrives with a small sound, all at one level set to sit under the voice of an ad made here. A wrong insert is refused with a sentence, and the answer says where each one landed. This call only starts the edit: read it back with `GET /api/v1/edits/{id}`. It costs nothing (a paper cut-out effect inside it still pays its 4 cents). 12 inserts an edit, 20 edits an hour. Send: - `set`: An ad set's id from /api/v1/ads. With `ad`. - `ad`: The id of one finished ad in that set. - `video`: Or, in place of `set` and `ad`: a finished file's own address (an edit's `video`, say, to edit it again). - `person`: A finished cut-out's `video` from /api/v1/cutouts, for pictures with layout `behind`. Left out, the person is shown in a small window instead of cut out. - `inserts` (required): What to put in, 1 to 12 of them, in any order. - `inserts[].type` (required): effect | image | circle | arrow. - `inserts[].at`: When it starts, in seconds from the start of the ad. Give this or `when`, never both. - `inserts[].when`: Words said in the ad: the insert starts on the first of them. They must be said exactly once (use more words if they are said twice). Needs an ad named by `set` and `ad`. - `inserts[].sound`: false for no sound. Left out, it makes a small sound as it arrives: a pop for a card, a swish for a picture, a pen for a ring, a zip for an arrow. An effect has its own (the match cut clicks on every cut). - `inserts[].kind`: For an effect: its `kind` from GET /api/v1/effects. - `inserts[].options`: For an effect: its options, as for POST /api/v1/effects. It is drawn tall, full frame, for its own `seconds`. - `inserts[].src`: For an image: the picture's address from POST /api/v1/uploads. - `inserts[].layout`: For an image: full (covers the frame; when left out) | card (pops up over the video) | behind (the green screen look: the picture fills the frame, the person is small in a bottom corner). - `inserts[].seconds`: How long it stays. An image: 0.8 to 8 (2.5 when left out). A ring or an arrow: 0.6 to 4 (1.6 when left out). - `inserts[].person`: For layout behind: how the person sits. - `inserts[].x`: For a ring, its middle; for an arrow, its tip. 0 is the left edge of the frame, 1 the right. - `inserts[].y`: 0 is the top of the frame, 1 the bottom. - `inserts[].w`: For a ring: its width as a part of the frame's width (0.36 when left out). - `inserts[].h`: For a ring: its height as a part of the frame's height (0.1 when left out). - `inserts[].from`: For an arrow: the side it comes from. left | right | top | bottom | top-left | top-right | bottom-left (when left out) | bottom-right. - `inserts[].colour`: For a ring or an arrow: red (when left out) | yellow | white | black | blue | green. ``` curl -X POST https://www.scenelabs.io/api/v1/edits \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"set":"3f0c9c1e-5b7a-4a52-9d3e-2a6f1c8b7e10","ad":"h1","person":"https://…/person/0d1f6a3c-52be-4c0e-9f5d-7a1c2e9b4d11.webm","inserts":[{"type":"effect","kind":"match-cut","when":"stopped buying","options":{"text":"I stopped buying plastic bottles.","from":3,"to":4,"seconds":2}},{"type":"image","src":"https://…/refs/mh2k1x-9fq2a.jpg","when":"stays cold","layout":"behind","seconds":4,"person":{"size":"third","tilt":8,"moves":[{"at":2,"spot":"bottom-left","tilt":-10}]}},{"type":"arrow","at":7,"x":0.7,"y":0.3}]}' ``` Answer: ```json { "id": "ed_WyJzYnhfOFFtMmRLNHZUMXhZIiwiY21kXzVacjlwTDBhVzNuQiJd", "status": "making", "inserts": [ { "insert": 1, "at": 2.52, "seconds": 2 }, { "insert": 2, "at": 5.42, "seconds": 4 }, { "insert": 3, "at": 7, "seconds": 1.6 } ], "person": "cut out" } ``` ### GET /api/v1/edits/{id} How far one edit has got, and its file once it exists. Ask every ten seconds or so until `status` is `done` or `failed`. The `video` is a finished ad like any other: send it to Meta, or edit it again. It is also kept in the account's Library in the app. - `id` (in the path, required): The id POST /api/v1/edits gave you. ``` curl https://www.scenelabs.io/api/v1/edits/ed_WyJzYnhfOFFtMmRLNHZUMXhZIiwiY21kXzVacjlwTDBhVzNuQiJd \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "id": "ed_WyJzYnhfOFFtMmRLNHZUMXhZIiwiY21kXzVacjlwTDBhVzNuQiJd", "status": "done", "progress": 1, "video": "https://…/films/ad-edited-5c0e.mp4", "error": null } ``` ### GET /api/v1/meta/connection Is Meta linked, and which ad account and Page will a send use? Ask this BEFORE making an ad set you mean to send: `canSend` is true when a send will go through, and `missing` says what is not done yet. `link` in `missing` is the one step for a person: they sign in to Facebook once at `linkAt`. `adAccount` and `page` you can pick yourself with the POST below. `expiresAt` is when that Facebook sign-in ends (about 60 days after it was made): past it, a person links again. Nothing here calls Meta. ``` curl https://www.scenelabs.io/api/v1/meta/connection \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "connected": true, "name": "Sam Rivera", "expiresAt": "2027-01-22T10:00:00.000Z", "adAccount": { "id": "act_1234567890", "name": "Bottle Co", "currency": "USD" }, "page": { "id": "109876543210", "name": "Bottle Co" }, "instagram": null, "adAccounts": [ { "id": "act_1234567890", "name": "Bottle Co", "currency": "USD" } ], "pages": [ { "id": "109876543210", "name": "Bottle Co" } ], "canSend": true, "missing": [], "linkAt": "https://scenelabs.io/home/avatars?settings=meta" } ``` ### POST /api/v1/meta/connection (changes things) Choose which ad account and which Page sends use. Send ids from the GET above (`adAccounts`, `pages`). An id that is not one of the account's own is refused; nothing is ever cleared. The answer is the link as it now stands. Send: - `adAccountId`: One of `adAccounts`. - `pageId`: One of `pages`. ``` curl -X POST https://www.scenelabs.io/api/v1/meta/connection \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"adAccountId":"act_1234567890","pageId":"109876543210"}' ``` Answer: ```json { "connected": true, "name": "Sam Rivera", "expiresAt": "2027-01-22T10:00:00.000Z", "adAccount": { "id": "act_1234567890", "name": "Bottle Co", "currency": "USD" }, "page": { "id": "109876543210", "name": "Bottle Co" }, "instagram": null, "adAccounts": [ { "id": "act_1234567890", "name": "Bottle Co", "currency": "USD" } ], "pages": [ { "id": "109876543210", "name": "Bottle Co" } ], "canSend": true, "missing": [], "linkAt": "https://scenelabs.io/home/avatars?settings=meta" } ``` ### GET /api/v1/meta/pixels The pixels on the linked ad account. A campaign with objective `sales` names the pixel it optimises for (`campaign.pixelId` on `POST /api/v1/meta/send`). This lists them. It reads Meta once. ``` curl https://www.scenelabs.io/api/v1/meta/pixels \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "pixels": [ { "id": "1234567890123456", "name": "Bottle Co pixel", "lastFired": "2026-11-28T21:14:03+0000" } ], "currency": "USD" } ``` ### POST /api/v1/meta/send (changes things) Send ONE finished ad to the connected Meta ad account. It starts running there, unless you send `status: "PAUSED"`. Meta must be linked first (`GET /api/v1/meta/connection` says whether it is). Meta takes a while to process a video: while it does, the answer is 202 and you send the same body again a few seconds later; `key` is what makes that safe, so use one `key` per ad and keep it. For the first ad of a set, send `campaign` and a campaign and ad set are made for it; for the rest, send the `adsetId` the first answer gave you so they share it. `adsetId` must be one an earlier send of this account made: an ad set built by hand in Ads Manager is refused. `campaign.dailyBudget` may not be above this key's day limit (`key.dailyLimit` on /api/v1/me). THE AD GOES LIVE BY ITSELF: it is turned on as soon as it is on Meta, and Meta reviews it before it runs. This spends the ad account's money, up to the campaign's daily budget, so a new campaign that starts running must be sent with `campaign.dailyBudget` (the call is refused without it). Send `status: "PAUSED"` to hold the ad instead; `POST /api/v1/meta/state` starts it later. Only what THIS send made is turned on: the ad, and the ad set and campaign made for it. An ad added with `adsetId` is turned on by itself and its ad set and campaign are left as they are (if you paused them, it waits there). Sending a `key` again never switches anything. Read `status` in the answer: `ACTIVE`, or `PAUSED` with `notStarted` saying why and which call starts it. Send: - `key` (required): Your own name for this ad, the same every time you send it. Sending a key again carries on with that ad; it never makes a second one. - `adName` (required): The ad's name in Ads Manager. - `videoUrl` (required): A finished ad's `video` address from /api/v1/ads. Only our own files are taken. - `message`: The text above the video. - `link` (required): Where the button goes. - `status`: ACTIVE (what happens when it is left out: the ad runs once Meta has reviewed it) or PAUSED (it waits until POST /api/v1/meta/state turns it on). - `cta`: The button: LEARN_MORE (the default), SHOP_NOW, SIGN_UP, GET_OFFER, SUBSCRIBE, DOWNLOAD, BOOK_TRAVEL, CONTACT_US, APPLY_NOW, GET_QUOTE, ORDER_NOW or WATCH_MORE. - `title`: The headline under the video. - `adsetId`: An ad set an earlier send made. Leave out, with `campaign`, to make a new one. - `campaign`: For a new campaign and ad set. - `campaign.name`: string - `campaign.dailyBudget`: What the campaign may spend a day, in the ad account's currency: from 1 up to the key's day limit. Needed whenever the new campaign starts running (any send without `status: "PAUSED"`). - `campaign.countries`: Two-letter country codes, e.g. ["US"]. - `campaign.objective`: traffic (the default) or sales. Sales needs `pixelId`. - `campaign.pixelId`: string ``` curl -X POST https://www.scenelabs.io/api/v1/meta/send \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"key":"bottle-nov-h1","adName":"Bottle · warm by lunch","videoUrl":"https://…/ads/3f0c9c1e/h1-captioned.mp4","message":"Cold for 24 hours.","link":"https://example.com/bottle","cta":"SHOP_NOW","campaign":{"name":"Bottle · November","dailyBudget":20,"countries":["US"]}}' ``` Answer: ```json { "ok": true, "key": "bottle-nov-h1", "adId": "120250000000000001", "adsetId": "120250000000000010", "campaignId": "120250000000000100", "videoId": "1500000000000001", "status": "ACTIVE", "turnedOn": { "ads": 1, "adSets": 1, "campaign": true }, "url": "https://adsmanager.facebook.com/…" } ``` ### POST /api/v1/meta/state (changes things) Turn an ad, an ad set or a campaign on or off, or set a campaign's daily budget. Turning something on spends the ad account's money. Only things this account's own sends made can be touched; any other id gets 404. A send made with `status: "PAUSED"` leaves three things paused: the campaign, its ad set and the ad. So `status: "ACTIVE"` on a CAMPAIGN switches on the ads our sends put in it, then their ad sets, then the campaign last, and `turnedOn` in the answer counts them. If Meta refuses one on the way, the campaign is left paused (nothing spends), the answer says how far it got, and the same call again carries on. `status: "PAUSED"` on a campaign is one change and stops everything in it. On an ad or an ad set, only that one thing changes. Send `status`, or `dailyBudget` (campaigns only), or both. `dailyBudget` may not be above this key's day limit (`key.dailyLimit` on /api/v1/me). Turning things off always works, whatever the API balance. Send: - `id` (required): Meta's id for the ad, the ad set or the campaign. - `status`: ACTIVE or PAUSED. - `dailyBudget`: From 1 up to the key's day limit, in the ad account's currency. Campaigns only. ``` curl -X POST https://www.scenelabs.io/api/v1/meta/state \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"id":"120250000000000100","status":"ACTIVE"}' ``` Answer: ```json { "ok": true, "id": "120250000000000100", "status": "ACTIVE", "turnedOn": { "ads": 6, "adSets": 1, "campaign": true } } ``` ### GET /api/v1/meta/ad-status What Meta says each ad is doing right now: active, paused, in review, rejected. One read of Meta for up to 50 ads. The answer is kept for five minutes unless you ask for a fresh one. - `ids` (in the query, required): Up to 50 of Meta's ad ids, separated by commas. - `fresh` (in the query): Send 1 to skip the five-minute copy we keep. ``` curl "https://www.scenelabs.io/api/v1/meta/ad-status?ids=120250000000000001" \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "statuses": { "120250000000000001": { "status": "PAUSED", "issue": null } }, "at": 1795720931000 } ``` ### GET /api/v1/meta/results How the ads in the connected ad account did: spend, views, clicks, results. One row per ad, for every ad in the ad account over the window, including ads that have not been shown yet. `keys` tells you which rows are ads you sent (your `key` to Meta's ad id). A row of an ad Scenelabs made also says which ad set it is (`set`), the saved script it speaks (`script`: read it with `GET /api/v1/scripts/{id}`), that script's `pitch`, and the `template` it was made in, so a losing script can be told from a losing template. Each call reads Meta, so a few times a day is plenty. - `days` (in the query): How far back, 1 to 365. Leave out for 30. ``` curl "https://www.scenelabs.io/api/v1/meta/results?days=7" \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "rows": [ { "adId": "120250000000000001", "adName": "Bottle · warm by lunch", "adsetId": "120250000000000010", "campaignId": "120250000000000100", "status": "ACTIVE", "spend": 18.4, "impressions": 2310, "reach": 2004, "linkClicks": 31, "ctr": 0.0134, "cpm": 7.97, "cpc": 0.59, "hookRate": 0.31, "holdRate": 0.12, "resultType": "purchase", "results": 2, "costPerResult": 9.2, "roas": 2.6 } ], "keys": { "bottle-nov-h1": "120250000000000001" }, "currency": "USD", "since": "2026-11-18", "until": "2026-11-25", "account": { "id": "act_123", "name": "Acme" } } ``` ### GET /api/v1/meta/recommendations List what Meta suggests changing in the connected ad account. Meta's own list (the one behind Ads Manager's opportunity score), read live. An empty list means Meta has nothing to suggest right now. Meta can show more in Ads Manager than it lists here. The account must have Meta connected in Settings. Reads only. Each call is one read of Meta: once a day is plenty. ``` curl https://www.scenelabs.io/api/v1/meta/recommendations \ -H "Authorization: Bearer $SCENELABS_KEY" ``` Answer: ```json { "account": { "id": "act_123", "name": "Acme" }, "recommendations": [ { "signature": "1234567", "type": "CREATIVE_FATIGUE", "objectIds": [ "120250000000000001" ], "body": "This ad's results are dropping. Add a new version.", "lift": "Up to 3% more results", "points": 14, "url": "https://adsmanager.facebook.com/…", "canApply": true, "effect": "new_ads" } ], "more": false } ``` ### POST /api/v1/meta/recommendations/apply (changes things) Apply ONE of Meta's suggestions to the ad account. Changes live ads. Send the `signature` and the `type` exactly as the list gave them (the type is a check that you know what you are applying). One suggestion per call, 30 an hour for an account. Suggestions that raise a budget (effect: budget) are refused: send the person to `url`. If Meta refuses, nothing in the ad account changes. New: tell us if a kind of suggestion does not apply cleanly. Send: - `signature` (required): string - `type` (required): Must equal the suggestion's `type`. - `objectIds`: Optional: only these of the suggestion's objectIds. Leave out for all of them. ``` curl -X POST https://www.scenelabs.io/api/v1/meta/recommendations/apply \ -H "Authorization: Bearer $SCENELABS_KEY" \ -H "content-type: application/json" \ -d '{"signature":"1234567","type":"CREATIVE_FATIGUE"}' ``` Answer: ```json { "ok": true, "applied": { "signature": "1234567", "type": "CREATIVE_FATIGUE", "objectIds": [ "120250000000000001" ], "effect": "new_ads" } } ``` ## Recipe: make an ad set and run it, start to finish These calls take a product's page to running ads, and to the next ones. A person does two things once, in the app: adds dollars to the API balance, and signs in to Facebook to link Meta. Everything else is a call: 1. `GET /api/v1/me`: the balance in dollars. A 30-second talking ad set is about $6.61. 2. `POST /api/v1/products` with the product page's `url` (once per product). Keep its `id`. 3. Only if the name is a made-up word or an odd spelling: check how it is spoken before spending. The ads say it the way it is written; if the brand says it another way, `PATCH /api/v1/products/{id}` with `sayAs` (spelled the way it sounds). `nameAudio` on the product is our voice saying it. Nothing waits on this. If the product should be held or worn in its ads, give it a picture with the same call: `photos`, from `POST /api/v1/uploads`. 4. `GET /api/v1/meta/connection`: go on to sending only when `canSend` is true. If `missing` has `link`, give the person `linkAt`; if it has `adAccount` or `page`, pick them with `POST /api/v1/meta/connection`. 5. `POST /api/v1/ads` with a `template` from `GET /api/v1/ads/options` (and a `steer` note if you have an angle). Send an `Idempotency-Key` header so a repeat cannot start a second set. Keep the `id`. 6. `GET /api/v1/ads/{id}` about once a minute until `status` is `done`: usually 5 to 10 minutes. If it is `failed`, read `error` and stop. 7. For each entry of `ads` that has a `video`: `POST /api/v1/meta/send`, ONE AD AT A TIME. Give each its own `key`. Send `campaign` (with its `dailyBudget`) with the first and the `adsetId` it returns with the rest. On 202, send the same body again a few seconds later. Each ad starts running once Meta has reviewed it, with nobody pressing anything. This is the step that spends the ad account's money, up to the campaign's daily budget: do it only for a budget the person has said is theirs to spend. 8. If a person should look first, add `status: "PAUSED"` to each send. Then, when they have all landed, `POST /api/v1/meta/state` with the CAMPAIGN's id and `status: "ACTIVE"`: that one call switches on the ads, their ad set and the campaign. 9. From the next day, `GET /api/v1/meta/results` to see how each ad did, and switch off the ones that are not working: `POST /api/v1/meta/state` with the ad's id and `status: "PAUSED"`. Each row of ours carries its `script` and `template`. 10. Before the next set, `GET /api/v1/scripts/next`: it says which script to make in which template (a winning script in a new template first, then a new pitch). Make each entry with `POST /api/v1/ads`: `{template, script}`, or `{template}` for a new pitch. Meta reviews every ad before it can run. An ad set is paid from the API balance as it is made; `price` in the answer of POST /api/v1/ads is the estimate, and what is charged is what was rendered. ## Recipe: put an effect and a picture into an ad, at the right words An ad set made here can be edited by a program with nobody at a screen. The words of each ad come with their times, so an insert lands on the word it is about: 1. `GET /api/v1/ads/{id}`: each finished ad has `words` (each with the second it is said) and `seconds`. 2. `POST /api/v1/uploads` once for each picture, with `rights: true`. Keep the `url` each one answers with. 3. For the green screen look only: `POST /api/v1/cutouts` with the same `set` and `ad`, then `GET /api/v1/cutouts/{id}` until it is `done`. Keep its `video`. 4. `POST /api/v1/edits` with `set`, `ad` and `inserts`. Place each with `when` (words from the ad, said exactly once) or `at` (seconds). Pass the cut-out as `person`. 5. `GET /api/v1/edits/{id}` about every ten seconds until `status` is `done`. Its `video` is a finished ad: send it to Meta like any other. What reads well: an effect over the line it illustrates; a picture with layout `behind` while the person talks about what is in it, with a ring or an arrow on the part that matters; a `card` for a quick proof. Leave a second or two of the plain video between things that cover the frame. ## Recipe: apply Meta's suggestions by yourself, once a day Scenelabs does not apply anything on a clock. Your schedule does it (a cron job, a scheduled agent run): 1. Once a day, `GET /api/v1/meta/recommendations`. 2. For each suggestion with `canApply: true`, decide. `effect` says what it does: `settings` and `creative` change existing ads; `new_ads` makes new ones beside them. 3. Apply the ones you want ONE AT A TIME: `POST /api/v1/meta/recommendations/apply` with its `signature` and `type`. Wait for each answer before the next. 4. After each apply, read the list again before the next one: applying one suggestion can retire others (their signature goes `stale`). 5. A suggestion with `canApply: false` (a budget raise, or a kind Meta's API does not apply) is for a person: give them its `url`. 6. Keep a note of what you applied and when. Stop and tell the person if the same suggestion fails twice. The limit is 30 applies an hour for an account. An empty list is normal: it means Meta has nothing to suggest. ## Use it from a Code Mode server (Cloudflare `@cloudflare/codemode`) The spec is shaped for the two-tool pattern (search the spec, run a request): - Give `openApiMcpServer` the parsed spec from https://www.scenelabs.io/api/v1/openapi.json. It has no `$ref`; every operation has a `summary`, a tag, and a JSON schema under `responses["200"]`. - Paths in the spec start at the site root, so the host's request function is origin + path: `https://www.scenelabs.io` + `/api/v1/me`. - The request function needs only method, path, query and a JSON body, plus the caller's `Authorization: Bearer sl_live_…` header added on the host. The key never has to enter the sandbox. - On an error, hand the JSON body back to the model instead of throwing only the status: the `error` sentence is what tells it what to do next. - Answers are small (well under the result cap), and there is no paging yet. ## Not in the API yet - Adding dollars, and the first Facebook sign-in that links Meta. A person does each once, in the Scenelabs app; a key then checks the link and picks the ad account and Page itself. - Sending a picture's bytes. A picture is brought in from a web address (`POST /api/v1/uploads`).