{"components":{"schemas":{"InvokeResponse":{"properties":{"result":{"description":"Skill result. Long-running skills return {job_id | batch_id | task_id, status} - poll /jobs/{id}. A result with status \"needs_input\" is a question for a human: relay it and call again with the answer.","type":"object"},"success":{"type":"boolean"}},"type":"object"}},"securitySchemes":{"bearerAuth":{"description":"API key from Settings > API keys","scheme":"bearer","type":"http"}},"x-webhook-events":["script.status_changed","video_edit.completed","video_edit.failed","video_edit.cancelled","video_edit.review_status_changed"]},"info":{"description":"Everything AdBrain can do - write scripts, cut and revise video ads, generate statics, manage brands, products, raw assets and folders, read performance - is a SKILL. Call any skill with POST /skills/{name}/invoke and a JSON body matching its input schema. Long-running skills (video.edit, video.revise, static.generate, script.write...) return a job handle immediately; poll GET /jobs/{job_id} until status is done/failed. Subscribe to webhooks to drive your own tools (Notion, Monday, Slack, Zapier, your stack) when a script changes status or a video cut finishes or is approved. Deliveries carry X-AdBrain-Event and X-AdBrain-Signature (HMAC-SHA256 hex of the raw body with the webhook secret). The same skills are available over MCP at /mcp.\n\nAuthentication: Authorization: Bearer <api key> (create keys in AdBrain under Settings > API keys). Ids: brand_id (string), product_id (string), script_id / edit_id / asset_id (integers) - list skills return them.","title":"AdBrain API","version":"1"},"openapi":"3.1.0","paths":{"/agent/tasks":{"post":{"operationId":"create_agent_task","requestBody":{"content":{"application/json":{"schema":{"properties":{"goal":{"description":"What to accomplish, in plain language.","type":"string"},"inputs":{"description":"Optional ids/context: brand_id, product_id, script_id, asset_ids...","type":"object"}},"required":["goal"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Task handle - poll GET /agent/tasks/{task_id}"}},"security":[{"bearerAuth":[]}],"summary":"Hand AdBrain a whole goal to plan and run","tags":["agent"]}},"/agent/tasks/{task_id}":{"get":{"operationId":"get_agent_task","parameters":[{"in":"path","name":"task_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Task"}},"security":[{"bearerAuth":[]}],"summary":"Agent task status, plan, steps and artifacts","tags":["agent"]}},"/jobs/{job_id}":{"get":{"operationId":"get_job","parameters":[{"in":"path","name":"job_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Job status and result when finished"},"404":{"description":"Unknown job"}},"security":[{"bearerAuth":[]}],"summary":"Poll a long-running job (script, static batch, brain run, agent task)","tags":["jobs"]}},"/skills":{"get":{"operationId":"list_skills","responses":{"200":{"description":"Skill catalog"}},"security":[{"bearerAuth":[]}],"summary":"List callable skills with their input schemas","tags":["meta"]}},"/skills/artifact.create/invoke":{"post":{"description":"Save a piece of content you've produced as a viewable artifact that opens in the side panel (and can be shared with a public link). Use this to DELIVER research, reports, lists of studies, competitor breakdowns, comparisons, summaries, or any substantial written output - instead of dumping it into the chat. Two formats: 'markdown' for a clean document/report (most common; supports headings, lists, tables, links - include your source URLs as markdown links), and 'html' for a full, self-contained, styled HTML page when a rich visual report/dashboard/landing page is warranted (return a complete <!doctype html> document). Pass a clear title and the full content. After calling it, give the user a one-line summary and tell them it's open in the panel - don't repeat the whole thing in your reply. This is for NEW deliverables only: to revise/extend/fix a document or page that already exists, use artifact.update on its id - never create a duplicate. NEVER use this for ad scripts: scripts must be produced by script.write so they're saved to the script library as real script artifacts. If script.write failed, report the failure - do not write the script into a document with this tool.","operationId":"invoke_artifact_create","requestBody":{"content":{"application/json":{"schema":{"properties":{"content":{"description":"The full content. For markdown, GitHub-flavored markdown. For html, a complete <!doctype html> document.","type":"string"},"format":{"description":"'markdown' for a document/report (default), 'html' for a full standalone styled page.","enum":["markdown","html"],"type":"string"},"title":{"description":"Short, descriptive title for the artifact.","type":"string"}},"required":["title","content"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"artifact.create","tags":["artifact"],"x-long-running":false,"x-permission":"artifact.write"}},"/skills/artifact.get/invoke":{"post":{"description":"Read one of the user's saved artifacts by id - a markdown document or HTML report previously produced with artifact.create (research findings, competitor breakdowns, summaries). Returns the title and full content. Use it whenever the user references an artifact ('[reference: artifact #12 ...]') so its actual content informs your work. Read-only - to change the document afterwards, use artifact.update.","operationId":"invoke_artifact_get","requestBody":{"content":{"application/json":{"schema":{"properties":{"artifact_id":{"description":"The artifact id (from the reference or artifact.create).","type":"integer"}},"required":["artifact_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"artifact.get","tags":["artifact"],"x-long-running":false,"x-permission":"artifact.read"}},"/skills/artifact.search/invoke":{"post":{"description":"Search the user's saved knowledge base - every research document and report previously produced (markdown/html artifacts: ingredient research, competitor breakdowns, audience studies, claims with citations). ALWAYS try this BEFORE a web search when you need facts about the user's brands, products, ingredients, or competitors - the answer is often already saved, with sources. Pass a few specific keywords (include the brand/product name to scope it); every word must match, so retry with fewer/different words on a miss. Returns the best matches with snippets - then artifact.get the full document. When a web search DOES produce substantial new research, save it with artifact.create so it's findable here next time. Read-only and free.","operationId":"invoke_artifact_search","requestBody":{"content":{"application/json":{"schema":{"properties":{"limit":{"description":"Max results (default 8).","type":"integer"},"query":{"description":"A few specific keywords (e.g. 'LIVFRESH nano-hydroxyapatite ingredient'). Every word must match somewhere, so keep it tight.","type":"string"}},"required":["query"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"artifact.search","tags":["artifact"],"x-long-running":false,"x-permission":"artifact.read"}},"/skills/artifact.share/invoke":{"post":{"description":"Publish a public, login-free share link for a deliverable, by its id. Returns a shareable URL. Works for ANY shareable type - pass type to say what the id refers to: 'artifact' (documents/HTML reports/inspiration pulls - the default), 'script' (the script's public review page, where the recipient can view it and leave comments - the same link the human Share-for-review button makes), 'static' (a static-ad batch's review page), 'swipe' (a swipe-file example), 'video' (a video cut's review page - the recipient watches it and can comment), 'raw' (one raw asset: an uploaded photo / video / audio / document, a generated image from image.generate, a saved clip, AI a-roll - the link shows the file and its name only, never its analysis), or 'collection' (a shareable - one link for many items). EVERYTHING AdBrain makes or holds can be shared; the one exception is a creator's profile reference (the photos / voice sample a face or voice is cloned from), which is refused with the reason. Use it when the user asks to share/send any of these. Optionally pass expires_hours to make the link expire; omit it for a link that never expires.","operationId":"invoke_artifact_share","requestBody":{"content":{"application/json":{"schema":{"properties":{"artifact_id":{"description":"The id of the item to share (artifact id, script id, static batch id, swipe example id, video cut id, raw asset id, or collection id - matching the type).","type":"integer"},"expires_hours":{"description":"Optional: hours until the link expires. Omit for never.","type":"integer"},"type":{"description":"What the id refers to. Defaults to 'artifact'. 'script' shares the script's public review page; 'video' a video cut's review page; 'raw' one raw asset (incl. generated images).","enum":["artifact","script","static","swipe","video","raw","collection"],"type":"string"}},"required":["artifact_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"artifact.share","tags":["artifact"],"x-long-running":false,"x-permission":"artifact.write"}},"/skills/artifact.update/invoke":{"post":{"description":"Revise an existing artifact (markdown document or HTML page) IN PLACE - new content and/or a new title on the SAME artifact id. Use this whenever the user wants a document or page you already delivered changed in ANY way: revise it, extend it with new findings, fix it, restructure it, retitle it. NEVER call artifact.create for a revision - that scatters the work across duplicate documents and the user loses track of which one is current. Read-then-write: content REPLACES the whole document, so first read the CURRENT FULL content (artifact.get; if that came back truncated, record.get entity_type='artifact' with fields=['content']) and send back the complete updated document with everything still relevant preserved. A dramatically shorter rewrite is refused with status 'needs_confirmation' unless genuinely intended (then resend with confirm_shrink=true).","operationId":"invoke_artifact_update","requestBody":{"content":{"application/json":{"schema":{"properties":{"artifact_id":{"description":"The artifact to update (from artifact.create, artifact.search, or the user's reference).","type":"integer"},"confirm_shrink":{"description":"Only after a shrink-guard refusal, once you've read the field's FULL current value and a big cut is genuinely intended.","type":"boolean"},"content":{"description":"The COMPLETE new content - it replaces the old, so include everything you're keeping. GitHub-flavored markdown for a document; a full <!doctype html> page for an html artifact.","type":"string"},"title":{"description":"New title, when the revision changed what the document IS.","type":"string"}},"required":["artifact_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"artifact.update","tags":["artifact"],"x-long-running":false,"x-permission":"artifact.write"}},"/skills/brand.analyze_material/invoke":{"post":{"description":"Analyze ONE file (brand guideline image, PDF, Word doc) and extract structured brand fields, colors, typography, and asset metadata. Works on EITHER a fresh chat attachment (chat_attachment_id - a file just dropped into chat, not yet classified) OR an item already saved in the Raw Assets library (raw_asset_id, from raw.list) - pass exactly one. Used inside orchestrated brand-bootstrap jobs \u2014 do not call alone when brand.bootstrap_from_materials applies.","operationId":"invoke_brand_analyze_material","requestBody":{"content":{"application/json":{"schema":{"properties":{"chat_attachment_id":{"description":"A fresh chat attachment's id (a file just dropped into chat). Pass this OR raw_asset_id, not both.","type":"integer"},"raw_asset_id":{"description":"An existing Raw Assets-library item's id (from raw.list). Pass this OR chat_attachment_id, not both.","type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"brand.analyze_material","tags":["brand"],"x-long-running":false,"x-permission":"brand.read"}},"/skills/brand.bootstrap_from_materials/invoke":{"post":{"description":"Set up a NEW brand from uploaded chat files (brand guidelines, PDFs, images, docs). ALWAYS use this instead of brand.create when the user attached ANY files to create a brand, when website import failed, or when there are 2+ uploads. Runs a full orchestrated checklist: analyze each file independently, merge the extractions, create the brand, fill every brand-page field (info, colors, typography, rules), save each file as a tagged raw asset, verify, then announce completion. Pass name, brand_type ('personal' for creators with no products), chat_attachment_ids (ALL chat-attachment/upload ids from the message), and optional user_notes / website. Returns a session card with a live to-do list \u2014 tell the user to watch it check off, then STOP.","operationId":"invoke_brand_bootstrap_from_materials","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_type":{"description":"Use personal for creators / organic social with no products.","enum":["dtc","personal","agency"],"type":"string"},"chat_attachment_ids":{"description":"ALL chat-attachment ids (freshly dropped, not-yet-classified files) to analyze and attach.","items":{"type":"integer"},"type":"array"},"name":{"description":"Brand or creator name.","type":"string"},"user_notes":{"description":"Any pasted context from the user message.","type":"string"},"website":{"description":"Website URL if known (even if scrape failed).","type":"string"}},"required":["name","chat_attachment_ids"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"brand.bootstrap_from_materials","tags":["brand"],"x-long-running":true,"x-permission":"brand.write"}},"/skills/brand.create/invoke":{"post":{"description":"Create a new brand manually with fields you already have \u2014 NO file analysis. Do NOT use this when the user attached upload files; use brand.bootstrap_from_materials instead. Use only for a bare manual shell (name + pasted notes, zero files).","operationId":"invoke_brand_create","requestBody":{"content":{"application/json":{"schema":{"properties":{"asset_role":{"description":"Default role for ingested uploads (logo, person, general, etc.). Defaults to general.","type":"string"},"brand_info":{"description":"Optional flat fields: long_text, long_text__1, founder_story, text__1 (website), long_text7, long_text8, link__1.","type":"object"},"brand_type":{"description":"Use 'personal' for creators/individuals with no product catalog.","enum":["dtc","personal","agency"],"type":"string"},"chat_attachment_ids":{"description":"Chat attachment ids (freshly dropped, not-yet-classified files) to save as brand raw assets after create.","items":{"type":"integer"},"type":"array"},"name":{"description":"Brand or creator name.","type":"string"},"products":{"description":"Optional manual products [{name, column_data}]. Not needed for personal brands.","type":"array"},"source_text":{"description":"Optional pasted brand guidelines or notes \u2014 AI extracts brand fields.","type":"string"},"status":{"enum":["Active","Draft","Inactive"],"type":"string"}},"required":["name"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"brand.create","tags":["brand"],"x-long-running":false,"x-permission":"brand.write"}},"/skills/brand.create_from_website/invoke":{"post":{"description":"Onboard a brand into AdBrain from its website URL. Scrapes the site, extracts the brand info and up to 10 products with AI, and saves it as a new brand owned by the user. Use this when the user wants to make ads but has no brand yet, or asks to add a brand from a link. Returns the created brand and its products. Takes roughly 20-40 seconds.","operationId":"invoke_brand_create_from_website","requestBody":{"content":{"application/json":{"schema":{"properties":{"url":{"description":"The brand's website URL (the homepage is fine).","type":"string"}},"required":["url"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"brand.create_from_website","tags":["brand"],"x-long-running":false,"x-permission":"brand.write"}},"/skills/brand.get/invoke":{"post":{"description":"Get full details for a single brand by its brand_id: brand info and voice, the full product list with their ids, and the brand's saved LANDING PAGES (id, name, headline, offer, url - pass a landing_page_id to script.write for offer/audience context), and its CREATORS - the people / AI characters the brand can make content FEATURING (creator_id, name, kind, whether they have reference photos, a cloned voice and tagged footage; pass creator_id to video.edit / static.generate). Call brand.list first to find the brand_id.","operationId":"invoke_brand_get","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The brand_id to fetch.","type":"string"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"brand.get","tags":["brand"],"x-long-running":false,"x-permission":"brand.read"}},"/skills/brand.list/invoke":{"post":{"description":"List the brands the user has in AdBrain, each with its products and ids. Personal/creator brands have brand_type 'personal', zero products, and suggested_product_id '__brand__' for script.write / static.generate. Each brand also has content_focus ('ads' | 'organic' | 'both'): an 'organic' brand makes native feed posts (use organic_video/organic_static/organic_carousel, never a paid ad), an 'ads' brand makes paid direct-response ads, 'both' goes by what the user asks. Each brand also has script_format ('scripted' | 'outline' | 'flexible'): 'outline' brands get bullet-point talking-point scripts their creators improvise from, 'scripted' brands get complete word-for-word lines \u2014 script.write applies this automatically; don't fight it unless the user overrides it for a specific script. EVERY brand the account has is listed - including status 'Draft' (a fresh import awaiting review) and 'Inactive' - with its status on the row. Draft brands are fully usable and editable; never tell the user a brand doesn't exist when it's in this list with any status. Rows are ordered Active first; when several brands share a name, use the ACTIVE one - Inactive namesakes are stale history, not the working brand. Use this before doing anything brand-specific.","operationId":"invoke_brand_list","requestBody":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"brand.list","tags":["brand"],"x-long-running":false,"x-permission":"brand.read"}},"/skills/brand.refresh_from_website/invoke":{"post":{"description":"Re-scrape an EXISTING brand's live website to pull FRESH product images and info onto the brand you already have. Adds products it's missing, refreshes info on existing products, and ingests new reference images, logo, and colors. Brand info is merged safely and SPECIALIZED BRAND RULES are preserved (never overwritten). Use for 'go grab fresh product pictures / new products from our site' on a brand that already exists. Takes roughly 20-40 seconds.","operationId":"invoke_brand_refresh_from_website","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The existing brand to refresh.","type":"string"},"update_existing":{"description":"Also refresh text/images on products that already exist (default true). New products are always added; products are never deleted.","type":"boolean"},"url":{"description":"The brand's website URL (homepage is fine).","type":"string"}},"required":["brand_id","url"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"brand.refresh_from_website","tags":["brand"],"x-long-running":false,"x-permission":"brand.write"}},"/skills/brand.set_colors/invoke":{"post":{"description":"Set or fix a brand's color palette RELIABLY. Use this whenever the user wants the brand colors corrected or replaced - e.g. 'the brand colors are wrong, here are the right ones', a pasted list of hex codes, a brand-kit screenshot, or a Notion/markdown brand-guide export. Pass `colors` for an explicit palette, or `from_upload_id` to pull the exact hexes out of a chat upload (document text is read with a regex; images are read with vision). Replaces the whole palette by default and returns exactly what was saved. ALWAYS prefer this over brand.update for any color-only change.","operationId":"invoke_brand_set_colors","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"type":"string"},"colors":{"description":"Explicit palette to save. Each item needs a hex like #1C355E; label (e.g. 'Navy') is optional.","items":{"properties":{"hex":{"type":"string"},"label":{"type":"string"}},"type":"object"},"type":"array"},"from_upload_id":{"description":"A chat upload id (brand-kit screenshot, PDF, Word doc, or Notion/markdown export) to pull the exact hex codes from.","type":"integer"},"replace":{"description":"True (default) replaces the whole palette. False merges the new colors in by hex, keeping current ones.","type":"boolean"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"brand.set_colors","tags":["brand"],"x-long-running":false,"x-permission":"brand.write"}},"/skills/brand.update/invoke":{"post":{"description":"Update an existing brand by MERGING new values in: basic/detailed info, rules, founder story, website, brand colors, typography, market awareness/saturation, content focus (ads/organic/both), and add_products for new products. Fields you omit (or pass empty) KEEP their current values \u2014 partial updates are safe and never wipe the brand page. Use for 'update our brand from this new deck', filling gaps after create, recording what you learned (e.g. 'they only do organic TikTok' -> content_focus='organic'), or adding products described in uploaded materials. When editing brand_info text (especially special_brand_rules/additional_brand_rules), read the CURRENT FULL value first (brand.get, not a summary) and write a replacement that preserves everything still relevant - never rewrite from a partial/truncated view. If your new text is dramatically shorter than what's currently saved, this is REFUSED with status 'needs_confirmation' (a guard against a truncated-view rewrite silently destroying curated content) unless you pass confirm_shrink=true.","operationId":"invoke_brand_update","requestBody":{"content":{"application/json":{"schema":{"properties":{"add_products":{"description":"NEW products to append (never replaces existing ones). Prefer separate basic_info + detailed_info so the two product fields aren't duplicates.","items":{"properties":{"basic_info":{"description":"SHORT 2-3 sentence overview of the product.","type":"string"},"description":{"description":"Legacy single blob; used as detailed_info only if basic_info/detailed_info are omitted.","type":"string"},"detailed_info":{"description":"COMPREHENSIVE details (ingredients, features, specs, positioning). Must NOT just repeat basic_info.","type":"string"},"name":{"type":"string"}},"type":"object"},"type":"array"},"brand_colors":{"description":"Full replacement palette. Omit to keep current colors.","items":{"properties":{"hex":{"type":"string"},"label":{"type":"string"}},"type":"object"},"type":"array"},"brand_id":{"type":"string"},"brand_info":{"description":"Flat fields to set: long_text (basic info), long_text__1 (detailed info), founder_story, long_text7 (special rules), long_text8 (additional rules), text__1 (website), link__1 (guidelines link), evergreen_offer (the brand's STANDING offer \u2014 e.g. 'Subscribe & Save 10%' \u2014 never a limited-time sale; a product's own Offer supersedes it). Empty/omitted keys keep their current values.","type":"object"},"brand_name":{"description":"New brand name (omit to keep).","type":"string"},"brand_typography":{"description":"Merged into current typography; empty values keep what's there.","properties":{"primary_font":{"type":"string"},"secondary_font":{"type":"string"}},"type":"object"},"confirm_shrink":{"description":"Only needed if a previous call was refused for replacing a brand_info field with text dramatically shorter than what's currently saved. Set true to proceed anyway once you've confirmed (from the FULL current value, not a summary) that the big cut is really intended.","type":"boolean"},"content_focus":{"description":"Whether this brand is focused on paid ADS, native ORGANIC content (feed-first, engagement-driven), or BOTH. Set it when the user signals it; omit to keep the current value.","enum":["ads","organic","both"],"type":"string"},"market_awareness":{"description":"How aware the market is of this kind of solution (brand-new category vs. everyone knows it). Omit to keep.","type":"string"},"market_saturation":{"description":"How crowded/competitive the space is (novel vs. saturated; rough competitor count). Omit to keep.","type":"string"},"script_format":{"description":"How scripts are written for this brand's creators: 'scripted' = complete word-for-word lines, 'outline' = bullet-point talking points they improvise from (must-say claims/CTA stay verbatim), 'flexible' (default) = whatever fits each concept. Set it when the user expresses the preference (e.g. 'our creators improvise, just give them beats'); omit to keep.","enum":["scripted","outline","flexible"],"type":"string"},"status":{"enum":["Active","Draft","Inactive"],"type":"string"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"brand.update","tags":["brand"],"x-long-running":false,"x-permission":"brand.write"}},"/skills/capabilities/invoke":{"post":{"description":"List everything AdBrain can do right now - the full catalog of skills (name, what each does, and its inputs). Use this when you're unsure whether AdBrain can do something, when planning a complex multi-step job, or when a user asks what you're capable of.","operationId":"invoke_capabilities","requestBody":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"capabilities","tags":["capabilities"],"x-long-running":false,"x-permission":"capabilities.read"}},"/skills/collection.get/invoke":{"post":{"description":"Open one of the user's folders by id and list EVERYTHING inside - swipe examples, scripts, documents, raw assets, static-ad batches, individually picked static ads and video cuts, each with its id and title. Use it whenever the user references a folder ('[reference: folder #3 ...]' or 'use the examples in my Whitening folder'). Then act on the contents per their instructions: swipe items via script.write swipe_file_example_id / static.generate example_ids / swipe.get; scripts via the script ids; documents via artifact.get. Read-only - never analyzes or changes anything.","operationId":"invoke_collection_get","requestBody":{"content":{"application/json":{"schema":{"properties":{"collection_id":{"description":"The folder id (from the reference or collection.list).","type":"integer"}},"required":["collection_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"collection.get","tags":["collection"],"x-long-running":false,"x-permission":"collection.read"}},"/skills/collection.list/invoke":{"post":{"description":"List the user's folders (shareable collections of saved work) with their names, item counts, and the brands referenced inside. Use it to find a folder the user mentions by name; then collection.get to see what's inside. Read-only.","operationId":"invoke_collection_list","requestBody":{"content":{"application/json":{"schema":{"properties":{},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"collection.list","tags":["collection"],"x-long-running":false,"x-permission":"collection.read"}},"/skills/collection.manage/invoke":{"post":{"description":"Create and maintain SHAREABLES - the hand-off folders a user shares with one public link (any mix of swipe examples, scripts, documents, raw assets, static batches, individually picked static ads, video cuts). Actions: 'create' (name, optional items), 'add' (collection_id + items [{type, id}]; duplicates are skipped), 'remove' (item_ids = the rows from 'get'), 'rename', 'sort' (manual | newest | oldest | title - also the order of the public page), 'share' (publish / return the public link, optional expiry hours), 'get' (contents), 'list'. Item types: swipe (swipe example id), script, artifact (document/report), raw (raw asset: an upload, a generated image, a clip), static (static-ad batch - the batch_id from static.generate / static.list; the public link shows the batch's first ad as the tile and opens every ad in it), static_ad (ONE static ad picked out of a batch - the ad's `id` from record.get entity_type='static_batch' `ads`; use this, not static, when the user wants only SOME ads of a batch shared - 'share the good ones', 'send ads 1, 3 and 7 for review', a delivery picked across several batches: one item per chosen ad, from as many batches as needed. The public link shows only the picked ads, each opening its own review page where reviewers draw on it and comment; the rest of the batch stays private. A revised ad is still one item and shows its newest version), video (a video cut - the edit id from video.edit / video.list; opens its review page). EVERY item type shows on the public link; the one exception is a raw asset that is a creator's profile reference (face / voice sample), which stays private - 'share' lists any such items in not_on_public_page. Use it when the user asks for a shareable / collection / folder of things to hand off - e.g. the 100 best examples, this week's scripts, the assets for a creator. Pick the contents with the list skills first (swipe.list with_signals=true for 'best of').","operationId":"invoke_collection_manage","requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"enum":["list","get","create","rename","add","remove","sort","share"],"type":"string"},"collection_id":{"description":"The shareable (for get / rename / add / remove / sort / share).","type":"integer"},"expires_hours":{"description":"share: link expiry in hours (omit = never expires).","type":"integer"},"item_ids":{"description":"remove: the item ROW ids (the 'id' of each entry returned by 'get'), not the swipe/script ids.","items":{"type":"integer"},"type":"array"},"items":{"description":"Items to add (create / add).","items":{"properties":{"id":{"type":"integer"},"type":{"enum":["swipe","script","artifact","raw","static","static_ad","video"],"type":"string"}},"required":["type","id"],"type":"object"},"type":"array"},"name":{"description":"Name (create / rename).","type":"string"},"sort_order":{"description":"sort: how the items are ordered (default for new shareables: newest).","enum":["manual","newest","oldest","title"],"type":"string"}},"required":["action"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"collection.manage","tags":["collection"],"x-long-running":false,"x-permission":"record.write"}},"/skills/creator.create/invoke":{"post":{"description":"Create a CREATOR profile: someone AdBrain will make things featuring. kind 'person' = a real person (founder, recurring creator), 'ai' = an AI character. brand_ids ties the profile to those brands (omit = usable with every brand). Pass reference_asset_ids to add photos (images) and voice samples (audio, or video of them talking) that are already in Raw Assets - bring new files in first with raw.upload (it can attach them itself: creator_ids + is_creator_reference). The first photo becomes the profile picture and its face is what AdBrain recognises them by. For a REAL person, reference photos, voice samples and a voice clone are only accepted after the USER ticks the permission box on the creator's profile (Creators page) - an agent cannot attest someone's consent. Tagging library files as featuring them needs no consent. Check creator.list first so you never create a second profile for the same person.","operationId":"invoke_creator_create","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_ids":{"description":"Brands this creator works with (from brand.list). Omit for every brand.","items":{"type":"string"},"type":"array"},"description":{"description":"Who they are and how they come across on camera - read by the editor and generators.","type":"string"},"kind":{"description":"'person' (a real person; default) or 'ai' (an AI character).","enum":["person","ai"],"type":"string"},"name":{"description":"The creator's name as the user says it ('Dylan Hayes').","type":"string"},"reference_asset_ids":{"description":"Raw asset ids to add to the profile: images = reference photos, audio / video = voice samples.","items":{"type":"string"},"type":"array"}},"required":["name"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"creator.create","tags":["creator"],"x-long-running":false,"x-permission":"creator.write"}},"/skills/creator.find/invoke":{"post":{"description":"SEARCH EXISTING RAW ASSETS FOR CREATORS and tag every image and video they appear in - 'identify all the creators in my footage', 'find Dylan in the Betterbrand library', 'who is in this folder'. It compares faces against each creator's reference photos (no language model), tags the files (raw_asset.creator_ids, creator_source 'auto') and never overrides a tag a person set by hand. WHO: creator_ids (omit = every creator AdBrain can recognise). WHERE, first one given wins: asset_ids (exactly these files) > folder_id (that Raw Assets folder and its subfolders) > brand_ids (those brands' files) > whole_library=true. With no scope it searches the brands the creators are tagged to (the whole library only when a creator is not tied to any brand) and reports what it picked (scope.auto_picked). Files already checked against the same reference photos are skipped unless recheck=true, so repeating a search is cheap and a stopped search resumes where it left off. COST: metered per frame sent to face search (an image = 1 frame, a video = up to 8); estimate_only=true returns files / frames / credits_estimate WITHOUT starting - do that first for anything large and tell the user the price. Starting returns at once with status 'started'; poll creator.find_status (every 15-30 s) and stop with creator.find_status stop=true. New uploads are checked automatically, so this is only for files that were already in the library.","operationId":"invoke_creator_find","requestBody":{"content":{"application/json":{"schema":{"properties":{"asset_ids":{"description":"Search exactly these raw assets.","items":{"type":"string"},"type":"array"},"brand_ids":{"description":"Search only these brands' files (from brand.list).","items":{"type":"string"},"type":"array"},"creator_ids":{"description":"Creators to look for (from creator.list). Omit for every creator with a learned face.","items":{"type":"string"},"type":"array"},"estimate_only":{"description":"true = report what would be checked and the credits it would cost, without starting.","type":"boolean"},"folder_id":{"description":"Search only this Raw Assets folder and its subfolders (raw.list brand_id=... returns the folders).","type":"integer"},"recheck":{"description":"true = also re-check files already checked against the same reference photos.","type":"boolean"},"whole_library":{"description":"true = every image and video in the account. Can be large - estimate first.","type":"boolean"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"creator.find","tags":["creator"],"x-long-running":true,"x-permission":"creator.write"}},"/skills/creator.find_status/invoke":{"post":{"description":"Progress of the library search started by creator.find - or stop it. Returns each creator with a search on record: status (running | done | stopped | failed), files done / total, matched (files that creator was found in), frames checked, credits charged so far, scope, and any error. stop=true stops the running search (the one creator_id is part of, or every running search when creator_id is omitted): files already checked stay tagged, only what was actually checked is charged, and running creator.find again continues with the files not checked yet. A 'running' status is healthy progress - keep polling every 15-30 s; never start a second search because it feels slow.","operationId":"invoke_creator_find_status","requestBody":{"content":{"application/json":{"schema":{"properties":{"creator_id":{"description":"Optional: one creator's search. Omit for every creator.","type":"string"},"stop":{"description":"true = stop the running search.","type":"boolean"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"creator.find_status","tags":["creator"],"x-long-running":false,"x-permission":"creator.read"}},"/skills/creator.get/invoke":{"post":{"description":"Open ONE creator profile in full: name, kind, description, brand_ids, consent, reference_images (asset ids, which is the profile picture, whether its face is enrolled), voice_samples, the cloned voice (has_voice, voice_status, voice_error), tagged_asset_ids (every library file they appear in; tagged_assets = the count) and scan_state (the latest library search: status, files done / total, matched, frames, credits). Same data as record.get entity_type='creator'.","operationId":"invoke_creator_get","requestBody":{"content":{"application/json":{"schema":{"properties":{"creator_id":{"description":"The creator's id (from creator.list).","type":"string"},"fields":{"description":"Optional: long text fields to return in full (e.g. ['description']).","items":{"type":"string"},"type":"array"}},"required":["creator_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"creator.get","tags":["creator"],"x-long-running":false,"x-permission":"creator.read"}},"/skills/creator.list/invoke":{"post":{"description":"List the account's CREATOR profiles - the real people (founder, recurring creators) and AI characters AdBrain makes things featuring. Each row: id, name, kind ('person' | 'ai'), brand_ids (empty = every brand), profile_picture_asset_id, faces_enrolled (how many reference photos AdBrain can recognise them from), has_voice / voice_status (the cloned voice), consent, tagged_assets (library files they appear in) and scan_state (the latest library search). Optionally filter to one brand (also returns creators not tied to any brand). Use a creator by passing its id as creator_id to video.edit / static.generate (add generate_aroll=true on video.edit to have them generated performing a script on camera when it was never filmed), and see their footage with raw.list creator_id=<id>. creator.get opens one profile in full.","operationId":"invoke_creator_list","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"Optional brand_id (from brand.list): that brand's creators plus the ones not tied to a brand.","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"creator.list","tags":["creator"],"x-long-running":false,"x-permission":"creator.read"}},"/skills/creator.update/invoke":{"post":{"description":"Change anything on a CREATOR profile, any mix in one call (only what you pass changes): name, kind, description, brand_ids (the FULL list; [] = every brand), profile_picture_asset_id (one of their reference photos), add_reference_asset_ids / remove_reference_asset_ids (raw assets used as profile references: an image = a reference photo whose face is learned, audio or a video of them talking = a voice sample; removing keeps the file in the library, still tagged as them), tag_asset_ids / untag_asset_ids (say which library files they appear in - other people already tagged on a file are kept; a hand tag is never overridden by face matching) and voice_action 'clone' (build or rebuild the cloned voice from the voice samples: needs 10+ seconds of clear speech, takes under a minute, read voice_status with creator.get) or 'delete'. For a REAL person, reference photos, voice samples and a voice clone are only accepted after the USER ticks the permission box on the creator's profile (Creators page) - an agent cannot attest someone's consent. Tagging library files as featuring them needs no consent. Files not in AdBrain yet: raw.upload first. To find them in existing footage automatically use creator.find. Delete a profile with record.delete entity_type='creator'.","operationId":"invoke_creator_update","requestBody":{"content":{"application/json":{"schema":{"properties":{"add_reference_asset_ids":{"description":"Raw asset ids to add to the profile as reference photos (images) or voice samples (audio / video).","items":{"type":"string"},"type":"array"},"brand_ids":{"description":"The FULL list of brands this creator works with ([] = every brand).","items":{"type":"string"},"type":"array"},"confirm_shrink":{"description":"Only after a shrink-guard refusal on description, once you've read the full current text.","type":"boolean"},"creator_id":{"description":"The creator's id (from creator.list).","type":"string"},"description":{"description":"Who they are and how they come across on camera. '' clears it.","type":"string"},"kind":{"enum":["person","ai"],"type":"string"},"name":{"type":"string"},"profile_picture_asset_id":{"description":"Which of their reference photos is the profile picture (it is handed to generators first).","type":"string"},"remove_reference_asset_ids":{"description":"Raw asset ids to stop using as profile references (the files stay in the library).","items":{"type":"string"},"type":"array"},"tag_asset_ids":{"description":"Raw asset ids this creator APPEARS in (library footage / photos).","items":{"type":"string"},"type":"array"},"untag_asset_ids":{"description":"Raw asset ids this creator does NOT appear in - removes them from the file's people.","items":{"type":"string"},"type":"array"},"voice_action":{"description":"'clone' builds / rebuilds the cloned voice from the voice samples; 'delete' removes it.","enum":["clone","delete"],"type":"string"}},"required":["creator_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"creator.update","tags":["creator"],"x-long-running":false,"x-permission":"creator.write"}},"/skills/feedback.submit/invoke":{"post":{"description":"Log a feature request or product feedback for the AdBrain team. Use this when the user asks for a capability AdBrain does NOT have yet (e.g. AI voiceover/audio, a fully rendered video, an integration we don't support) after you've told them it's not available \u2014 offer to log it and, if they agree, call this. Also use it whenever the user explicitly gives feedback or requests a feature. Pass a clear `message` (what they want, in their words / your faithful paraphrase), a `category` (feature | bug | other), and optional `context` (what they were trying to do). Confirm to the user that you've logged it.","operationId":"invoke_feedback_submit","requestBody":{"content":{"application/json":{"schema":{"properties":{"category":{"description":"feature (default), bug, or other.","enum":["feature","bug","other"],"type":"string"},"context":{"description":"Optional: what the user was trying to do when this came up.","type":"string"},"message":{"description":"The feature request / feedback, clearly stated.","type":"string"}},"required":["message"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"feedback.submit","tags":["feedback"],"x-long-running":false,"x-permission":"feedback.submit"}},"/skills/folder.manage/invoke":{"post":{"description":"Manage the library's FOLDERS like a file manager - the same powers the user has in Raw Assets and the Script Library. kind='asset' folders hold raw assets (footage, photos, graphics, audio, documents); kind='script' folders hold scripts. Folders belong to ONE brand and nest. Actions: 'list' (the brand's folder tree with counts), 'create' (name + brand_id, optional parent_folder_id), 'rename', 'move' (re-nest a folder: parent_folder_id, null = brand root), 'delete' (SOFT delete: contents move up to Unfiled unless delete_contents=true, which trashes them with the folder - all recoverable), 'restore' (bring a trashed folder back, with whatever was trashed with it), 'file' (put raw assets or scripts INTO a folder: item_type + item_ids + target_folder_id, null = unfile; brand_id picks which brand's tree when unfiling), 'trash' (what is recoverable). MULTI-BRAND ASSETS: an asset tagged to several brands (brand_ids) is filed INDEPENDENTLY in each brand's folder tree - the same file can sit in 'Founder B-roll' for one brand and 'Travel' for another (its primary brand's place is folder_id; every other brand's place is a shortcut, shown as shortcut_folders). Filing it in one brand's folder never moves it in the others'. Use it to organize a brand's material so edits can find things fast - a sensible default is 'A-roll' (talking to camera), 'B-roll' (lifestyle / product / in-use), 'Essentials' (logo, packshots, graphics, music) - but the USER's own folders and preferences always win: never rename, move or dissolve folders the user made without being asked. Permanent deletion is intentionally NOT available to AdBrain (a safety feature): say so and point the user to the Trash page when they want something gone for good.","operationId":"invoke_folder_manage","requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"enum":["list","create","rename","move","delete","restore","file","trash"],"type":"string"},"brand_id":{"description":"The brand (brand.list). Required for list/create. For file with target_folder_id=null: which brand's tree to unfile from (default: each asset's primary brand).","type":"string"},"delete_contents":{"description":"delete only: also trash the items and subfolders inside (default false = they move up to Unfiled / the parent). Everything stays recoverable.","type":"boolean"},"folder_id":{"description":"The folder to rename / move / delete / restore.","type":"integer"},"item_ids":{"description":"file only: the raw asset ids or script ids to file.","items":{"type":"integer"},"type":"array"},"item_type":{"description":"file only: what the item_ids are.","enum":["raw_asset","script"],"type":"string"},"kind":{"description":"'asset' (raw assets; default) or 'script' (scripts). Needed for list/create.","enum":["asset","script"],"type":"string"},"name":{"description":"Folder name (create / rename).","type":"string"},"parent_folder_id":{"description":"Parent folder for create/move. null or omitted = brand root.","type":["integer","null"]},"query":{"description":"trash only: filter by name.","type":"string"},"target_folder_id":{"description":"file only: destination folder (must belong to the items' brand and match item_type's kind). null = unfile.","type":["integer","null"]}},"required":["action"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"folder.manage","tags":["folder"],"x-long-running":false,"x-permission":"record.write"}},"/skills/goal.update/invoke":{"post":{"description":"Manage this chat's SESSION GOAL (the standing objective the user set with /goal, shown to you as [SESSION GOAL]). action='done' marks it met - call this ONLY when every part of the goal is actually delivered (the deliverables exist), never on intent. action='set' with `goal` saves or replaces the goal when the user states the overarching objective for the conversation in plain words ('the goal here is...', 'by the end I want...'). action='clear' drops it when the user says to. Read-only otherwise: action='get' returns the current goal.","operationId":"invoke_goal_update","requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"description":"get | set (with goal) | done | clear","enum":["get","set","done","clear"],"type":"string"},"goal":{"description":"For action='set': the goal, in the user's own words.","type":"string"}},"required":["action"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"goal.update","tags":["goal"],"x-long-running":false,"x-permission":"read"}},"/skills/idea.list/invoke":{"post":{"description":"List the rough ideas the user saved to work on later (from idea.save / Rough Ideas). Use this when the user wants to act on remembered ideas - 'write scripts from my saved ideas', 'what ideas do I have for [brand]?', 'work through my list'. Returns each idea's id, note, example_link, and brand. Defaults to UNUSED ideas (still waiting to be made); pass include_used=true to also see ones already handled, and brand_id to filter to one brand.","operationId":"invoke_idea_list","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"Only ideas for this brand (from brand.list).","type":"string"},"include_used":{"description":"Also include ideas already used (default false).","type":"boolean"},"limit":{"description":"Max ideas to return (default 50).","type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"idea.list","tags":["idea"],"x-long-running":false,"x-permission":"brand.read"}},"/skills/idea.save/invoke":{"post":{"description":"Remember a rough ad idea, or a whole batch of them, for later (saved to the user's Rough Ideas). Use this when the user pastes/dumps a bunch of ideas, notes, and reference links together (a Notion doc, a list of 'things to make') and wants AdBrain to REMEMBER each one to write scripts from later - NOT to make anything right now. Pass a batch with `ideas` (a list of {idea, example_link, brand_id}), or one with `idea` + optional `example_link` + `brand_id`. `idea` is the note: what the user wants to do with it (the angle, instruction, or concept). `example_link` is an optional reference link to copy (TikTok/IG/etc or a saved swipe link) - it is STORED, not analyzed now. `brand_id` (from brand.list) ties the idea to a brand so it can be scripted later; resolve the brand FIRST with brand.list. Does not write scripts or analyze links - it only remembers.","operationId":"invoke_idea_save","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"Optional brand_id for the single idea.","type":"string"},"example_link":{"description":"Optional reference link for the single idea.","type":"string"},"idea":{"description":"A single idea note (use instead of `ideas` for one).","type":"string"},"ideas":{"description":"A batch of ideas to remember in one call.","items":{"properties":{"brand_id":{"description":"Optional brand_id (from brand.list) this idea is for.","type":"string"},"example_link":{"description":"Optional reference link to copy (stored, not analyzed now).","type":"string"},"idea":{"description":"The note: what to do with this idea (angle/instruction/concept).","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"idea.save","tags":["idea"],"x-long-running":false,"x-permission":"brand.write"}},"/skills/image.edit/invoke":{"post":{"description":"Edit or transform an EXISTING image with GPT Image 2.5 from a plain-language instruction (e.g. 'make the teeth clean and white', 'remove the background', 'put the product on a marble counter'). This is NOT for making ads and does not add headlines or marketing copy. Provide the source image as either image_url (a public link) OR asset_id (a Raw Asset in AdBrain). Pass count to make multiple variations of the same edit. Optionally brand_id/product_id for brand context. Returns the edited image URL(s) and saves them to Raw Assets, marked is_reference_excluded (a generated image is never picked automatically as a product's reference photo; to use one in a static anyway, hand-pick it with static.generate reference_asset_ids). If the user wants a polished advertisement instead, use static.generate.","operationId":"invoke_image_edit","requestBody":{"content":{"application/json":{"schema":{"properties":{"aspect_ratio":{"description":"Output shape. Defaults to matching the source image.","enum":["1:1","4:5","5:4","3:2","2:3","3:4","4:3","9:16","16:9"],"type":"string"},"asset_id":{"description":"Or the id of an existing Raw Asset to edit (raw.list).","type":"integer"},"brand_id":{"description":"Optional brand for context (brand.list).","type":"string"},"count":{"description":"How many variations of this edit to make (1-4). Defaults to 1.","type":"integer"},"image_url":{"description":"A public URL of the source image to edit.","type":"string"},"instruction":{"description":"What to change about the image, in plain language. Keep it SHORT (1-3 sentences): say what to change and that everything else stays the same. The source image carries the detail.","type":"string"},"product_id":{"description":"Optional product within that brand (brand.list).","type":"string"},"script_id":{"description":"The script this edited image is FOR: the result is attached to that script's raw assets so the brief and the editor see it.","type":"integer"}},"required":["instruction"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"image.edit","tags":["image"],"x-long-running":false,"x-permission":"image.write"}},"/skills/image.generate/invoke":{"post":{"description":"Generate a brand-new image from a text description using GPT Image 2.5. This is for PLAIN image creation - NOT an advertisement (no headline, CTA, or marketing layout, no text added unless the prompt explicitly asks). Use it when the user wants an image, illustration, render, or product visual made from scratch. Optionally pass brand_id and product_id (from brand.list) and AdBrain will use the brand's real product photos as reference so the product looks accurate - ONLY photos assigned to that product are used (pass product_id whenever a product is shown; with brand_id alone only the brand's product-less images are used, never some product's photos). To change an existing image instead, use image.edit. If it's unclear whether the user wants a polished ad (use static.generate) or just a plain image, ask them first. Returns image URLs and saves them to the user's Raw Assets, marked is_reference_excluded (a generated image is never picked automatically as a product's reference photo; to use one in a static anyway, hand-pick it with static.generate reference_asset_ids). A SOCIAL COMMENT image (a comment or comment-reply bubble for a video) must look like the real thing on the platform - TikTok unless the user names another: a plain WHITE rounded reply sticker with a small grey 'Reply to <username>'s comment' line and the comment in bold black, on a plain light background. Never dark mode, never brand colours or a coloured edge, never a designed card. For a comment-reply VIDEO you usually do not need this image at all: the video editor draws the native sticker itself from the hook's on-screen text.","operationId":"invoke_image_generate","requestBody":{"content":{"application/json":{"schema":{"properties":{"aspect_ratio":{"description":"Image shape. Defaults to 1:1.","enum":["1:1","4:5","5:4","3:2","2:3","3:4","4:3","9:16","16:9"],"type":"string"},"brand_id":{"description":"Optional brand to pull reference product photos from (brand.list).","type":"string"},"count":{"description":"How many images to make (1-4). Defaults to 1.","type":"integer"},"product_id":{"description":"Optional product within that brand (brand.list). Its reference photos are the images ASSIGNED to this product - nothing else is used.","type":"string"},"prompt":{"description":"What the image should depict. Be specific but SHORT: 2-3 sentences, one paragraph at the absolute most. Reference photos (when brand_id/product_id are passed) carry the product's appearance \u2014 never describe packaging in prose.","type":"string"},"script_id":{"description":"The script this image is FOR (a visual for a hook, a b-roll still, a product render for its brief). The saved raw asset is attached to that script's RAW ASSETS so the editor and the brief see it - pass it whenever the image is made in service of a script.","type":"integer"},"system_reference_images":{"description":"Built-in reference images that ship with AdBrain (not brand assets). 'tung_tung_tung_sahur' = Tung Tung Tung Sahur / Triple T, Cortex's favorite brainrot character - pass it whenever the user wants him in the image, and still name him in the prompt (the reference carries his exact look).","items":{"type":"string"},"type":"array"}},"required":["prompt"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"image.generate","tags":["image"],"x-long-running":false,"x-permission":"image.write"}},"/skills/inspiration.find/invoke":{"post":{"description":"Find fresh ad INSPIRATION (real ads + emulatable organic formats) for a brand. Use this when the user asks to 'find ideas', 'find inspiration', 'what should we make', 'find examples to copy/emulate' and does NOT give a specific link. HOW IT WORKS NOW: this launches a DEEP SESSION - a background crawl of the Meta Ad Library, the TikTok Ad Library, and organic TikTok/YouTube Shorts/Instagram Reels that deep-vets every candidate (full transcript, AI content summary, vision on the actual creative, real ad performance data, viewer comments) before serving it. It takes roughly 15-60 minutes and the pull card fills in live as finds survive the vetting; PROVEN swipe-file matches (global + the user's own) appear on the card immediately. After calling this, TELL THE USER the crawl is running and to come back in a bit (or watch the card) - then STOP; do not try to find inspiration yourself and do not call this again in the same turn. A pull may honestly finish with fewer ideas than asked when the crawl couldn't verify enough on-request finds - that is correct behavior, not a failure. The account's FOLLOWED SOURCES (inspiration.follow / Settings > Inspiration sources) are consulted automatically on every session. STYLE/FORMAT/LENGTH requests are supported: pass the user's ask verbatim as theme and set min/max_duration_seconds when they name a length. SPECIFIC-BRAND requests ('pull inspiration from IM8') MUST set competitor_brands=[that brand]: those pulls serve that brand's Meta Ad Library inventory EXCLUSIVELY and finish in one pass (no session). If the user wants a specific brand AND general ideas, make two separate calls. Requires brand_id (call brand.list first if you don't have it).","operationId":"invoke_inspiration_find","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The brand to find inspiration for (from brand.list).","type":"string"},"competitor_brands":{"description":"Specific brand NAMES the user wants ads from. EXCLUSIVE: the pull is served ONLY from these brands' Meta Ad Library inventory, instantly (no session). Each named brand is auto-added to the followed 'stalk list'.","items":{"type":"string"},"type":"array"},"count":{"description":"How many vetted ideas to aim for. Default 6, hard max 20 (each survivor costs real vetting work).","type":"integer"},"creators":{"description":"Specific TikTok account handles to pull ideas from when the user names creators. The user's saved favored creators are ALWAYS included automatically.","items":{"type":"string"},"type":"array"},"include_library":{"description":"Whether to pre-fill the pull with PROVEN swipe-file matches (global + the user's own) while the crawl runs. Defaults to true.","type":"boolean"},"max_duration_seconds":{"description":"Only keep videos at most this long (seconds). Video-ad sessions default to 180s - only set this when the user names a bound.","type":"integer"},"media_types":{"description":"Which creative formats to find. Omit for all. Statics/carousels are served from the Meta Ad Library.","items":{"enum":["video","image","carousel"],"type":"string"},"type":"array"},"min_duration_seconds":{"description":"Only keep videos at least this long (seconds). SET THIS whenever the user asks for a length or a long format.","type":"integer"},"product_id":{"description":"Optional product to focus on.","type":"string"},"recency":{"description":"How fresh organic results must be. Default 'month'.","enum":["week","month","3months","year","all"],"type":"string"},"search_queries":{"description":"YOUR own hand-crafted organic search queries (3-6), used INSTEAD of the brief's auto-generated ones for TikTok/YouTube keyword search. Omit to let the session plan its own queries from brand + theme.","items":{"type":"string"},"type":"array"},"sources":{"description":"Which sources to crawl. Omit for all. 'meta' = Facebook/Instagram Ad Library, 'tiktok_ads' = TikTok's public Ads Library (real paid TikTok ads), 'tiktok'/'youtube'/'instagram' = organic short-form.","items":{"enum":["meta","tiktok_ads","tiktok","youtube","instagram"],"type":"string"},"type":"array"},"stalk_competitors":{"description":"When true, the crawl also stalks the curated DTC competitor watchlist in the Meta Ad Library. Set true for competitor/ad-focused requests.","type":"boolean"},"theme":{"description":"What the user is looking for, in THEIR OWN words - include every audience, style, format, and length requirement they stated. The crawl brief, every search query, and the per-candidate judge all read this verbatim, so detail here directly improves the results.","type":"string"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"inspiration.find","tags":["inspiration"],"x-long-running":true,"x-permission":"swipe.write"}},"/skills/inspiration.follow/invoke":{"post":{"description":"Manage the account's FOLLOWED inspiration sources - the creators and advertisers AdBrain 'stalks' on every inspiration pull. action='list' shows everything currently followed (organic creator feeds + Meta Ad Library advertisers, including the curated global starter set). action='add' follows a new source: pass platform ('tiktok'/'youtube'/'instagram' for ORGANIC creators, 'meta' for an ADS advertiser page) and handle (creator handle or brand name); the profile is verified LIVE so you can confirm the right account was matched - report the matched name/followers back to the user. action='remove' unfollows by source_id (from list). USE THIS PROACTIVELY: when the user mentions creators they admire, accounts they want to learn from, or competitor brands whose ads they watch ('I love X', 'we study Y's ads'), OFFER to follow them - most users don't know this capability exists, and followed sources are exactly how inspiration pulls become tailored to their taste instead of generic keyword searches. Also good during onboarding: ask who they'd like stalked.","operationId":"invoke_inspiration_follow","requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"enum":["list","add","remove"],"type":"string"},"handle":{"description":"For add: the creator handle (no @) or, for meta, the brand/advertiser name (e.g. 'Ritual').","type":"string"},"notes":{"description":"For add: optional one-liner on why (e.g. 'user's favorite hook style').","type":"string"},"platform":{"description":"For add: where the source lives. 'meta' = a brand's ads in the Meta Ad Library; the rest are organic creator feeds.","enum":["tiktok","youtube","instagram","meta"],"type":"string"},"source_id":{"description":"For remove: the id from action='list'.","type":"integer"}},"required":["action"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"inspiration.follow","tags":["inspiration"],"x-long-running":false,"x-permission":"swipe.write"}},"/skills/memory.recall/invoke":{"post":{"description":"CROSS-CHAT RECAP (not for the current conversation - that is already in front of you): what this account has been doing recently in OTHER chats: recent chats (titles + summaries), recently created artifacts, swipe-file saves, scripts, and raw assets over a rolling window (default 7 days, up to 30), plus saved long-term memories. Use this INLINE whenever the user asks what you remember, what's new, what you've been working on together, or wants a recap - it's one free call, so answer directly from it. Do NOT start an orchestrated session or create artifacts just to answer a memory question. Read-only. Each long-term memory carries saved_by (which member's chats it came from) and saved_by_me (true = the person you're talking to right now). Memories are org-shared, but PERSONALIZE with them: when a memory is preference-like or two memories pull in different directions, weight the current user's own (saved_by_me=true) over a teammate's - their preferences describe THEM.","operationId":"invoke_memory_recall","requestBody":{"content":{"application/json":{"schema":{"properties":{"days":{"description":"Rolling window in days (default 7, max 30).","type":"integer"},"limit":{"description":"Max items per category (default 10, max 25).","type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"memory.recall","tags":["memory"],"x-long-running":false,"x-permission":"memory.read"}},"/skills/memory.save/invoke":{"post":{"description":"LONG-TERM MEMORY - save one durable nugget at the organization level so it survives across conversations and every user in the org. HIGH BAR: only save if you'd genuinely need to recall it in a SEPARATE future session to act correctly, AND it isn't already stored in a record. It should be hard to answer yes, but obvious when it is. SAVE durable guidance that changes how you ACT GOING FORWARD, in two tiers: category 'rule' = a HARD constraint that must hold everywhere and has no record field of its own (a brand name's exact spelling/casing, 'never reference the founders' smoothie-blend era'); category 'preference' = a SOFTER standing lean about the output ('prefers branded-style captions', 'dislikes rhetorical-question hooks'). Both are ALWAYS injected into future generation for that brand and supersede conflicting base brand data - pass brand_id when brand-specific. THE PREFERENCE TEST: a rule/preference tells future-you how to BEHAVE; a sentence that merely DESCRIBES what happened or what was made ('deployed the campaign across formats X, Y, Z') is a story, not a preference - never save it under any category. Proven performance learnings ARE worth saving ('INTV404_v2 had a strong hook rate - do more branded-style') - keep the project identifier in the text so associative recall connects it. Also save durable who's-who. DO NOT save: brand/product COMPLIANCE rule text - banned words/phrases, claim restrictions, legal constraints on what can be said about the products. Those belong IN FULL in the record humans open (brand.update special_brand_rules/additional_brand_rules, or product.update detailed_info) - the record is the source of truth and generation reads it every time. Never split a compliance list across several memories and never leave a record field pointing at 'saved memory rules' - if a record field would reference memory, you have it backwards. Also DO NOT save: descriptions of a session/campaign, the existence of records (a persona/script/example being created - those are listable), raw brand/product DATA (colors, ingredients, specs, product lineup, pricing, URLs - update the brand/product record instead), things the system already knows or controls (app settings, how AdBrain works), present-tense task statements ('user gave me docs to work on'), one-off instructions, or anything already stored. CRITICAL - NEVER save a narration of ONE specific deliverable's execution details ('user decided to use the white-stain demo format for this toothpaste script', 'used swipe example #250 for this gel ad', 'combined these 3 products into this bundle static') - that is retrievable from the script/static library or the recent chat, and saving it just clutters memory with one-off task noise instead of durable, reusable guidance. One short sentence; when in doubt, DON'T save. BRAND ATTRIBUTION IS MANDATORY: if the memory is about, or was learned from, ONE specific brand, you MUST pass its brand_id (from brand.list). Brand tags are how memory privacy works - a brand-tagged memory is hidden from members whose access doesn't include that brand, while an UNTAGGED memory is org-wide and surfaces for EVERY brand and EVERY member. Only leave brand_id off when the memory genuinely applies to the whole organization (who's-who, org-wide preferences).","operationId":"invoke_memory_save","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"Optional brand scope (from brand.list) when it's about one brand.","type":"string"},"category":{"description":"What kind of memory this is.","enum":["org","user","brand","preference","fact","rule"],"type":"string"},"content":{"description":"The memory itself - one short, self-contained sentence or two.","type":"string"},"tags":{"description":"Comma-separated RECALL HANDLES - the words someone would later use to reach for this memory: brand name, product names, project identifiers (e.g. INTV404_v2), people, the topic (editing, hooks, pricing...). Strongly recommended: tags are matched by both keyword and semantic recall.","type":"string"}},"required":["content"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"memory.save","tags":["memory"],"x-long-running":false,"x-permission":"memory.write"}},"/skills/memory.search/invoke":{"post":{"description":"Search EVERYTHING this account knows in one call: swipe-file analyses, script hooks and bodies, brand records/products/rules, raw-asset labels and transcripts, personas, landing pages, saved research documents, and remembered brand facts. Swipe examples and raw assets also carry niche/category/format TAGS (e.g. 'real estate', 'skincare', 'ugc', 'before/after'), so you can find references by niche even when the title doesn't say it. Matches BOTH on exact keywords AND on MEANING (semantic/vector search), so it finds the right record even when the wording differs from yours ('our usual pricing angle' can surface a memory phrased another way). USE THIS FIRST whenever the user references past work ('that hook we wrote', 'the ad with the dentist', 'what did we decide about Brenda', 'our usual angle for X') or you need a fact you don't have - it's fast, cheap, and beats guessing or paging through list calls. Pass a short natural-language phrase or a few keywords (it'll match by meaning too, so you don't need exact words; on a miss retry with different phrasing), optionally narrow with sources[] and/or brand_id. Returns ranked snippets with an 'open_with' hint telling you exactly how to fetch the full record for the hits that matter. Read-only.","operationId":"invoke_memory_search","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"Optional brand scope (from brand.list).","type":"string"},"limit":{"description":"Max results (default 12, cap 30).","type":"integer"},"query":{"description":"A short phrase or a few keywords (e.g. 'gum recession dentist hook' or 'how we usually price'). Matches by meaning as well as exact words.","type":"string"},"sources":{"description":"Optional: limit to specific stores. Omit to search everything.","items":{"enum":["swipe","script","brand","raw","persona","landing","artifact","chat_memory","chats","winners"],"type":"string"},"type":"array"}},"required":["query"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"memory.search","tags":["memory"],"x-long-running":false,"x-permission":"memory.read"}},"/skills/orchestrate/invoke":{"post":{"description":"Hand off a BIG, multi-part or multi-brand job to AdBrain's orchestrator instead of doing it yourself in one turn. Use this when the request clearly needs many separate pieces of work - e.g. 'make a content plan for each of my brands', 'find 5 ideas for every active brand and write a script for each', 'onboard these brands and make statics + scripts for all of them', or any explicit 'plan this / do all of this / for every brand' ask. AdBrain plans it into a checklist and runs parallel sub-brains (each with the full skill set + web search), bundling everything into one shareable session deliverable the user can watch fill in. Pass a clear, complete 'goal' (include brand/product ids you've already resolved) and any 'inputs' you have. After calling it, tell the user you've kicked off the job and the session card will fill in - then STOP; do not also do the work yourself. For a single script, one batch of statics, or a quick lookup, use the specific skill directly instead of this. GOAL-WRITING: when launched from a chat, the recent conversation (including the CONTENTS of inspiration pulls and other artifact cards shown in it) is attached to the planner and every sub-brain AUTOMATICALLY - you never need to re-type idea urls/example ids into the goal, and the user's explicit picks in the chat override everything. The goal must still name every deliverable with its exact count and type (e.g. '2 UGC creator video scripts, 2 trending-sound scripts, 10 static ads, 3 carousels'), the brand_id/product_id, and constraints (compliance rules, personas, angles). External/MCP callers have no chat, so their goal must be fully self-contained. Reference swipe examples by id in inputs.swipe_file_example_ids - and note that scripts follow ONE example each (script.write swipe_file_example_id) while statics take several (static.generate example_ids). BATCHES: one session RUNS at most 10 deliverable steps (past that writing quality drops) - a bigger goal is NOT refused: the first batch runs, the remaining steps are saved on the session, and the wrap-up asks the user whether to continue. When the user says yes, call this skill with continue_previous=true (goal can be a short note like 'continue the remaining scripts') - the saved steps run as-is, nothing is re-planned and no examples are re-chosen.","operationId":"invoke_orchestrate","requestBody":{"content":{"application/json":{"schema":{"properties":{"continue_previous":{"description":"Set true when the user agreed to continue the steps a previous session in this chat saved beyond the deliverable cap ('yes, do the rest'). The newest session with saved steps is picked up; those steps run exactly as saved. Nothing is re-planned, so don't rewrite the deliverables into the goal.","type":"boolean"},"continue_task_id":{"description":"Explicit session task_id to continue (instead of continue_previous). Use when the user points at a specific earlier session.","type":"string"},"goal":{"description":"The full, self-contained goal in plain language. Include brand/product ids you've already resolved so the planner doesn't have to guess.","type":"string"},"inputs":{"description":"Optional structured context. Use these EXACT keys so the planner binds them: brand_ids (list), swipe_file_example_ids (list - user-picked swipe examples to follow), chat_attachment_ids (list - files just dropped in chat, not yet classified), folder_example_ids (list), urls (list), count, theme. USER PICKS ARE ENFORCED: the plan is checked against the swipe examples the user attached in this chat (or swipe_file_example_ids when launched without a chat) and REFUSED before anything runs if any step follows an example they didn't pick. examples_confirmed_by_user (bool) - set true ONLY after the user explicitly said examples beyond their picks are fine ('pick the rest yourself', 'use #41 too').","type":"object"}},"required":["goal"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"orchestrate","tags":["orchestrate"],"x-long-running":true,"x-permission":"orchestrate.write"}},"/skills/organic.brief/invoke":{"post":{"description":"ON-DEMAND ONLY: a written retrospective of the brand's REAL organic results on its connected social accounts (this week vs last: which hooks, angles, formats and platforms earned views, saves, shares and follows; which of OUR cuts beat the account's baseline; best posting times; next posts). It is NOT generated automatically and NOT injected into creative work - the live feedback loop is performance.winners (the specific winning posts + their creative elements, already in context for every script/static/cut). Call this only when the user explicitly asks for a written organic report; refresh=true rebuilds it from the live numbers now (~20s). For raw numbers or a specific post use organic.performance_get.","operationId":"invoke_organic_brief","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The brand whose brief to read/build (required).","type":"string"},"refresh":{"description":"true = regenerate from the live numbers now. Default: return the stored brief, generating one only if none exists yet.","type":"boolean"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"organic.brief","tags":["organic"],"x-long-running":false,"x-permission":"performance.read"}},"/skills/organic.performance_get/invoke":{"post":{"description":"REAL ORGANIC results for a brand's OWN connected social accounts (TikTok, Instagram, YouTube, Facebook, X, LinkedIn, Threads, Pinterest...) - the organic twin of performance.get. Returns the window's totals vs the previous window (views, reach, likes, comments, shares, saves, clicks, follows, engagement rate), the per-platform split, follower growth, and the TOP POSTS with lifetime metrics (plus avg watch time / completion / skip rate / profile views / traffic sources where the platform reports them). Each post carries 'adbrain' lineage when AdBrain made it: the cut (video_edit) and the script + hook index behind it - so you can say 'script #12 hook 2 did 48k views, hook 1 did 9k' and iterate on the winner. Posts published outside AdBrain are included (no lineage) so our work is always measured against the account's own baseline. Pass post=<social_post id | platform URL | post id> for ONE post's full metrics, per-platform copies, retention curve and daily timeline. Use it whenever the user asks how organic content / a post / their TikTok or Instagram is doing, what's working organically, or which cuts performed. Requires the brand to have connected accounts (Analytics page -> Organic tab -> Connections); analytics come with the connection. The distilled weekly take-aways live in organic.brief and ride along automatically when scripts are written.","operationId":"invoke_organic_performance_get","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The brand (brand.list).","type":"string"},"days":{"description":"Window length in days ending today (default 30, max 365). 7 = this week.","type":"integer"},"limit":{"description":"How many top posts (default 20, max 100).","type":"integer"},"metrics":{"description":"Columns for the chat table (default views, likes, comments, shares, saves, engagement_rate).","items":{"type":"string"},"type":"array"},"platform":{"description":"Limit to one platform: tiktok | instagram | youtube | facebook | twitter | linkedin | threads | pinterest.","type":"string"},"post":{"description":"ONE post instead of the rollup: an AdBrain social_post id, the post's public URL, or the platform/provider post id. Returns full metrics + daily timeline.","type":"string"},"sort":{"description":"Rank top posts by: engagement (default), views, reach, impressions, likes, comments, shares, saves, engagement_rate, recent.","type":"string"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"organic.performance_get","tags":["organic"],"x-long-running":false,"x-permission":"performance.read"}},"/skills/performance.asset_breakdown/invoke":{"post":{"description":"What's INSIDE one ad: the individual creatives Meta rotated inside a Flex / Related Media / Dynamic ad, each with its own numbers (spend, share of the ad's spend, Meta-reported purchases/ROAS, CTR, thumbnails and live Facebook links) - the same breakdown the user gets from the asset-breakdown button on the Analytics page. Use it whenever the ad level isn't enough: 'which creative inside that flex ad is winning?'. Pass the ad's ad_key from performance.get - and when that row has launches > 1, pass its ad_keys too so every launch folds into one combined breakdown; siblings are also discovered automatically by ad name when omitted. ad_name works instead of ad_key when that's all you have. Answers are INSTANT when the cache is warm (each Meta sync pre-warms the brand's biggest flex ads, and every pull refreshes it); a cache miss triggers a LIVE platform pull that can take 10-30 seconds - if you suspect a miss (unusual ad or custom date range), tell the user it may take a moment. Per-asset conversions are Meta-REPORTED estimates (the pixel doesn't resolve per asset); the header may carry Triple Whale pixel numbers-of-record when TW is connected. The response includes a performance_table that renders inline in the chat - don't re-type it as markdown.","operationId":"invoke_performance_asset_breakdown","requestBody":{"content":{"application/json":{"schema":{"properties":{"ad_key":{"description":"The ad's ad_key from performance.get rows (preferred).","type":"string"},"ad_keys":{"description":"Sibling launches of the same ad to combine into one breakdown (performance.get puts them on 'ad_keys' when launches > 1). Discovered automatically by ad name when omitted.","items":{"type":"string"},"type":"array"},"ad_name":{"description":"The ad's name - used to find the ad (and all its relaunches) when you don't have an ad_key.","type":"string"},"brand_id":{"description":"The brand that owns the ad (required).","type":"string"},"date_from":{"description":"Start date YYYY-MM-DD (default: last 30 days).","type":"string"},"date_to":{"description":"End date YYYY-MM-DD (default: today).","type":"string"},"refresh":{"description":"Force a LIVE platform pull even when a fresh cached breakdown exists (slow - 10-30s). Only when the user explicitly wants this-minute numbers.","type":"boolean"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"performance.asset_breakdown","tags":["performance"],"x-long-running":false,"x-permission":"performance.read"}},"/skills/performance.brief/invoke":{"post":{"description":"ON-DEMAND ONLY: a written retrospective of the brand's real ad results (this week vs last: what's winning and why, emerging angles/hooks/personas, iterate candidates, fatigue, next directions). It is NOT generated automatically and NOT injected into creative work - the live feedback loop is performance.winners (the specific winning ads + their creative elements, already in context for every script/static/cut). Call this only when the user explicitly asks for a written report / retrospective document; refresh=true rebuilds it now (~15s). For raw numbers or a specific ad use performance.get.","operationId":"invoke_performance_brief","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The brand whose brief to read/build (required).","type":"string"},"refresh":{"description":"true = regenerate from the latest synced data now. Default: return the stored brief, generating one only if none exists yet.","type":"boolean"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"performance.brief","tags":["performance"],"x-long-running":false,"x-permission":"performance.read"}},"/skills/performance.get/invoke":{"post":{"description":"REAL ad performance for a brand (actual spend/impressions/clicks/purchases/revenue/ROAS from the brand's connected sources - the Meta Marketing API connection, Meta Ads Manager CSV imports, and Triple Whale pixel attribution). Rows are aggregated per ad (group_by='ad', default) or per SCRIPT (group_by='script') - the script join comes from ad names that carry the script number ('12 | Title | Brand' or '#12'), so it shows which of the user's scripts actually won in the wild. TO FIND ONE AD OR A GROUP OF ADS by identifier or name ('how did INTV740 do', 'find the ad called ...'), pass query - it searches every ad in the account, not just the top rows, and adds the matches up in query_totals; a row list WITHOUT query is only the top spenders, so an ad missing from it has NOT been shown to be missing from the account. Per-ad rows from the Meta connection AND Triple Whale also carry a 'creative' object - the ACTUAL ad creative: thumbnail_url, preview_link (opens the real ad, even paused ones - for TW it's a direct video link from TW's own media mirror), post permalink, and the media assets inside the ad (video file names/ids - Flex ad contents included). Share preview_link/permalink when the user wants to SEE an ad. To STUDY or REMIX an ad's creative, use swipe.add_from_ad with the row's ad_key - it downloads the real file via the Meta connection. NEVER pass preview_link/permalink to swipe.add_from_url (login-walled pages, the analysis comes back empty). Sources are reported separately, never summed: 'meta' rows come straight from the Ads Insights API and 'meta_csv' rows from exports - both platform-reported; 'triple_whale' rows carry ad names + platform spend/impressions/clicks alongside pixel-attributed purchases/revenue (Triple Attribution model - purchases can be fractional). Use this to ground 'what's working' answers in real results instead of heuristics. Relaunches of the same ad (same name - Flex ads are relaunched constantly) are folded into one row by default ('launches' counts them, merge_relaunches=false splits them). For what's INSIDE a Flex ad with per-creative numbers, call performance.asset_breakdown with the row's ad_key (pass the row's ad_keys too when launches > 1) - the same breakdown the Analytics page's asset button shows. If it returns no data, the brand has nothing connected yet - point the user to the Analytics page (Ads tab -> Connections) to connect Meta, import a CSV, or connect Triple Whale.","operationId":"invoke_performance_get","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The brand whose performance to read (required).","type":"string"},"channel":{"description":"Limit to one ad channel, e.g. 'facebook-ads', 'tiktok-ads', 'google-ads' (optional). Triple Whale tracks EVERY channel, so unfiltered totals are blended - the response lists the brand's channels; filter when the user means one platform.","type":"string"},"date_from":{"description":"Start date YYYY-MM-DD (optional).","type":"string"},"date_to":{"description":"End date YYYY-MM-DD (optional).","type":"string"},"group_by":{"description":"Aggregate per ad (default) or per AdBrain script.","enum":["ad","script"],"type":"string"},"limit":{"description":"Max groups to return (default 25).","type":"integer"},"merge_relaunches":{"description":"Default true: relaunches of the same ad (same provider + ad name - Flex ads get relaunched constantly) fold into ONE row with bases summed and ratios recomputed; 'launches' says how many, 'ad_keys' lists every launch. Pass false to see each launch separately.","type":"boolean"},"provider":{"description":"Limit to one source (optional).","enum":["meta","meta_csv","triple_whale"],"type":"string"},"query":{"description":"Find SPECIFIC ads anywhere in the account - the same search as the Analytics page's search box. Pass what the user gave you: an identifier from the ad name ('INTV740'), part of the name, an ad id / ad_key, a campaign name, or a script number ('#2339'). Every word must appear in the ad's name, key, id or campaign name; case and separators don't matter ('INTV740 v1' finds 'INTV740_v1_...'). It searches EVERY ad, not just the top spenders, and the result carries query_totals (the matches added up per source). ALWAYS use this when the user names or pastes an identifier - never scan the top rows for it. Leave the dates off unless the user gave a period: a date range hides ads that didn't run in it (the response says so in outside_filters when that happens).","type":"string"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"performance.get","tags":["performance"],"x-long-running":false,"x-permission":"performance.read"}},"/skills/performance.winners/invoke":{"post":{"description":"The brand's CURRENT WINNERS with the creative elements that made them win - the evidence a creative strategist works from. Paid ads (from the connected ad data: spend, ROAS/nc-ROAS, purchases) and organic posts (from the connected social accounts: views, saves, shares, follows), each resolved to its ELEMENTS: the hooks verbatim (and THE hook that ran when it was one of our cuts), the angle, the customer persona, target emotions, awareness/funnel stage, video styles/format, how the creator performed it, what shots were used, how it was edited, on-screen captions, and why it worked - from the script we wrote (certain) or the swipe-file analysis of the real creative. Read from AdBrain's own table (refreshed daily; no API calls). This block is ALREADY injected into every script.write / static.generate / video.edit for the brand, so don't call it before creative work - call it when the user asks what's working, which hooks/angles are winning, what to double down on, or to compare a new idea against the winners; and with refresh=true right after new data was connected or synced. Winners whose creative isn't visible yet are auto-imported into the swipe file for analysis.","operationId":"invoke_performance_winners","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The brand (brand.list).","type":"string"},"kind":{"description":"ad | organic | all (default all).","type":"string"},"limit":{"description":"How many winners per kind (default 8, max 20).","type":"integer"},"product_id":{"description":"Prefer winners for this product (falls back to the brand's).","type":"string"},"refresh":{"description":"Recompute from the latest synced data right now (a few seconds; reads the organic provider live).","type":"boolean"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"performance.winners","tags":["performance"],"x-long-running":false,"x-permission":"performance.read"}},"/skills/persona.create/invoke":{"post":{"description":"Create a reusable customer persona for the user (optionally tied to one or more brands via brand_ids). Use this when the user describes who their customer is, shares persona/audience research, or asks you to define a target audience \u2014 and during brand onboarding when the user provides customer information. Always include a clear name and a short_description. KEEP IT BRAND-AGNOSTIC: describe the PERSON (their life, pains, motivations), never a specific brand/founder \u2014 the brand tie is the brand_ids field, not the prose. Set generate_avatar=true to also render a portrait thumbnail for it.","operationId":"invoke_persona_create","requestBody":{"content":{"application/json":{"schema":{"properties":{"age_range":{"type":"string"},"brand_ids":{"description":"Optional brand_id(s) this persona applies to (from brand.list). Omit for a persona usable with any brand.","items":{"type":"string"},"type":"array"},"gender":{"type":"string"},"generate_avatar":{"description":"True to also generate a portrait thumbnail (a natural, believable person). Renders in the BACKGROUND \u2014 creation returns instantly and the portrait appears on the persona by itself. Default true behavior: pass it for every persona unless the user said not to.","type":"boolean"},"key_motivations":{"type":"string"},"name":{"description":"Short name for the persona, e.g. 'The Quiet Runner'.","type":"string"},"short_description":{"description":"A few sentences describing who they are \u2014 the person, brand-agnostic.","type":"string"}},"required":["name"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"persona.create","tags":["persona"],"x-long-running":false,"x-permission":"persona.write"}},"/skills/persona.list/invoke":{"post":{"description":"List the customer personas visible to the user \u2014 their own/org personas PLUS admin-curated GLOBAL personas (is_global=true, usable by every account). Optionally filtered to one brand (also returns non-brand-specific personas, which apply anywhere). Personas capture who an ad is for \u2014 resolve one before writing scripts or generating statics: a persona the user attached wins, else the best brand-matching persona, else a fitting global one.","operationId":"invoke_persona_list","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"Optional brand_id to filter personas (from brand.list).","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"persona.list","tags":["persona"],"x-long-running":false,"x-permission":"persona.read"}},"/skills/persona.update/invoke":{"post":{"description":"Update ONE existing customer persona by MERGING new values in (omitted fields keep their current value): name, age_range, gender, short_description, key_motivations, and brand_ids (the full replacement list of brand ids it applies to \u2014 pass [] to make it brand-agnostic). KEEP THE PROSE BRAND-AGNOSTIC: describe the person, not a specific brand or founder. Avatar: pass regenerate_avatar=true (with an optional avatar_prompt like 'outdoorsy, mid-40s, warm smile') to generate a new portrait thumbnail for it. Use persona.list first to find the persona_id.","operationId":"invoke_persona_update","requestBody":{"content":{"application/json":{"schema":{"properties":{"age_range":{"type":"string"},"avatar_prompt":{"description":"Optional creative direction for the avatar (used with regenerate_avatar).","type":"string"},"brand_ids":{"description":"FULL replacement list of brand_id(s) this persona applies to; [] = any brand. Omit to keep current.","items":{"type":"string"},"type":"array"},"gender":{"type":"string"},"key_motivations":{"type":"string"},"name":{"type":"string"},"persona_id":{"description":"The persona to update (from persona.list).","type":"integer"},"regenerate_avatar":{"description":"True to generate a fresh portrait thumbnail (replaces the current one).","type":"boolean"},"short_description":{"type":"string"}},"required":["persona_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"persona.update","tags":["persona"],"x-long-running":false,"x-permission":"persona.write"}},"/skills/post.destinations/invoke":{"post":{"description":"The social accounts a brand can post to (its posting destinations): id, platform (tiktok / instagram / youtube / facebook / threads / twitter / linkedin / pinterest), @handle, connected state, and whether auto-post is on (approved cuts get scheduled automatically). Use the ids with post.publish. X accounts also carry x_premium and caption_limit: 25,000 characters on an account with X Premium (long posts), 280 on one without - write X text to that limit (x_premium null = not known yet, treated as 280; x_premium_unknown_because says why). With brand_id the accounts are re-read from the posting provider first, so the state is current. Change auto_post / caption_template / hashtags / settings with record.update entity_type='posting_destination'. If a brand has none, the user connects accounts on the brand page (Destinations -> Connect) - a browser OAuth step you cannot do for them.","operationId":"invoke_post_destinations","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"Omit to list every brand's destinations.","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"post.destinations","tags":["post"],"x-long-running":false,"x-permission":"video.read"}},"/skills/post.list/invoke":{"post":{"description":"Social posts AdBrain has made (newest first): platform, status (queued | scheduled | publishing | published | failed | cancelled), the public URL once live, the error when it failed, and what it was (source_type video_edit | static_batch | text + source_id). Filter by edit_id, static_batch_id, brand_id, or status. refresh=true re-reads unsettled posts from the provider first. Cancel a scheduled post with record.delete entity_type='social_post'; retry a failed one with post.publish retry_post_id.","operationId":"invoke_post_list","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"type":"string"},"edit_id":{"description":"Only posts of this video cut.","type":"integer"},"from":{"description":"ISO 8601: only posts due/published at or after this time (the calendar window).","type":"string"},"limit":{"description":"Max rows (default 30).","type":"integer"},"platform":{"type":"string"},"refresh":{"type":"boolean"},"static_batch_id":{"description":"Only posts of this static batch (image / carousel posts).","type":"integer"},"status":{"type":"string"},"to":{"description":"ISO 8601: only posts due before this time.","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"post.list","tags":["post"],"x-long-running":false,"x-permission":"video.read"}},"/skills/post.publish/invoke":{"post":{"description":"Publish to a brand's connected social accounts - organic posting to TikTok / Instagram / YouTube / Facebook / Threads / X / LinkedIn / Pinterest / Bluesky through the posting provider. THREE KINDS OF POST, and YOU choose the right one for the network and the moment: (1) a FINISHED VIDEO CUT - pass edit_id (TikTok, Reels, Shorts, and any network when the video is the point); (2) a STATIC IMAGE or CAROUSEL from a finished static batch - pass static_batch_id (static.list / record.get static_batch): a carousel batch goes out as ONE multi-image post with all its slides in order; for a batch of separate statics pass `ad_ids` to pick which image(s) go in the post (default: the first). Works on Instagram, TikTok (as a photo post), Facebook, Threads, X, LinkedIn, Pinterest; refused on YouTube (video only) and when the slide count is over the network's limit (Instagram / Facebook / Threads 10, LinkedIn 20, TikTok 35, X / Bluesky 4, Pinterest 1). The caption is written from the ad copy unless the user dictated one; (3) a WRITTEN POST - pass `text` (and optionally image_asset_ids = image raw assets to attach) - what X, LinkedIn, Threads and Facebook mostly are; no video or image is required there. A text post to TikTok/YouTube is refused (they need video); Instagram/Pinterest need at least one image. `per_platform` = {platform: text} gives a network its own wording (a tighter X line, a longer LinkedIn note); `thread` = follow-up posts for an X / Threads thread. One post per destination, published in the background: read status + public URL with post.list. destination_ids come from post.destinations; omit them to be asked. Captions for cuts: pass the user's EXACT words in `caption` only when they dictated one; otherwise omit it and the caption is written from the video. For text posts YOU write the text (brand voice, the platform's length and norms) unless the user dictated it. X LENGTH depends on the account: post.destinations shows each X account's caption_limit - 25,000 characters with X Premium (a long post is fine: one sentence per paragraph, an empty line between), 280 without (longer text is refused with the reason; use `thread`). `scheduled_at` (ISO 8601 UTC) schedules. BULK SCHEDULING (a week of content in one call): pass `edit_ids` (in posting order) with `start_at` and a cadence - `per_day` (+ optional `times` like ['09:00','18:00'] in the user's local clock with `tz_offset_minutes`), or `interval_minutes` - and every cut gets its own slot, spread out the way the user asked ('two a day', 'one every morning', 'every 3 hours'). `dry_run=true` returns the plan (cut -> time) without scheduling, so you can confirm the calendar with the user first. `reschedule_post_id` + scheduled_at moves an existing scheduled post. `raw_asset_id` (a VIDEO raw asset - footage the user uploaded or shared from their phone) posts that video as-is: it is imported onto the Edits page first, then posted. Instagram TRIAL REELS: `trial_reel` = 'manual' or 'auto' launches a Reel to non-followers first (graduated by hand in the Instagram app, or automatically when it performs); the destination's own default applies when omitted. retry_post_id re-sends a FAILED post.","operationId":"invoke_post_publish","requestBody":{"content":{"application/json":{"schema":{"properties":{"ad_ids":{"description":"With static_batch_id, for a batch of SEPARATE statics: which static_ad id(s) to put in the post (default: the first). Ignored for carousels (every slide goes).","items":{"type":"integer"},"type":"array"},"allow_duplicates":{"type":"boolean"},"brand_id":{"description":"Text posts: the brand whose destinations to use (post.destinations brand_id=...).","type":"string"},"caption":{"description":"ONLY the user's own dictated caption, verbatim. Omit it to let AdBrain write the caption from the video (the normal case).","type":"string"},"destination_ids":{"description":"Posting destination ids (post.destinations). Omit to get the list back as a question.","items":{"type":"integer"},"type":"array"},"dry_run":{"description":"BULK: return the plan (cut -> scheduled time) without creating posts.","type":"boolean"},"edit_id":{"description":"The video cut (video_edit id) to post. Omit for a static or text post.","type":"integer"},"edit_ids":{"description":"BULK: several cuts in posting order; combine with start_at + per_day/times or interval_minutes.","items":{"type":"integer"},"type":"array"},"image_asset_ids":{"description":"Text posts: image raw assets to attach (up to 10). Needed for Instagram / Pinterest.","items":{"type":"integer"},"type":"array"},"interval_minutes":{"description":"BULK: a fixed gap between posts instead of per_day/times.","type":"integer"},"per_day":{"description":"BULK: posts per day (default 1).","type":"integer"},"per_platform":{"additionalProperties":{"type":"string"},"description":"Text posts: {platform: text} wording override per network, e.g. {\"twitter\": \"...\", \"linkedin\": \"...\"}.","type":"object"},"raw_asset_id":{"description":"Post a VIDEO raw asset as-is (imported onto the Edits page first).","type":"integer"},"reschedule_post_id":{"description":"Move this scheduled social_post to scheduled_at.","type":"integer"},"retry_post_id":{"description":"Retry this FAILED social_post instead of creating new ones.","type":"integer"},"scheduled_at":{"description":"ISO 8601 UTC datetime to schedule for. Omit to post now.","type":"string"},"start_at":{"description":"BULK: ISO 8601 UTC time of the first slot (default: 30 minutes from now).","type":"string"},"static_batch_id":{"description":"A finished static batch to post as an image / carousel post (instead of edit_id or text).","type":"integer"},"text":{"description":"A written post (text-only is fine on X / LinkedIn / Threads / Facebook / Bluesky). Required when edit_id is omitted.","type":"string"},"thread":{"description":"Text posts on X / Threads: follow-up posts after the first.","items":{"type":"string"},"type":"array"},"times":{"description":"BULK: local wall-clock times per day, e.g. ['09:00','18:00'] (needs tz_offset_minutes to be exact).","items":{"type":"string"},"type":"array"},"title":{"description":"YouTube / Pinterest title (max 100 chars). Defaults to the cut's title.","type":"string"},"trial_reel":{"description":"Instagram Reels only: launch as a Trial Reel (non-followers first). 'auto' graduates on performance.","enum":["off","manual","auto"],"type":"string"},"tz_offset_minutes":{"description":"The user's local timezone offset from UTC in minutes (e.g. -480 for Pacific Standard). Used with `times`.","type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"post.publish","tags":["post"],"x-long-running":false,"x-permission":"video.write"}},"/skills/product.add_from_url/invoke":{"post":{"description":"Add a single product to an EXISTING brand by scraping its product page URL. Use this whenever the brand already exists and the user shares a product/PDP link or asks to add a product - do NOT onboard a new brand for this. Needs the brand_id (from brand.list) and the product page url.","operationId":"invoke_product_add_from_url","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The existing brand's brand_id (from brand.list).","type":"string"},"url":{"description":"The product page / PDP URL to add.","type":"string"}},"required":["brand_id","url"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"product.add_from_url","tags":["product"],"x-long-running":false,"x-permission":"brand.write"}},"/skills/product.create/invoke":{"post":{"description":"Create ONE new product on an EXISTING brand from facts you already have - the path for a pre-launch product with no product page yet, or any product whose details you gathered yourself (from packaging photos, a brief, a spreadsheet, a Drive folder). Pass brand_id (brand.list) and the product's name; give SEPARATE basic_info (2-3 sentence overview) and detailed_info (comprehensive: what it is, claims AS PRINTED on the pack, ingredients/format/size, who it's for, visual/physical details of the packaging an image model must get right - colours, label layout, badges, closure, how it stands), plus offer (EVERGREEN offer only - never a seasonal sale), abbreviation (2-4 letters), pdp_url (leave empty when there is none yet) and status. REFERENCE PHOTOS IN THE SAME CALL: images=[{url, asset_role?, label?, description?, is_best_reference?}] - public links (Google Drive 'anyone with the link', Dropbox, a CDN URL) that AdBrain downloads itself and saves as raw assets tagged to the new product (role per the asset categories: packaging / product / product_item / ingredient / bundle / lifestyle / general; default 'product'; pin the clean front packshot with is_best_reference). For files you hold as bytes use raw.upload (begin/complete or from_base64) with the returned product_id instead. DUPLICATE GUARD: if the brand already has a live product with (nearly) the same name this returns status 'needs_confirmation' with the existing product - edit it with product.update or pass confirm_duplicate=true to create anyway. When the product HAS a live PDP, product.add_from_url scrapes it for you; when the brand itself doesn't exist yet, brand.create_from_website / brand.bootstrap_from_materials come first.","operationId":"invoke_product_create","requestBody":{"content":{"application/json":{"schema":{"properties":{"abbreviation":{"description":"2-4 letter abbreviation used in deliverable names (e.g. 'PSC').","type":"string"},"basic_info":{"description":"SHORT 2-3 sentence overview (what it is, for whom, the one headline benefit).","type":"string"},"brand_id":{"description":"The existing brand's brand_id (from brand.list).","type":"string"},"confirm_duplicate":{"description":"Only after a needs_confirmation refusal: create even though a similarly named live product exists.","type":"boolean"},"detailed_info":{"description":"COMPREHENSIVE details - never a copy of basic_info. Include claims exactly as printed, format/size, ingredients, audience, compliance notes, and the packaging's visual/physical details (colours, label text layout, badges, cap/closure, how it stands) so ads depict it accurately.","type":"string"},"folder_id":{"description":"Optional asset folder of this brand to file the downloaded images into (folder.manage list/create).","type":"integer"},"images":{"description":"Up to 12 reference photos to download and attach to the new product. Each becomes a raw asset (analyzed in the background).","items":{"oneOf":[{"description":"A public image URL (role 'product').","type":"string"},{"properties":{"asset_role":{"description":"packaging | product | product_item | ingredient | bundle | lifestyle | general (default product).","enum":["packaging","product","product_item","ingredient","bundle","lifestyle","general"],"type":"string"},"description":{"description":"What the photo shows / proves - the packaging truth an image model should read off it.","type":"string"},"filename":{"description":"Override when the link carries no usable file name.","type":"string"},"is_best_reference":{"description":"Pin as the product's one canonical photo (the clean front packshot).","type":"boolean"},"label":{"description":"Short human name, e.g. 'Front of box'.","type":"string"},"url":{"description":"Public link to the image (Drive 'anyone with the link', Dropbox, CDN...).","type":"string"}},"required":["url"],"type":"object"}]},"maxItems":12,"type":"array"},"name":{"description":"The product's official name as it appears on the pack / site.","type":"string"},"offer":{"description":"EVERGREEN offer / pricing structure (e.g. 'Subscribe & Save 15%'). Never a limited-time sale - that belongs in the generation request.","type":"string"},"pdp_url":{"description":"Product / landing page URL. Omit when the product isn't live yet.","type":"string"},"status":{"description":"Default Active. Inactive keeps it out of catalog-wide ('__all__') generations.","enum":["Active","Inactive"],"type":"string"}},"required":["brand_id","name"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"product.create","tags":["product"],"x-long-running":false,"x-permission":"brand.write"}},"/skills/product.delete/invoke":{"post":{"description":"Delete a product from one of the user's brands (soft delete - it moves to trash and can be restored). Use this to remove a DUPLICATE product entry or a junk/accidental product so the catalog is clean. Pass the product_id (from brand.list / brand.get) and the brand_id it belongs to. Never deletes a brand, only the one product. Returns the deleted product's name.","operationId":"invoke_product_delete","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The brand the product belongs to.","type":"string"},"product_id":{"description":"The product_id to delete (from brand.list/brand.get).","type":"string"}},"required":["brand_id","product_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"product.delete","tags":["product"],"x-long-running":false,"x-permission":"brand.write"}},"/skills/product.update/invoke":{"post":{"description":"Update individual fields on ONE existing product (a MERGE - omitted/empty fields keep their current value, so it never wipes the product). Use to correct a single product: fix its name, rewrite its Basic vs Detailed info (e.g. de-duplicate them, or move rules into Detailed only), set the offer/abbreviation/PDP link, or flip it active/inactive. Keep basic_info SHORT and detailed_info COMPREHENSIVE - never make them identical. When editing basic_info/detailed_info, read the product's CURRENT FULL value first (brand.get, not a summary) and write a replacement that preserves everything still relevant - never rewrite from a partial/truncated view of what's there now. If your new text is dramatically shorter than what's currently saved, this is REFUSED with status 'needs_confirmation' (a guard against a truncated-view rewrite silently destroying curated content) unless you pass confirm_shrink=true. Pass brand_id + product_id (from brand.list/brand.get). For brand-wide info use brand.update; to remove a product use product.delete.","operationId":"invoke_product_update","requestBody":{"content":{"application/json":{"schema":{"properties":{"abbreviation":{"description":"2-4 letter abbreviation (omit to keep).","type":"string"},"basic_info":{"description":"SHORT 2-3 sentence overview. Replaces the Basic Product Info field when given.","type":"string"},"brand_id":{"type":"string"},"confirm_shrink":{"description":"Only needed if a previous call was refused for replacing basic_info/detailed_info with text dramatically shorter than what's currently saved. Set true to proceed anyway once you've confirmed (from the FULL current value, not a summary) that the big cut is really intended.","type":"boolean"},"detailed_info":{"description":"COMPREHENSIVE details. Replaces the Detailed Product Info field when given. Must not just repeat basic_info.","type":"string"},"name":{"description":"New product name (omit to keep).","type":"string"},"offer":{"description":"The product's EVERGREEN offer/pricing (always-available structure like 'Subscribe & Save 10%'; omit to keep). Do NOT store limited-time/seasonal sales here \u2014 they poison future evergreen ads; a sale belongs in the generation request (idea), not the product record. This supersedes the brand-level evergreen_offer when both exist.","type":"string"},"pdp_url":{"description":"Product/landing page URL (omit to keep).","type":"string"},"product_id":{"type":"string"},"status":{"description":"Set active/inactive (omit to keep).","enum":["Active","Inactive"],"type":"string"}},"required":["brand_id","product_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"product.update","tags":["product"],"x-long-running":false,"x-permission":"brand.write"}},"/skills/raw.list/invoke":{"post":{"description":"List the raw assets in the user's library (uploaded images, video clips, audio and documents), with names, type and size. Use this to see what source material is already on hand. THE ADBRAIN LIBRARY (global, built into every account - rows with source='library'; pass library=true to see only those, optionally with file_type / asset_role / query): platform, store, payment and tool LOGOS (asset_role 'logo' - Facebook, TikTok, Meta, YouTube, Shopify, Amazon, Stripe...), graphics and stock imagery, b-roll, and the MUSIC library. Reach for it whenever an ad names a platform or needs a mark the brand hasn't uploaded - the editor's fetch_source raw_asset <id> works on library ids too. MUSIC rows carry their catalog (genre, energy 1-5, bpm, mood, vocals/instrumental, bed-safe, vibe) for video.edit / video.revise music_asset_id.","operationId":"invoke_raw_list","requestBody":{"content":{"application/json":{"schema":{"properties":{"asset_role":{"description":"Optional role filter: product, packaging, ingredient, logo, person, lifestyle, general ('general' = the 'Other / brand material' bucket in the UI).","type":"string"},"brand_id":{"description":"Optional: only assets tagged to this brand.","type":"string"},"creator_id":{"description":"Optional: only assets a creator profile appears in (brand.get lists a brand's creators). Rows always show `creators` (who is in the file, and whether face matching or a person tagged it).","type":"integer"},"file_type":{"description":"Optional filter, e.g. 'image' or 'video'.","type":"string"},"folder_id":{"description":"Optional: only assets filed in this asset folder (folders come back in `folders` when brand_id is given). 0 = unfiled assets of the brand.","type":"integer"},"library":{"description":"true = only the built-in AdBrain library (global assets every brand can use: platform/store/payment/tool logos, graphics, stock imagery, b-roll, music). Combine with file_type / asset_role='logo' / query.","type":"boolean"},"limit":{"description":"Max assets to return (default 30, max 60).","type":"integer"},"offset":{"description":"Skip this many matching assets before returning (default 0). Page through a long list with offset=0, 30, 60... until has_more is false.","type":"integer"},"query":{"description":"Optional word search over name, description, tags and analysis. Matches ANY word (e.g. 'velvet bag' finds assets mentioning either word), best matches first.","type":"string"},"valence":{"description":"Optional emotional filter: positive | negative | neutral | mixed (a clip's read - negative = problem/before material, positive = payoff).","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"raw.list","tags":["raw"],"x-long-running":false,"x-permission":"raw.read"}},"/skills/raw.organize/invoke":{"post":{"description":"ORGANIZE A BRAND'S RAW ASSETS IN BULK - the ONLY right tool when the user asks to organize / sort / file / clean up their footage, b-roll, uploads or library, or when a brand has more than a handful of unfiled assets. One job files HUNDREDS of assets: it finds every unfiled asset of the brand (same definition as the Raw Assets page - a multi-brand asset filed only under another brand counts as unfiled here and gets filed in THIS brand's tree without moving it elsewhere), decides the folder set (reuses the brand's folders; proposes new ones only when the brand has none or allow_new_folders=true), classifies the assets in batches from AdBrain's own analysis of each file, files them, then RE-COUNTS everything from the database and writes a report with real numbers. Shows a live checklist card. Do NOT organize a library by paging raw.list and calling folder.manage per asset - that runs out of steps after ~70 assets and its totals are guesses; use this. folder.manage is for single moves, renames and folder creation. Pass the user's wishes in `instructions` ('split travel by country', 'all talking-head goes in A-roll'); re-running only touches what is still unfiled. After calling it, tell the user the job is running and the card will fill in - then STOP.","operationId":"invoke_raw_organize","requestBody":{"content":{"application/json":{"schema":{"properties":{"allow_new_folders":{"description":"true = the organizer may add top-level folders when a sizeable group has no home; false = existing folders only. Default: new folders only when the brand has none.","type":"boolean"},"asset_ids":{"description":"Optional: only these assets (default: every unfiled asset of the brand).","items":{"type":"integer"},"type":"array"},"brand_id":{"description":"The brand whose library to organize (brand.list).","type":"string"},"include_filed":{"description":"true = re-file EVERYTHING tagged to the brand, not just the unfiled (use only when the user asks to reorganize what is already filed).","type":"boolean"},"instructions":{"description":"Optional: how the user wants things grouped / any rules, in their words.","type":"string"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"raw.organize","tags":["raw"],"x-long-running":true,"x-permission":"record.write"}},"/skills/raw.save/invoke":{"post":{"description":"Save material as a reusable, named BRAND RAW ASSET (the brand's own working material) from ANY of three sources: (1) chat_attachment_id - a file the user dropped into chat (image, VIDEO clip, AUDIO recording, or document); (2) swipe_example_id - an EXISTING swipe-file example whose media file should ALSO become raw material (the example stays in the swipe file untouched) - e.g. an ad imported via swipe.add_from_ad that the creator will now REACT to (save it with asset_role 'reaction', then pass the new asset_id to script.write raw_asset_ids); (3) artifact - ANY record/artifact (a script brief, a research document, a persona...) rendered to a readable text document asset. Use it when the user hands you their OWN asset: a photo ('this is Brenda, our dental hygienist', 'here's our packaging'), FOOTAGE to build ads from (b-roll, interviews, testimonials), a spokesperson AUDIO recording, or a brand-guideline document. Pass the brand_id, an asset_role, a label (short name), and a description (who/what it is and how the user wants it used). The asset becomes searchable via raw.list; images are usable in static.generate via reference_asset_ids; footage/audio is usable in script.write via raw_asset_ids (the script quotes its best moments verbatim with timecodes). Do NOT use this for ads whose STYLE the user wants to copy - those are swipe examples (swipe.analyze / script.write swipe_file_example_id); use swipe_example_id here only when an example should ADDITIONALLY serve as raw material (reaction clips, footage to recut). If you're unsure whether a dropped file is the user's own material or an ad to emulate, ask the user before saving or analyzing anything. A file that is NOT yet inside AdBrain (on the user's drive, laptop, a Google Drive / Dropbox link) comes in through raw.upload instead - presigned PUT for bytes you hold, from_url for links.","operationId":"invoke_raw_save","requestBody":{"content":{"application/json":{"schema":{"properties":{"artifact":{"description":"SOURCE option 3: ANY artifact/record, saved as a readable text DOCUMENT asset (a script brief the editor should follow, a research doc, a persona profile...). The record is serialized in full and stored as a markdown document raw asset. Exactly one of chat_attachment_id / swipe_example_id / artifact must be given.","properties":{"id":{"description":"The record's id.","type":"integer"},"type":{"description":"The entity type - any record.get type works: 'artifact' (markdown/html document), 'script', 'persona', 'landing_page', 'static_ad', etc.","type":"string"}},"type":"object"},"asset_role":{"description":"What kind of asset this is (use the SAME categories as the product editor):\n- 'packaging' = what the product ships or is wrapped in \u2014 outer retail box, label, inner sachets/wrappers (packaging at ANY layer).\n- 'product' = the item as a customer holds and USES it \u2014 the tube, bottle, strip, garment, device; for digital products, a clean screenshot of the product/interface. A tube or bottle the customer squeezes/pours from is the PRODUCT, not packaging.\n- 'ingredient' = the raw contents/components/material the product is made of (the gel itself, an active, a fabric swatch).\n- 'product_item' = a close-up / in-use shot (the product being used or a texture macro, e.g. gel on a brush).\n- 'bundle' = a GROUP SHOT of several products together (set product_ids to all of them). Static ads use it ONLY when 2+ of those products are featured together - it is the anchor for their true relative sizes.\n- 'person' = a spokesperson/expert/founder/model who appears in ads.\n- 'logo' = the real brand logo.\n- 'lifestyle' = lifestyle / UGC scenes, not a specific product hero shot.\n- 'reaction' = REACTION MATERIAL: a viral clip (someone else's video) the brand's creator will react to - it plays as the hook while the creator gives their take. Usually saved automatically from a reaction.find pull; use this role if the user hands you a clip and says it's something to react to.\n- 'general' = anything else; put what it is in the description.\nScope: packaging/product/ingredient/product_item belong to ONE product (set product_id - without it the image is never used as that product's reference); person/logo/lifestyle/reaction/general are usually brand-wide (leave product_id empty; to put one in a product's static, hand-pick it with static.generate reference_asset_ids).","enum":["product","product_item","ingredient","packaging","bundle","logo","person","lifestyle","reaction","general"],"type":"string"},"brand_id":{"description":"Brand to attach the asset to (from brand.list). This is the PRIMARY brand.","type":"string"},"brand_ids":{"description":"Optional EXTRA brands the same material belongs to (e.g. founder footage shared by a company brand and the founder's personal brand). The asset then shows up in every one of these brands' raw assets; brand_id stays the primary.","items":{"type":"string"},"type":"array"},"chat_attachment_id":{"description":"SOURCE option 1: the dropped file's chat-attachment id (from the upload reference the user just added).","type":"integer"},"description":{"description":"Details about the asset - who the person is and their role at the company, what the product is, etc. Stored so the brain knows when to use it.","type":"string"},"is_reference_excluded":{"description":"true = keep the asset in the library but NEVER hand it to an image/video model as product truth (an AI render from an older model, superseded packaging, a look-alike). Default false.","type":"boolean"},"label":{"description":"Short human name for the asset, e.g. 'Brenda Michelle Strange' or 'Front of box'. This is how it will be referenced later.","type":"string"},"product_id":{"description":"The product this asset belongs to. REQUIRED for it to be used as that product's reference: a product's ads (statics, images) are only ever handed images assigned to that product. Leave empty only for a genuinely brand-wide asset (e.g. a person/spokesperson) - an image with no product is never used as any product's reference.","type":"string"},"product_ids":{"description":"EVERY product the image shows, for a GROUP SHOT (asset_role 'bundle') or any image that matters to several products. The first one becomes product_id. A 'bundle' shot is then used only for ads that feature 2+ of these products together.","items":{"type":"string"},"type":"array"},"swipe_example_id":{"description":"SOURCE option 2: an EXISTING swipe-file example id (from swipe.list / swipe.add_from_ad / swipe.add_from_url). Its media file is COPIED into the brand's raw assets and the swipe example itself stays untouched. This is how an imported ad becomes reaction material or footage to recut.","type":"integer"}},"required":["brand_id","asset_role"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"raw.save","tags":["raw"],"x-long-running":false,"x-permission":"raw.write"}},"/skills/raw.upload/invoke":{"post":{"description":"Get a FILE from outside AdBrain into a brand's Raw Assets - footage, photos, audio, documents - when the user says 'upload this to AdBrain', 'get these off my drive into AdBrain', 'add this folder of clips'. Three actions. (1) action='begin' {filename, content_type?, size_bytes?} -> {upload_url, r2_key, expires_in}: a presigned PUT URL. PUT the file's raw bytes to upload_url with that Content-Type (curl -X PUT -H 'Content-Type: video/mp4' --data-binary @clip.mp4 '<url>'; python requests.put(url, data=open(path,'rb'), headers={'Content-Type': ...})) - no base64, no size limit beyond the library's (video 1.75 GB, audio 500 MB, image 20 MB, document 25 MB). Then (2) action='complete' {r2_key, filename, brand_id, asset_role, label?, description?, product_id?, product_ids?, brand_ids?, folder_id?} -> the saved asset (deduplicated by name+size; videos are converted/thumbnailed/indexed, everything else analyzed, in the background). (3) action='from_url' {url | urls[], brand_id, asset_role, ...same tags} -> AdBrain downloads the file ITSELF from a public link - a Google Drive share link ('anyone with the link'), a Dropbox link, or any direct file URL - and registers it; returns job_id to poll with job_status (one job per url). (4) action='from_base64' {filename, content_base64, brand_id, asset_role, ...same tags} -> the file's bytes travel inside this call (images and small documents up to 15 MB decoded) and the asset comes back saved immediately - for an AI that can READ a file but has no shell to PUT it and no public link to it. Pick the path by what you have: from_url for a link, begin/complete for bytes plus a shell (any size), from_base64 for bytes without a shell. Tag at upload time: asset_role per the asset categories (packaging / product / ingredient / product_item / bundle / person / logo / lifestyle / reaction / general), product_id for product-scoped material, a short label and a description of what it is and how to use it - that is what makes the file usable by script.write / static.generate / video.edit. FOOTAGE OF A CREATOR ('upload this for Dylan'): pass creator_ids=[<id from creator.list>] on complete / from_url / from_base64 and the file arrives tagged as featuring them; add is_creator_reference=true to put it on their profile instead (photo = reference photo, audio / talking video = voice sample). Organize afterwards with record.update (entity_type 'raw_asset': label, asset_role, product_id, brand_ids, folder_id, user_description), folder.manage (create folders, file assets), raw.organize (bulk filing) and record.delete (to Trash). Never ask the user to open the Raw Assets page in a browser to upload for you.","operationId":"invoke_raw_upload","requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"description":"begin (get a presigned PUT URL) | complete (register the PUT object) | from_url (AdBrain downloads a public link) | from_base64 (the bytes ride in this call; images / small docs).","enum":["begin","complete","from_url","from_base64"],"type":"string"},"asset_role":{"description":"What the asset is - same categories as raw.save / the product editor. Default 'general'.","enum":["product","product_item","ingredient","packaging","bundle","logo","person","lifestyle","reaction","general"],"type":"string"},"brand_id":{"description":"complete/from_url: the PRIMARY brand (from brand.list). Required.","type":"string"},"brand_ids":{"description":"Optional extra brands the same material belongs to.","items":{"type":"string"},"type":"array"},"content_base64":{"description":"from_base64: the file's bytes, base64-encoded (a data: URL prefix is tolerated). Up to 15 MB decoded.","type":"string"},"content_type":{"description":"begin: MIME type you will send in the PUT's Content-Type header (e.g. video/mp4, image/png). Defaults from the extension.","type":"string"},"creator_ids":{"description":"WHO is in it: creator profile ids (creator.list) this file features - 'upload this footage for Dylan'. Recorded as a hand tag, which face matching never overrides. Omit and a new upload is still checked against the known creators' faces automatically.","items":{"type":"string"},"type":"array"},"description":{"description":"What it is and how the user wants it used - this is what the brain reads when choosing material.","type":"string"},"filename":{"description":"begin/complete/from_base64: the file's name WITH extension (decides image/video/audio/document). from_url: optional override when the link has no usable name.","type":"string"},"folder_id":{"description":"Optional asset folder (of the primary brand) to file it into - folder.manage action='list' shows the tree, action='create' makes one.","type":"integer"},"is_creator_reference":{"description":"true (with exactly ONE id in creator_ids) = add the file to that creator's PROFILE: an image becomes a reference photo (their face is learned from it), audio or video of them talking becomes a voice sample. A real person's profile needs the user's consent tick first.","type":"boolean"},"is_reference_excluded":{"description":"true = keep it but never hand it to an image/video model as product truth.","type":"boolean"},"label":{"description":"Short human name ('Front of box', 'Dylan kitchen b-roll 1').","type":"string"},"product_id":{"description":"Optional product to scope the asset to (packaging/product/ingredient/product_item material).","type":"string"},"product_ids":{"description":"Every product a group shot shows (asset_role 'bundle'); the first becomes product_id.","items":{"type":"string"},"type":"array"},"r2_key":{"description":"complete: the r2_key returned by begin (the object you PUT to).","type":"string"},"size_bytes":{"description":"begin: the file size, to validate against the library limits before you upload.","type":"integer"},"url":{"description":"from_url: a public link to ONE file - Google Drive share link, Dropbox link, or direct URL.","type":"string"},"urls":{"description":"from_url: several links; one job per link, all tagged the same.","items":{"type":"string"},"type":"array"}},"required":["action"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"raw.upload","tags":["raw"],"x-long-running":true,"x-permission":"raw.write"}},"/skills/reaction.find/invoke":{"post":{"description":"Find viral videos a creator can REACT to (reaction-video source material). Use this when the user asks for 'videos to react to', 'reaction content', 'find clips for my creator to respond to', or wants to make reaction/green-screen style videos. This is DIFFERENT from inspiration.find: that finds ads/formats to EMULATE; this finds authentic viral clips by REGULAR PEOPLE (story-times, rants, relatable moments - e.g. someone talking about their fear of the dentist for an oral-care brand, or perimenopause symptoms for a hormone-health brand) that the creator plays on screen and responds to. It searches TikTok + YouTube Shorts, favors clips that went viral relative to the creator's follower count, reads transcripts to confirm there's a real human moment to react to, and drops ads, brand promos, and fellow experts in the same field. SPECIFICITY is the key lever: 'specific' locks finds to the brand's niche (real people living the exact topic the creator is an authority on); 'general' finds broadly viral relatable clips (some creators react to anything entertaining); 'auto' reads the ask. If the user is vague, ask ONE clarifying question about what they want to react to before pulling. You can hand it your own search_queries (what a human would type into TikTok search - phrases regular people use about their OWN experience, like 'scared of the dentist storytime', NEVER product/brand nouns). Results come back as one 'reaction material pull' card; the user (or you) saves the keepers as reaction material - a downloaded raw asset ready for the edit. Requires brand_id (call brand.list first if you don't have it).","operationId":"invoke_reaction_find","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The brand whose creator will be reacting (from brand.list).","type":"string"},"count":{"description":"How many reactable clips to return. Default 10 (a typical 'find me ~10 videos to react to' ask). Hard max 30.","type":"integer"},"max_duration_seconds":{"description":"Only keep clips at most this long (seconds). Reaction sources are usually short (the clip has to fit inside the creator's video) - set ~60-90 if the user implies it.","type":"integer"},"min_duration_seconds":{"description":"Only keep clips at least this long (seconds).","type":"integer"},"product_id":{"description":"Optional product to focus the topic around.","type":"string"},"recency":{"description":"How fresh the clips must be. Default 'month' - reaction content works best on RECENT virality. Use 'week' for react-to-what's-hot-right-now asks.","enum":["week","month","3months","year","all"],"type":"string"},"search_queries":{"description":"YOUR own hand-crafted search queries (3-6), used INSTEAD of auto-generated ones. Write what a real person would type into TikTok/YouTube search to find these confessional/relatable clips - phrases about the PERSON'S experience ('my doctor dismissed my symptoms', 'dental anxiety story time'), NEVER the product or brand noun. If a pull comes back off-target, refine and re-run.","items":{"type":"string"},"type":"array"},"sources":{"description":"Which platforms to search. Omit for both. Reaction sources are organic short-form only (no ad library).","items":{"enum":["tiktok","youtube"],"type":"string"},"type":"array"},"specificity":{"description":"How tightly finds must track the brand's niche. 'specific' = regular people living/asking about exactly this topic (the doctor-reacts-to-patient-stories case). 'general' = broadly viral, relatable, entertaining clips regardless of topic (some creators react to anything). Default 'auto' reads the ask.","enum":["specific","general","auto"],"type":"string"},"theme":{"description":"What the user wants to react to, in THEIR OWN words (e.g. 'women describing perimenopause symptoms', 'people scared of the dentist', 'anything viral and wholesome'). Both the query generation and the curation judge read this verbatim.","type":"string"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"reaction.find","tags":["reaction"],"x-long-running":false,"x-permission":"swipe.write"}},"/skills/record.delete/invoke":{"post":{"description":"Move ONE content record to trash (SOFT delete - recoverable with trash.restore). Deletable types: artifact, brand, collection, creator, inspiration_result, landing_page, org_memory, persona, posting_destination, product, raw_asset, rough_idea, script, script_folder, social_post, static_batch, swipe_example, video_edit. Refuses without confirm_delete=true. Set confirm_delete ONLY when the user explicitly asked to delete this specific thing - never delete on your own initiative, never to 'clean up', and when in doubt ask the user first. The refusal response names the record so you can confirm you have the right one.","operationId":"invoke_record_delete","requestBody":{"content":{"application/json":{"schema":{"properties":{"confirm_delete":{"description":"Must be true to actually delete. Only set it when the user explicitly asked for this deletion.","type":"boolean"},"entity_type":{"description":"What kind of record to delete.","enum":["artifact","brand","collection","creator","inspiration_result","landing_page","org_memory","persona","posting_destination","product","raw_asset","rough_idea","script","script_folder","social_post","static_batch","swipe_example","video_edit"],"type":"string"},"id":{"description":"The record's id.","type":"string"}},"required":["entity_type","id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"record.delete","tags":["record"],"x-long-running":false,"x-permission":"record.write"}},"/skills/record.get/invoke":{"post":{"description":"Read the FULL canonical record of ANY content entity by type + id - the universal fallback when no dedicated read skill covers what you need (if the user can see it in the product, you can read it here). entity_type is one of: ad_performance, artifact, attribution_connection, brand, chat_session, collection, creative_winner, creator, followed_source, inspiration_config, inspiration_result, landing_page, org_memory, persona, posting_destination, product, product_reference_image, raw_asset, rough_idea, script, script_comment, script_folder, script_template, social_post, static_ad, static_batch, static_comment, swipe_example, video_edit, video_generation. Long text fields are capped with a clear truncation marker; to read a capped field in full, call again with fields=['that_field']. The result also lists which fields are editable via record.update. Prefer the dedicated skills (script.get, brand.get, swipe.get...) for their richer flows; use this for anything they don't cover.","operationId":"invoke_record_get","requestBody":{"content":{"application/json":{"schema":{"properties":{"entity_type":{"description":"What kind of record to read.","enum":["ad_performance","artifact","attribution_connection","brand","chat_session","collection","creative_winner","creator","followed_source","inspiration_config","inspiration_result","landing_page","org_memory","persona","posting_destination","product","product_reference_image","raw_asset","rough_idea","script","script_comment","script_folder","script_template","social_post","static_ad","static_batch","static_comment","swipe_example","video_edit","video_generation"],"type":"string"},"fields":{"description":"Optional: field names to return UNCAPPED (for reading a long field that was truncated in a previous call).","items":{"type":"string"},"type":"array"},"id":{"description":"The record's id (product ids and brand ids are strings; everything else is numeric).","type":"string"}},"required":["entity_type","id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"record.get","tags":["record"],"x-long-running":false,"x-permission":"record.read"}},"/skills/record.update/invoke":{"post":{"description":"Edit fields on ANY content entity by type + id - the universal fallback when no dedicated edit skill covers the field (if the user can edit it in the product, you can edit it here). MERGE semantics: only the fields you pass change; omitted fields are untouched. Editable fields per type: artifact: content, title | brand: analytics_config, default_template_id, library_label, name, product_scale_notes, production_playbook, review_policy, status | collection: name, protect_downloads | creator: brand_ids, description, kind, main_asset_id, name, voice_action | followed_source: blurb, category, notes, website | inspiration_result: status | landing_page: audience_hint, body_copy, brand_id, headline, key_points, name, offer, source_url, subheadline | org_memory: brand_id, category, content | persona: age_range, brand_ids, content_angle_tags, family_status, gender, geography, key_motivations, name, occupations, short_description, socioeconomic_status, why_brand_appeals | posting_destination: auto_delay_minutes, auto_post, caption_template, hashtags, settings | raw_asset: analysis_text, asset_role, brand_id, brand_ids, brand_meaning, creator_id, creator_ids, emotions, folder_id, is_best_reference, is_creator_reference, is_reference_excluded, label, product_id, product_ids, tags, user_description, valence | rough_idea: brand_id, example_link, idea, status | script: awareness_level, awareness_reasoning, brand_id, bundle_product_ids, creative_title, creator_instructions, customer_persona_id, editor_instructions, full_title, funnel_position, graphic_designer_instructions, hook_10_caption, hook_1_caption, hook_2_caption, hook_3_caption, hook_4_caption, hook_5_caption, hook_6_caption, hook_7_caption, hook_8_caption, hook_9_caption, idea_summary, landing_page_id, misc_references, product_id, raw_asset_ids, reference_link, script_folder_id, status, target_age, target_demo, target_emotions, target_gender, target_landing_pages, video_styles, videographer_instructions | script_folder: name, parent_folder_id | swipe_example: ad_style, audio_type, awareness_level, best_fit_icp, brand_id, brand_name, content_hooks, content_type, description, estimated_effectiveness, funnel_position, has_spoken_audio, is_trending_sound, key_takeaways, on_screen_captions, placement, relevance_analysis, replication_guide, source_platform, source_url, tags, target_demo, title, transcript, trend_context, video_styles, visual_analysis | video_edit: instructions, post_plan, review_policy, review_status, script_id, title. Fields owned by a versioned/side-effectful path are refused with a pointer to the right skill (script hooks/body -> script.enhance, brand info -> brand.update, product info -> product.update, static copy -> static.revise). When replacing a LONG hand-curated text field, read its CURRENT FULL value first (record.get with fields=[...]) and preserve everything still relevant - a dramatically shorter rewrite is refused with status 'needs_confirmation' unless you resend with confirm_shrink=true. Read-then-write.","operationId":"invoke_record_update","requestBody":{"content":{"application/json":{"schema":{"properties":{"confirm_shrink":{"description":"Only after a shrink-guard refusal, and only once you've read the field's FULL current value and a big cut is genuinely intended.","type":"boolean"},"entity_type":{"description":"What kind of record to edit.","enum":["ad_performance","artifact","attribution_connection","brand","chat_session","collection","creative_winner","creator","followed_source","inspiration_config","inspiration_result","landing_page","org_memory","persona","posting_destination","product","product_reference_image","raw_asset","rough_idea","script","script_comment","script_folder","script_template","social_post","static_ad","static_batch","static_comment","swipe_example","video_edit","video_generation"],"type":"string"},"fields":{"description":"The fields to change and their new values (merge - omit anything you're keeping). To clear a text field pass ''.","type":"object"},"id":{"description":"The record's id.","type":"string"}},"required":["entity_type","id","fields"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"record.update","tags":["record"],"x-long-running":false,"x-permission":"record.write"}},"/skills/script.add_hook/invoke":{"post":{"description":"Add ONE new hook (= one more VERSION) to an existing script, in its next empty slot (max 10 hooks per script). Use this when the user wants more versions of a script than it has hooks: '7 versions' of a 3-hook script = call this 4 times, then video.edit with variants=7. The hook is written by AdBrain's writer with the same brand/product/example context as the script, with a different angle from every existing hook; pass the user's words in `instruction` if they said what the new version should do differently. Never write the hook text yourself and never create a separate script to get more versions - versions live on ONE script.","operationId":"invoke_script_add_hook","requestBody":{"content":{"application/json":{"schema":{"properties":{"count":{"description":"How many hooks to add in this call (default 1). Stops early at 10 total.","maximum":7,"minimum":1,"type":"integer"},"instruction":{"description":"Optional direction for this hook, in the user's own words (e.g. 'lead with the price', 'a question hook'). Omit to let the writer pick a fresh angle.","type":"string"},"script_id":{"description":"The script to add a hook to.","type":"integer"}},"required":["script_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"script.add_hook","tags":["script"],"x-long-running":false,"x-permission":"script.write"}},"/skills/script.enhance/invoke":{"post":{"description":"Make a TARGETED revision to ONE field of an existing script - a hook slot (hook_1 .. hook_10; scripts have 3 unless hooks were added with script.add_hook) or body (the shared script body). This is the same versioned Enhance mechanism as the UI's Enhance button: the field is rewritten following your instruction with full brand/product context, and the previous text is preserved in the field's version history (the user can flip back through every version). Use it to apply reviewer feedback (script.feedback) or any specific per-field change ('make hook 2 punchier', 'remove the price claim from the body'). Call it once per field that needs changing. EVERY HOOK SLOT HAS TWO FIELDS - the VERBAL hook (spoken words) and the ON-SCREEN CAPTION (text shown on screen) - and 'target' picks which one you're editing: target='caption' edits or WRITES the on-screen caption (even from scratch - e.g. the comment a comment-reply video responds to, a super) and never touches the spoken line; target='verbal' edits only the spoken line. Omit target on caption-driven (trending sound) scripts and it auto-detects (verbal fields are empty there; the hook copy lives in the caption). Pass resolve_comment_ids to mark the feedback comments you just addressed as resolved. For broad structural rework of the whole script, use script.write with revise_in_place=true instead; for fields other than hooks/body (e.g. editor instructions), also use script.write.","operationId":"invoke_script_enhance","requestBody":{"content":{"application/json":{"schema":{"properties":{"field":{"description":"Which field to revise: hook_1 .. hook_10 (only slots the script has), or body.","enum":["hook_1","hook_2","hook_3","hook_4","hook_5","hook_6","hook_7","hook_8","hook_9","hook_10","body"],"type":"string"},"instruction":{"description":"What to change and why, in plain language. When applying reviewer feedback, quote or paraphrase their ask (e.g. 'Megan flagged this line as too salesy - soften it and lead with the origin story').","type":"string"},"resolve_comment_ids":{"description":"Optional: comment ids (from script.feedback) that this edit addresses - they'll be marked resolved by AdBrain.","items":{"type":"integer"},"type":"array"},"script_id":{"description":"The script to revise (from script.list / script.feedback).","type":"integer"},"target":{"description":"For hook fields: WHICH of the slot's two fields to edit. 'caption' = the on-screen text (can be written from scratch - e.g. 'write the comment this video replies to' - and never touches the spoken line); 'verbal' = the spoken words only. Omit to auto-detect (needed only when the user's ask is clearly about one of the two).","enum":["verbal","caption"],"type":"string"}},"required":["script_id","field","instruction"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"script.enhance","tags":["script"],"x-long-running":false,"x-permission":"script.write"}},"/skills/script.feedback/invoke":{"post":{"description":"Read the reviewer feedback (comments) left on a script via its review link - who wrote each comment, which field it's anchored to (a hook, the body, the idea summary), the exact text they highlighted, and whether it's been resolved. Also returns the CURRENT text of the commentable fields so line-level feedback can be located precisely. Use this whenever the user mentions feedback/comments/notes a reviewer left on a script (script.list shows which scripts have unresolved feedback). To ACT on the feedback, use script.enhance for targeted per-field changes, or script.write with revise_in_place=true for broad rework.","operationId":"invoke_script_feedback","requestBody":{"content":{"application/json":{"schema":{"properties":{"include_resolved":{"description":"Also include comments already marked resolved. Defaults to false (open feedback only).","type":"boolean"},"script_id":{"description":"The script to read feedback for (from script.list).","type":"integer"}},"required":["script_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"script.feedback","tags":["script"],"x-long-running":false,"x-permission":"script.read"}},"/skills/script.get/invoke":{"post":{"description":"Read ONE script in full: all three hooks with their on-screen captions, the shared body, the complete strategy read (awareness, funnel, target demo/age/gender, emotions, the attached customer persona resolved to its name+demographics), team instructions, landing pages, context references, and its CREATIVE LINEAGE - the swipe-file example the script was written to follow (followed_example_id/title). Resolve the script by script_id (from script.list / memory.search), OR by url (any AdBrain script link - a /review/... or shared link, or a #/page/scripts/N deep link), OR by title (fuzzy match against your scripts; ambiguous titles return the closest candidates instead of guessing). Use it to STUDY past work, or to answer questions about a script an external tool (Notion, a spreadsheet) holds a link/name for. Empty verbal hooks with filled captions mean a caption-driven (trending sound) script - that's the format, not missing data. Read-only.","operationId":"invoke_script_get","requestBody":{"content":{"application/json":{"schema":{"properties":{"script_id":{"description":"The script to read (from script.list / memory.search).","type":"integer"},"title":{"description":"Alternative to script_id: the script's (approximate) title. Fuzzy-matched against your scripts; if several match closely you get the candidates back with their ids.","type":"string"},"url":{"description":"Alternative to script_id: any AdBrain link to the script - a public /review/<token> or shared link, or an in-app #/page/scripts/<id> deep link.","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"script.get","tags":["script"],"x-long-running":false,"x-permission":"script.read"}},"/skills/script.list/invoke":{"post":{"description":"List the user's recent scripts (newest first) with their titles, ad type, brand, and the swipe-file example each one followed (followed_example_id - its creative lineage). Use this to recall what's already been written or to reference past work; open a specific script IN FULL (hooks, body, lineage) with script.get. Each script also reports its reviewer feedback counts (feedback_total / feedback_unresolved) - read the actual comments with script.feedback. Rows may carry brand_deleted=true (the script points at a DELETED brand record - treat as archive, not current work; it can be rescued with script.update brand_id) and brand_folder_label (the user's own label on that brand's library folder, e.g. 'stale - don't use' - respect what it says). Pass query=... to keyword-filter by title/brand/product/idea (searches a deep slice, not just the newest page). Does not return full script bodies.","operationId":"invoke_script_list","requestBody":{"content":{"application/json":{"schema":{"properties":{"limit":{"description":"Max scripts to return (default 25).","type":"integer"},"query":{"description":"Optional keyword filter - case-insensitive match against title, brand, and idea summary (every space-separated term must match).","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"script.list","tags":["script"],"x-long-running":false,"x-permission":"script.read"}},"/skills/script.update/invoke":{"post":{"description":"Edit a script's title and metadata/strategy fields directly - the same fields the user can edit on the script page. Use it to RENAME a script when its content has meaningfully changed (e.g. revisions replaced the hook the title was built on - renaming is encouraged then; titles have no version history and that's fine), to correct the strategy read (awareness_level, funnel_position, target_demo/age/gender, target_emotions), to retag video_styles, to attach a different customer_persona_id, to update the team instructions (editor/creator/videographer/graphic designer), hook captions, target_landing_pages, to re-point product_id, or to MOVE the script to another brand (brand_id - e.g. rescuing scripts off a deleted/duplicate brand record; attribution only, content untouched, product re-matches by name). Pass ONLY the fields you're changing. NOT for the hooks or script body - those go through script.enhance so every version is preserved. Reviewer comments are never editable. Change idea_summary or the strategy fields only when the user or their reviewers' feedback actually calls for it - don't rewrite metadata that wasn't questioned.","operationId":"invoke_script_update","requestBody":{"content":{"application/json":{"schema":{"properties":{"awareness_level":{"enum":["Unaware","Problem-Aware","Solution-Aware","Product-Aware","Most-Aware"],"type":"string"},"awareness_reasoning":{"description":"One or two lines on why that awareness stage fits.","type":"string"},"brand_id":{"description":"Move the script to a DIFFERENT brand (brand.list) - e.g. rescuing scripts stuck on a deleted/duplicate brand record. Non-destructive: only re-points attribution (content is untouched); the script joins that brand's library, its folder filing clears, and its product auto-matches by name against the new brand's catalog (or resets to '__brand__' if no match - re-point product_id after if needed). Only when the user asks to move/re-brand scripts.","type":"string"},"creator_instructions":{"type":"string"},"customer_persona_id":{"description":"Persona to attach (persona.list). Pass 0 to detach.","type":"integer"},"editor_instructions":{"type":"string"},"funnel_position":{"enum":["TOF","MOF","BOF"],"type":"string"},"graphic_designer_instructions":{"type":"string"},"hook_1_caption":{"description":"On-screen text for hook 1 (distinct from the spoken hook).","type":"string"},"hook_2_caption":{"type":"string"},"hook_3_caption":{"type":"string"},"idea_summary":{"description":"The core concept summary. Only change when feedback/user explicitly targets the concept.","type":"string"},"misc_references":{"description":"REPLACES the script's context references: [{type, id?/url?, title?, note?}] where type is ANY artifact kind - 'swipe', 'script', 'static_ad', 'raw', 'markdown'/'html'/'artifact' (documents), 'inspiration_pull', 'reaction_pull', 'session', or 'url'. These are background material that informed the brief (a source ad's story, research docs) - shown in the brief's References section. To append, read the current list via script.get first and pass the merged list.","items":{"type":"object"},"type":"array"},"product_id":{"description":"Re-point the script at a different product (brand.list). Only when the user asks or the product assignment is clearly wrong.","type":"string"},"script_id":{"description":"The script to update (from script.list).","type":"integer"},"target_age":{"description":"e.g. '25-45' or 'All ages'.","type":"string"},"target_demo":{"description":"Who this ad targets and why.","type":"string"},"target_emotions":{"description":"Comma-separated emotions, e.g. 'curiosity, shock, FOMO'.","type":"string"},"target_gender":{"enum":["All","Female","Male"],"type":"string"},"target_landing_pages":{"description":"Newline-separated landing page URLs.","type":"string"},"title":{"description":"New script title. Rename when revisions changed what the script IS (e.g. the title referenced a hook that's gone).","type":"string"},"video_styles":{"description":"Video type tags (canonical taxonomy: Talking Head, Voice Over, Trending Sound, Mashup, ...).","items":{"type":"string"},"type":"array"},"videographer_instructions":{"type":"string"}},"required":["script_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"script.update","tags":["script"],"x-long-running":false,"x-permission":"script.write"}},"/skills/script.write/invoke":{"post":{"description":"Write ad scripts for a brand's product, optionally following a reference example (a Foreplay ad, a swipe-file example, or a pasted TikTok / Instagram / YouTube / Facebook link). Produces ranked hooks and fully filled-out script fields. Supports video, static, carousel and organic ad types. For ONE ad that sells SEVERAL products together (a bundle / starter pack / 'make it for both'), pass product_ids with 2+ ids instead of product_id - the script treats them as one combined offer. To build the script FROM the user's own footage/audio (interview clips, b-roll, a spokesperson recording saved via raw.save), pass raw_asset_ids - the script will pull verbatim quotes with timecodes from those assets (e.g. best moments as hooks) instead of inventing copy. Pass the user's ask in 'idea' IN THEIR OWN WORDS - never pre-write hooks/body copy into it and never re-describe the format (voiceover, talking head...) unless the user said it; the reference example determines the format. Exact lines the user wrote go in quotation marks and ride verbatim. THE EXAMPLE IS THE USER'S CALL: if the user attached or named an example (a [reference: swipe file example #N] chip, an id in their message, an id assigned to your step), pass exactly that id as swipe_file_example_id - never swap it for one you judge a better fit, and if this skill refuses it (format_conflict, product mismatch) ask the user instead of substituting. Only when the user gave NO example at all may you pick one (swipe.list; for several unpinned scripts, a different well-fitting example for each).","operationId":"invoke_script_write","requestBody":{"content":{"application/json":{"schema":{"properties":{"ad_types":{"description":"One or more of: video, static, carousel, organic_video, organic_static, organic_carousel.","items":{"type":"string"},"type":"array"},"brand_id":{"description":"The brand to write for.","type":"string"},"customer_persona_id":{"description":"The saved customer persona this script must convince (from persona.list). Resolve one for most scripts: a persona the user attached/named wins, else the best brand-matching persona, else a fitting global one. The whole script (voice, objections, CTA) is tailored to this person.","type":"integer"},"foreplay_ad_id":{"description":"Optional Foreplay ad to follow as the example.","type":"string"},"idea":{"description":"The angle / idea / instruction for the script.","type":"string"},"landing_page_id":{"description":"Optional landing page for context.","type":"integer"},"misc_references":{"description":"CONTEXT references that inform this brief WITHOUT being the format template: the source ad a cross-format iteration draws its story from, research docs backing a claim, a competitor page. ANY artifact type is attachable - 'swipe', 'script', 'static_ad', 'raw', 'markdown'/'html'/'artifact' (documents), 'inspiration_pull', 'reaction_pull', 'session', or 'url'. Their content is expanded and injected as background for the writer, they're saved on the script (visible in the brief's References section), and they document what you associated. Use this whenever you draw on material that isn't the followed example or a raw asset.","items":{"properties":{"id":{"description":"The swipe example / artifact id (for type swipe/artifact).","type":"integer"},"note":{"description":"WHY this reference matters (e.g. 'the winning ad this iterates on - carry its shame->vindication story').","type":"string"},"type":{"description":"'swipe', 'artifact', or 'url'","type":"string"},"url":{"description":"The url (for type url).","type":"string"}},"type":"object"},"type":"array"},"no_reference_example":{"description":"True = write the script with NO reference example at all and skip the automatic global example pick. Set this when the user explicitly says not to follow/attach an example, or when the brief's constraints (an unusual runtime, a CTV/TV placement, a format the swipe file doesn't cover) mean no library example genuinely fits - an unguided script beats one shaped by a contradicting example. (The auto-picker also skips itself when the brief text says 'no example', and it never picks an example whose known runtime or placement contradicts the brief.)","type":"boolean"},"proceed_without_material":{"description":"Override the concept-readiness gate. By default, if the concept is built on specific REAL material we don't have (e.g. an ad that reads real customer reviews aloud, a reaction to a real source video, a real before/after), script.write refuses and returns needs_input so you ASK the user first. Only set this true when the user has explicitly said to go ahead with made-up / placeholder material for the editor to swap later.","type":"boolean"},"product_id":{"description":"Product id, '__all__' for all products, or '__brand__' for personal brands (from brand.list suggested_product_id). Omit when passing product_ids.","type":"string"},"product_ids":{"description":"BUNDLE mode: 2+ product ids sold TOGETHER in this one ad (e.g. the user wants one ad for two products as a bundle). Use instead of product_id.","items":{"type":"string"},"type":"array"},"raw_asset_description":{"description":"Optional note on what the raw assets are / how the user wants them used (e.g. 'street interviews - use the best reactions as hooks').","type":"string"},"raw_asset_ids":{"description":"Optional raw-asset ids (from raw.save / raw.list) to BUILD the script from - the user's own interview clips, b-roll, spokesperson audio. The script quotes the best moments verbatim with timecodes for the editor. (To attach/detach raw assets on a script that ALREADY exists, use record.update entity_type='script' with raw_asset_ids = the full updated list.)","items":{"type":"integer"},"type":"array"},"raw_assets_only":{"description":"True when the ENTIRE script must be cut from the raw assets (e.g. chopping a radio appearance into a voiceover ad) - no new invented copy except minimal connective text.","type":"boolean"},"reference_link":{"description":"Optional TikTok/IG/YouTube/FB link to analyze and follow.","type":"string"},"reference_script_id":{"description":"ITERATE mode: the id of an EXISTING script to rework (from '[reference: script #N ...]'). Keeps the source script's exact structure/format and applies the user's requested changes. Pass product_id to retarget the iteration at a different product, or omit it to rework the SAME product. Put the user's change instructions in 'idea'. TO SWAP THE REFERENCE EXAMPLE: also pass swipe_file_example_id - the rework then follows THAT example's format/style instead of the original's, and the script's lineage re-points to it (this is how 'rewrite it following that other example' actually works; without it the engine reuses the original's example).","type":"integer"},"revise_in_place":{"description":"ITERATE mode only. True = REVISE the existing script artifact in place (update that same script row) \u2014 use this when the user wants to fix/change/redo THIS script and keep it as one artifact (e.g. 'make the hook punchier', 'fix the CTA'). False/omit = save the result as a NEW script alongside the original \u2014 use when the user wants a separate version/variation to compare, or is retargeting another product (retargeting always makes a new script).","type":"boolean"},"skip_format_check":{"description":"Override the format-conflict guard. By default, if the idea demands a SPOKEN format (voice over / talking head) but the attached example is caption-only (Trending Sound) - or vice versa - the skill refuses with needs_input / format_conflict and explains the correct cross-format recipe. The guard also runs in ITERATE mode: when the idea doesn't state a format, the source script's current type pins it, so swapping a spoken example onto a trending-sound script (or vice versa) is refused unless the idea explicitly authorizes the format change. Set true ONLY when the user explicitly insisted on following that exact example anyway.","type":"boolean"},"skip_product_check":{"description":"Override the product-evidence sanity check. Before writing, the attached material (raw asset transcripts, the reference example's analysis) is checked against the chosen product_id; if the material clearly belongs to a DIFFERENT product of the same brand, the skill refuses with status needs_input / reason product_evidence_mismatch instead of writing a mis-assigned script. Set this true ONLY after the user explicitly confirmed the product despite the mismatch.","type":"boolean"},"swipe_file_example_id":{"description":"Optional swipe-file example to follow.","type":"integer"}},"required":["brand_id","idea"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"script.write","tags":["script"],"x-long-running":true,"x-permission":"script.write"}},"/skills/social.look/invoke":{"post":{"description":"LOOK at a public social post or profile exactly the way a person would - WITHOUT saving anything. Give it a link to a tweet / X post, Instagram post or Reel, TikTok, YouTube video or Short, Facebook video, or LinkedIn post / profile / company page, and it returns the post text or caption, who posted it (name, handle, bio, followers, following, post count, verified, joined, location, website), every engagement number LABELLED (views, likes, comments/replies, shares/reposts, saves/bookmarks, quotes), the top comments with their like counts (on X: the replies AND the quote posts, each with its author's follower count), what the post quotes or replies to, its outbound links, and the MEDIA ITSELF: photos come back as images you can see, videos come back as evenly sampled timestamped frames (images) plus the spoken transcript, so you can watch the video and read the tweet yourself. A profile/channel link returns the account PLUS its most recent posts with their metrics, so you can size an account and see what it posts. Use it whenever a user drops a social link and asks what it is, what it says, what's in the video, how it's doing, who posted it, or what people are saying - you cannot open these links on your own, this is how you look; never use web_fetch on a social link (it only sees the logged-out shell, with unlabelled numbers). Nothing is added to the swipe file or Raw Assets; when the user wants the post KEPT and fully analyzed, call swipe_add_from_url instead (or afterwards). Limits: X replies are only listable for posts from the last 7 days; who liked/reposted is never available; Instagram carousels expose only the cover image; LinkedIn gives post text, images/video, likes and comment count (no comment text) plus profile/company stats and a company page's recent posts - LinkedIn is look-only and can't be saved to the swipe file.","operationId":"invoke_social_look","requestBody":{"content":{"application/json":{"schema":{"properties":{"comments":{"description":"How many comments / replies to read (default 20, max 100, 0 to skip).","type":"integer"},"comments_sort":{"description":"'top' (most liked / most relevant, default) or 'recent' (newest first). Instagram, YouTube and X honour it; TikTok and Facebook return their default order.","type":"string"},"include_media":{"description":"Attach the photos / video frames as images (default true). Set false for a text-and-numbers-only read.","type":"boolean"},"include_transcript":{"description":"For videos: include the spoken transcript (default true).","type":"boolean"},"max_frames":{"description":"For videos: how many frames to look at, spread evenly across the runtime (default 12, max 24).","type":"integer"},"quotes":{"description":"X only: how many quote posts to read (default 10, max 50, 0 to skip).","type":"integer"},"recent_posts":{"description":"Profile links: how many of the account's most recent posts to include with metrics (default 10, max 30, 0 to skip). Not available for Facebook pages.","type":"integer"},"thread":{"description":"X only: reconstruct the full thread the tweet belongs to (every tweet in order). Default true.","type":"boolean"},"url":{"description":"The post, video, Reel, tweet, or profile/channel link (X/Twitter, Instagram, TikTok, YouTube, Facebook, LinkedIn).","type":"string"}},"required":["url"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"social.look","tags":["social"],"x-long-running":false,"x-permission":"social.read"}},"/skills/static.feedback/invoke":{"post":{"description":"Read the reviewer feedback (comments) left on a batch of static ads / carousel slides via its review link - who wrote each comment, which ad it's pinned to (ordinal + headline included so you can map it precisely), whether it has drawn markup, and whether it's resolved. Use this whenever the user mentions feedback/comments/notes reviewers left on their static ads. To ACT on the feedback, use static.revise with the affected ad_ids and an instruction carrying the reviewers' actual asks (pass the addressed comment ids as resolve_comment_ids there so they're marked handled). Group all comments about the SAME ad into one static.revise instruction.","operationId":"invoke_static_feedback","requestBody":{"content":{"application/json":{"schema":{"properties":{"batch_id":{"description":"The batch to read feedback for (from static.list). Defaults to the user's most recent batch.","type":"integer"},"include_resolved":{"description":"Also include comments already marked resolved. Defaults to false (open feedback only).","type":"boolean"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"static.feedback","tags":["static"],"x-long-running":false,"x-permission":"static.read"}},"/skills/static.generate/invoke":{"post":{"description":"Generate static ad image(s) for one of the user's brands + products from an idea or angle. This is AdBrain's strongest creative tool. You need a brand_id and product_id (from brand.list; personal brands use suggested_product_id '__brand__') and a clear idea/angle. BUNDLE: when ONE ad should sell 2+ products together (a starter pack, 'feature both products'), pass product_ids=[id1, id2, ...] instead of product_id \u2014 the ad composes them all and pulls each product's reference photos. CAROUSEL: pass format='carousel' (and optional slides, 3-10, default 5) when the user wants a multi-slide / swipeable / carousel ad \u2014 it generates ONE cohesive sequence (cover -> content -> CTA) with a shared visual template, not separate ads. Carousels honor example_ids too: the chosen example's analysis shapes the slide sequence and its dimensions set the slide ratio. Optionally pass count (the TOTAL number of ads to make, 1-20 \u2014 if the user asks for 10 ads, set count=10; count=N always means N separate single-image ads). THE IDEA IS PASSED VERBATIM to the image model for EVERY ad in the batch (each ad also gets its own copy variant), so write it as the creative direction for the whole set in plain conversational English. You may describe distinct compositions per ad ('Ad 1: flat-lay, Ad 2: ...') \u2014 the engine assigns one per ad and renders each as its own single image. YOU ARE THE ART DIRECTOR \u2014 decide which elements each ad actually carries, and why. The strongest statics are usually one bold headline over one striking visual: no body copy, no CTA button, no stamped logo, no stacked selling points. Look at the set you're about to make and choose deliberately in the idea \u2014 e.g. which ads are visual-first with minimal text and which (if any) carry an offer line or a CTA \u2014 instead of letting every ad get the same full text stack. Only call for extra elements when there's a real reason: the user asked, or the example clearly features them. REFERENCES: only pass example_ids the user actually chose; when the user gave no reference, omit example_ids \u2014 the model designs freely from the idea and the real product photos. ASPECT RATIO: OMIT aspect_ratio unless the USER explicitly asked for a size/placement \u2014 when omitted, the ad automatically matches the example's own dimensions (copying a card-shaped example yields a card-shaped ad). Never guess a placement ratio the user didn't ask for. It returns immediately with a static_ad artifact; the images render in the chat as they finish over the next minute or two. Reference photos of the product are pulled in automatically. After calling it, just tell the user the ads are generating and will appear in the card - don't paste image urls. IMPORTANT: when the user gives several examples to copy for the SAME brand+product, make ONE call with ALL of them in example_ids and the TOTAL count (e.g. 5 examples, 10 ads -> a single call with the 5 example_ids and count=10). Do NOT make one call per example - that splits the result into separate deliverables. One call = one pooled, shareable artifact.","operationId":"invoke_static_generate","requestBody":{"content":{"application/json":{"schema":{"properties":{"aspect_ratio":{"description":"ONLY pass this when the USER explicitly asked for a size or placement. When omitted, the ad auto-matches the example's own dimensions \u2014 which is what copying an example means; do NOT guess a placement (deciding a card-shaped example 'is for TikTok' and forcing 9:16 is exactly the mistake to avoid). Mapping the user's words when they DO ask: 'square' -> 1:1; 'portrait feed' / 'Instagram feed' -> 4:5; 'vertical' / 'Stories' / 'Reels' / 'TikTok' / 'fullscreen' -> 9:16; 'landscape' / 'horizontal' / 'YouTube' -> 16:9. Carousels also auto-match the example when omitted (every slide shares that one ratio - e.g. a TikTok-slideshow example yields 9:16 slides).","enum":["1:1","4:5","9:16","16:9","32:5"],"type":"string"},"audience":{"description":"Optional. WHO the ad is shown to / how warm they are, in plain words (e.g. 'cold prospects who don't know the brand', 'cart abandoners', 'existing customers', or a named persona). Shapes tone and assumptions.","type":"string"},"awareness_stage":{"description":"Optional. The prospect's awareness stage (Eugene Schwartz) this ad targets. Set it when the user signals it - e.g. cold/intro -> Unaware or Problem-Aware; comparison/why-us -> Solution/Product-Aware; retargeting/offer -> Most-Aware. If omitted, it's inferred from the idea.","enum":["Unaware","Problem-Aware","Solution-Aware","Product-Aware","Most-Aware"],"type":"string"},"brand_id":{"description":"The brand_id (from brand.list).","type":"string"},"count":{"description":"STATIC only: the TOTAL number of ads to make (1-20). Defaults to 1. If the user asks for N ads, set this to N. When example_ids are given, the total is spread across those examples (it is NOT multiplied per example).","type":"integer"},"creator_id":{"description":"FEATURE ONE CREATOR: the id of a creator profile (brand.get lists a brand's creators; record.get entity_type='creator'). Their reference photos (profile picture first) are handed to the image model so the person in every ad / carousel slide is THAT person, consistently. Pass it whenever the user picked a creator in chat or says 'featuring <name>' / 'with me in it'. Never pick a creator the user didn't name; you do not need reference_asset_ids or include_roles=['person'] for them.","type":"integer"},"customer_persona_id":{"description":"Optional saved customer persona to target (from persona.list). The copy/angle is written to convince THIS person \u2014 resolve one for most generations: a persona the user attached wins, else the best brand-matching persona, else a fitting global one. The persona shapes the WORDS, not the picture (it won't force that demographic into the image).","type":"integer"},"example_ids":{"description":"ONLY ids the USER chose (attached references, examples they explicitly picked, or fresh-inspiration picks). When the user gave no reference, OMIT this entirely - the model designs freely from the idea and the real product photos; no example is needed for a strong ad. Never go find an example yourself (no inspiration.find / swipe.list hunting).","items":{"type":"string"},"type":"array"},"format":{"description":"'static' (default) = single-image ad(s). 'carousel' = ONE cohesive multi-slide swipeable sequence (cover -> content slides -> CTA), sharing a visual template across slides. Use carousel when the user asks for a carousel / multi-slide / swipe-through ad.","enum":["static","carousel"],"type":"string"},"funnel_stage":{"description":"Optional. Funnel position: TOF (cold/awareness), MOF (warm/consideration), BOF (hot/decision). Keep consistent with awareness_stage. Inferred if omitted.","enum":["TOF","MOF","BOF"],"type":"string"},"idea":{"description":"The angle/concept for the ad (or, for a carousel, the concept the whole multi-slide sequence should cover). Passed VERBATIM to the image model for every ad in the batch, so write it in plain conversational English as direction for the whole set. PRODUCT SCALE: when the ad features multiple products with different real-world sizes, include ONE short sentence stating their relative sizes (e.g. 'For scale: the mouthwash bottle is about twice as tall as the toothpaste tubes'), using sizes from the product data or from the user \u2014 the image model sees each product as a separate full-frame photo and CANNOT infer relative scale on its own, so without this sentence everything renders the same size. If sizes matter and you don't know them, ask the user.","type":"string"},"include_roles":{"description":"Optional EXTRA reference-image roles to expose to the image model beyond the default product shots. Valid roles (same categories as the product editor): 'packaging' (retail box/label/container), 'product' (the bare item itself), 'ingredient' (raw contents/material), 'product_item' (close-up/in-use shot), 'logo', 'person' (spokesperson), 'lifestyle'. IMPORTANT \u2014 the brand logo is OPT-IN and is only composited when you add 'logo' here. Do NOT include 'logo' by default: most strong static ads do not need a stamped logo, and forcing it makes every ad look templated. Only add 'logo' when the user asks for it or when the chosen example design clearly features a prominent brand logo. In CAROUSELS an included logo lands on the final CTA slide ONLY \u2014 cover and content slides always stay clean of it. Use ['person'] when the user asks to feature someone (e.g. a named expert). PRODUCT ASSIGNMENT IS THE GATE: for a product's ad, a role only pulls images ASSIGNED to the featured product(s) (product_id / product_ids in raw.list). An image with no product ('Whole brand' - a spokesperson, a gift bag, a lifestyle scene) is never pulled by role into a product's ad: hand-pick it with reference_asset_ids (or creator_id for a creator) instead.","items":{"type":"string"},"type":"array"},"native_photo":{"description":"NATIVE PHOTO mode: the deliverable is a hyper-photorealistic CANDID PHOTO (looks like a real person snapped it on their phone), NOT a designed ad - zero text, zero branding, zero graphic elements. Set this whenever the user asks for native/UGC-style photos, 'looks like a real picture', POV product photos, etc. (it also auto-detects from the idea text as a fallback). In this mode no example ad structure is imposed - the idea and the product reference photos drive the image directly.","type":"boolean"},"proceed_without_product_images":{"description":"Override the missing-reference-images check. By default, if the product has NO reference photos to ground the packaging on, static.generate refuses and returns needs_input so you can ASK the user for photos instead of inventing packaging. Only set this true when the user has explicitly said to go ahead WITHOUT accurate packaging.","type":"boolean"},"product_id":{"description":"Product id from brand.list, or '__brand__' for personal/creator brands with no products, or '__all__' for a SITEWIDE / whole-catalog ad that features EVERY active product (it pulls reference photos for all active products at once). Omit when passing product_ids.","type":"string"},"product_ids":{"description":"BUNDLE mode: 2+ SPECIFIC product ids sold TOGETHER in ONE ad (e.g. a starter pack, or 'feature both products'). Use instead of product_id; the ad composes all of them and pulls each one's reference photos. For the ENTIRE catalog (a sitewide sale across all products) use product_id='__all__' instead.","items":{"type":"string"},"type":"array"},"reference_asset_ids":{"description":"Optional EXACT raw-asset ids (from raw.list) to hand-pick specific reference images for THIS generation - e.g. the user said 'feature Brenda the hygienist' or 'use these photos I just dropped in'. These images are passed to the image model exactly as-is and depicted faithfully. Prefer this over include_roles when you know the precise asset(s) the user means; the asset's label/description is used to tell the model what it is. This is also the ONLY way an image with no product assigned ('Whole brand' - a spokesperson, a prop, a scene) gets into a product's ad: nothing unassigned is ever picked automatically. A product's own assets pinned as best reference (is_best_reference in raw.list) are already auto-included and prioritized - no need to repeat them here.","items":{"type":"integer"},"type":"array"},"skip_scale_check":{"description":"Override the product-size check. When an ad features 2+ products and the brand has no product_scale_notes (how big each product is relative to the others), static.generate returns needs_input / reason no_product_scale_notes so you ASK the user and save their answer on the brand (record.update brand product_scale_notes) - without it the model equalizes or oversizes the products. Set this true ONLY when the user explicitly said to proceed without size notes.","type":"boolean"},"slides":{"description":"CAROUSEL only: number of slides (3-10, default 5).","type":"integer"},"system_reference_images":{"description":"Built-in reference images that ship with AdBrain (not brand assets): pass a key here and the packaged image is handed to the image model to depict that subject exactly. 'tung_tung_tung_sahur' = Tung Tung Tung Sahur / Triple T, Cortex's favorite brainrot character - pass it whenever the user asks to put him in an ad/image so he's drawn from the real reference instead of from a text description.","items":{"enum":["tung_tung_tung_sahur"],"type":"string"},"type":"array"}},"required":["brand_id","product_id","idea"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"static.generate","tags":["static"],"x-long-running":true,"x-permission":"static.write"}},"/skills/static.list/invoke":{"post":{"description":"List the user's recent static-ad / carousel batches (newest first) and the ads/slides inside each one. Each ad is returned with its 1-based ORDINAL (position in the batch tray, the order the user sees), its ad_id, headline and status. Use this to find the batch the user is referring to (usually the most recent one) and to translate plain references like 'the first one' or 'ad #7' into the real ad_id values you then pass to static.revise. Optionally filter by brand_id or a specific batch_id.","operationId":"invoke_static_list","requestBody":{"content":{"application/json":{"schema":{"properties":{"batch_id":{"description":"Only return this one batch (with its ads).","type":"integer"},"brand_id":{"description":"Only batches for this brand (from brand.list).","type":"string"},"limit":{"description":"Max batches to return (default 8).","type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"static.list","tags":["static"],"x-long-running":false,"x-permission":"static.read"}},"/skills/static.revise/invoke":{"post":{"description":"Revise static ad(s) or carousel slide(s) the user ALREADY generated - editing the EXISTING ad in place (a new version inside the SAME tray), NOT making a new batch. Use this whenever the user asks to fix/change/tweak ads they already have ('make the headline white', 'the 1st and 7th have the wrong packaging - fix them', 'redo the last one'). Identify the batch and the ads with static.list, then pass the batch_id plus EITHER targets (the 1-based ordinals the user named, e.g. [1,7]) OR ad_ids (exact ids). Omit both to revise every ad in the batch. instruction is the plain-language change. mode: 'precise' (default - a surgical edit, everything else stays identical), 'freestyle' (bigger creative changes), or 'expand' (add margin/breathing room). Product reference photos are re-fed automatically (the batch's product, or products matched from each ad's own text). YOU control what the image model sees: pass product_ids when a slide depicts specific product(s) so their photos are guaranteed to ride along; pass raw_asset_ids to expose specific reference assets (a prop, a gift bag); pass template_target/template_ad_id to attach a finished sibling slide as the design template the revision must match (essential for carousel consistency - e.g. the anchor card the deck is styled after). When different slides need different fixes or references, make ONE static.revise call PER slide instead of batching them. The same tray card updates as each revision finishes - do NOT call static.generate to revise.","operationId":"invoke_static_revise","requestBody":{"content":{"application/json":{"schema":{"properties":{"ad_ids":{"description":"Exact ad_id values to revise (from static.list). Use instead of targets when you have the precise ids.","items":{"type":"integer"},"type":"array"},"batch_id":{"description":"The batch the ads live in (from static.list). Defaults to the user's most recent batch if omitted.","type":"integer"},"instruction":{"description":"The plain-language change to make (e.g. 'use the correct product packaging', 'make the headline white and bigger').","type":"string"},"mode":{"description":"precise (default), freestyle, or expand.","enum":["expand","precise","freestyle"],"type":"string"},"product_ids":{"description":"Product id(s) the targeted ad(s) depict - their reference photos are attached to the edit so the product renders true. Pass this for carousel slides (the batch is brand-wide, so the right product photos are NOT implied) or whenever the fix involves how a product looks.","items":{"type":"string"},"type":"array"},"raw_asset_ids":{"description":"Specific raw asset id(s) (from raw.list) to expose to the edit - e.g. the exact photo of a prop, gift bag, or person the ad must depict faithfully.","items":{"type":"integer"},"type":"array"},"resolve_comment_ids":{"description":"Optional: reviewer comment ids (from static.feedback) this revision addresses - they'll be marked resolved.","items":{"type":"integer"},"type":"array"},"targets":{"description":"1-based ordinals within the batch to revise, in the order shown in the tray (e.g. [1,7] = the first and seventh ad). Omit to revise ALL ads.","items":{"type":"integer"},"type":"array"},"template_ad_id":{"description":"Exact ad_id of the design-template slide (alternative to template_target).","type":"integer"},"template_target":{"description":"1-based ordinal of a FINISHED slide in this batch whose design the revision must match (e.g. the anchor card of a carousel). Its current image is attached as the design template.","type":"integer"}},"required":["instruction"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"static.revise","tags":["static"],"x-long-running":true,"x-permission":"static.write"}},"/skills/swipe.add_from_ad/invoke":{"post":{"description":"Import the ACTUAL creative file behind one of the brand's own ads into the Swipe File - works for ads from the brand's Meta connection AND ads tracked by Triple Whale (TW mirrors the media in its own bucket). This is THE way to study/remix an ad from performance.get: it downloads the real video (works even when the ad is paused), runs the normal full swipe analysis, and stamps the example with import_source provenance - ad account/shop, ad name, asset file name, and a REAL performance snapshot (spend/purchases/revenue/ROAS). NEVER feed an ad's preview_link or post permalink to swipe.add_from_url - those pages are login-walled and analyze as empty; use this skill instead. Identify the ad with ad_key or ad_id from a performance.get row (or ad_name). FLEX ads: to import ONE creative from inside a Flex/Related-Media ad, take the video_id from a performance.asset_breakdown row and pass it here with the ad_key - this works even when the video isn't in the ad's stored creative.assets (a pasted facebook.com /videos/ or watch?v= link is also accepted and cleaned to the id). Otherwise every stored video asset is imported; asset_index picks the Nth. Returns 'analysis_in_progress' per asset - that is NOT an error; call swipe.get with the example_id (it waits for the analysis) before reading hooks/replication_guide. RESILIENCE: when the direct file fetch fails (Triple Whale never mirrored the file, or Meta refuses permission - e.g. partnership-page videos), the import automatically falls back to the ad's PUBLIC post link through the normal URL pipeline, keeping the ad's provenance and performance snapshot. If even that errors and you have the ad's public post URL from any other source, swipe.add_from_url with that URL is a valid last resort.","operationId":"invoke_swipe_add_from_ad","requestBody":{"content":{"application/json":{"schema":{"properties":{"ad_id":{"description":"The Meta ad id, if known.","type":"string"},"ad_key":{"description":"The ad_key from a performance.get row (preferred identifier).","type":"string"},"ad_name":{"description":"The ad's name (exact or partial) - fallback when no ad_key/ad_id.","type":"string"},"asset_index":{"description":"Import only the Nth asset (1-based, as listed in creative.assets).","type":"integer"},"brand_id":{"description":"The brand whose Meta connection owns the ad (required).","type":"string"},"title":{"description":"Optional title for the swipe example(s); defaults to the asset's file name.","type":"string"},"video_id":{"description":"Import only this one video/media asset - from the ad's creative.assets OR a performance.asset_breakdown row. Accepts a Meta video id (digits), a facebook.com video link, or a Triple Whale asset_id (breakdown rows from TW-tracked brands expose asset_id - pass it here as-is).","type":"string"}},"required":["brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"swipe.add_from_ad","tags":["swipe"],"x-long-running":true,"x-permission":"swipe.write"}},"/skills/swipe.add_from_url/invoke":{"post":{"description":"Save ads from social links (TikTok, Instagram, YouTube, Facebook, or X/Twitter) into the user's Swipe File and analyze them - transcript, visual breakdown, hooks, and a replication guide. Use this when the user shares ad link(s) they want to study, save, or emulate. MULTIPLE LINKS: pass them ALL in ONE call as urls=[...] - they are analyzed in PARALLEL, which is several times faster than calling this once per link. Already-saved ads are detected by the platform's own post id and returned instantly without re-analyzing (status 'already_in_swipe_file' - that's a success, use the returned example_id). Optionally tie them to a brand with brand_id. A fresh analysis takes a few minutes; when a result says 'analysis_in_progress' that is NOT an error - poll the swipe_get tool with that example_id every ~20s until analysis_completed is true.","operationId":"invoke_swipe_add_from_url","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"Optional brand to associate these examples with.","type":"string"},"placement":{"description":"Where this creative was made to run, when you or the user KNOW it (e.g. the user says it's a TV spot): one of organic_social, paid_social, ctv_linear, online_video. Aliases like 'CTV' are accepted. Omit to let analysis detect it - an explicit value is never overwritten.","type":"string"},"url":{"description":"Link to a single TikTok/Instagram/YouTube/Facebook/X(Twitter) ad.","type":"string"},"urls":{"description":"Several ad links to save+analyze IN PARALLEL. Always prefer this over multiple calls.","items":{"type":"string"},"type":"array"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"swipe.add_from_url","tags":["swipe"],"x-long-running":true,"x-permission":"swipe.write"}},"/skills/swipe.analyze/invoke":{"post":{"description":"Analyze a Swipe File example by its id (use swipe.list to find ids) and return its structured breakdown - transcript, visual analysis, hooks, and replication guide. If it was already analyzed, returns the saved analysis immediately. If it still needs analysis, that runs in the BACKGROUND (a few minutes) and this returns status 'analysis_in_progress' with an example_id - that is NOT an error; call the swipe_get tool ONCE with that example_id and it will wait for the analysis to finish and return the breakdown. COMMITMENT WARNING: calling this on a chat upload declares it an AD EXAMPLE - it runs the slow, paid ad analysis and promotes the file into the swipe file. Be sure first (from the user's words). Raw material (b-roll, interviews, the user's own footage/audio) goes to raw.save instead; if unsure which one an upload is, ask the user.","operationId":"invoke_swipe_analyze","requestBody":{"content":{"application/json":{"schema":{"properties":{"example_id":{"description":"The swipe-file example id (from swipe.list).","type":"integer"},"force":{"description":"Re-analyze from scratch even if an analysis already exists (same as the Re-analyze button). Use it to refresh an old analysis or to capture the timestamped analysis frames on a video example that predates frame persistence (swipe.get shows frames_note when that's the case).","type":"boolean"}},"required":["example_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"swipe.analyze","tags":["swipe"],"x-long-running":true,"x-permission":"swipe.write"}},"/skills/swipe.frames/invoke":{"post":{"description":"LOOK at the actual screenshots a video swipe example was analyzed from. Returns the timestamped frames as IMAGES you can see (plus their fetchable URLs), straight from storage - no re-download, no re-processing. Use it whenever a written analysis isn't enough: checking framing, on-screen text placement, product shots, cut rhythm, the exact look of the hook, or when you need to hand real frames to an image/video tool (motion control, replacement, reference images). Pick a time window with from_seconds/to_seconds to zoom into one stretch of the ad. Videos only; examples analyzed before frames were kept return none - swipe.analyze force=true captures them.","operationId":"invoke_swipe_frames","requestBody":{"content":{"application/json":{"schema":{"properties":{"example_id":{"description":"The swipe-file example id.","type":"integer"},"from_seconds":{"description":"Only frames at/after this timestamp.","type":"number"},"max_frames":{"description":"How many frames to look at (default 12, max 32). When the example has more, they're thinned evenly across the selected window.","type":"integer"},"to_seconds":{"description":"Only frames at/before this timestamp.","type":"number"}},"required":["example_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"swipe.frames","tags":["swipe"],"x-long-running":false,"x-permission":"swipe.read"}},"/skills/swipe.get/invoke":{"post":{"description":"Get one Swipe File example by id, including its analysis. After swipe.add_from_url or swipe.analyze returns 'analysis_in_progress', call this ONCE with the example_id: it waits for the analysis to finish (up to a couple of minutes) and returns the hooks, key_takeaways, and replication_guide. You do NOT need to poll it repeatedly. If it returns 'analysis_in_progress', the analysis just needs more time - tell the user it's still processing (or call again to keep waiting). If the analysis was never started, this safely starts it before waiting (it never duplicates a run already in progress). COMMITMENT WARNING: calling this on a chat upload treats that upload as an AD EXAMPLE - it triggers the slow, paid ad analysis and promotes the file into the swipe file. Only call it once you're sure (from the user's words) the upload is an example to copy, NOT raw material (use raw.save for that) or a brand document. NAMING: if the user gave the upload a name or project identifier (e.g. 'INTV414_v2_POV you use our mouthwash'), pass it as `title` HERE \u2014 it's applied before analysis so the auto-generated title can never overwrite the user's real name. This is the reliable way to preserve their naming; don't rely on a separate rename call.","operationId":"invoke_swipe_get","requestBody":{"content":{"application/json":{"schema":{"properties":{"example_id":{"description":"The swipe-file example id.","type":"integer"},"title":{"description":"Optional. The user's own name/identifier for this upload, kept VERBATIM (e.g. 'INTV414_v2_POV you use our mouthwash and suddenly'). Applied before analysis so it's never overwritten by an auto-generated title. Pass this whenever the user named the file or project.","type":"string"},"wait":{"description":"Wait for an in-progress analysis to finish before returning (default true). Set false to read the current status immediately without waiting.","type":"boolean"}},"required":["example_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"swipe.get","tags":["swipe"],"x-long-running":true,"x-permission":"swipe.read"}},"/skills/swipe.list/invoke":{"post":{"description":"List the ads saved in the user's Swipe File (examples worth emulating), with titles, format, source, brand, and each video's detected TYPES (video_styles - e.g. 'Trending Sound', 'Voice Over', 'Founder-Led', 'Talking Head') plus niche tags and times_used (how often it's been followed - PREFER LESS-USED examples for variety; don't keep reusing one favorite). Use this to pick an example whose FORMAT matches what you're writing: a trending-sound/caption post needs a 'Trending Sound' (caption-driven) example, a founder story needs 'Founder-Led'/'Voice Over' - following a spoken example for a caption post (or vice versa) corrupts the script. Pass video_style to filter the WHOLE library server-side by format (e.g. video_style='Trending Sound') - do this whenever the format is known, instead of eyeballing the newest rows. Filter by placement (where the creative was made to run: organic_social, paid_social, ctv_linear for connected/linear TV spots, online_video) when the task targets a specific medium - e.g. placement='ctv_linear' to find saved TV ads. Filter from_ad_account=true for examples imported from the brand's own connected ad account (real performance provenance), or false for outside inspiration only. Rows with analysis_ready=false can't be followed yet (swipe.get can wait on them). PICKING A REFERENCE TO FOLLOW: pass brand_id - rows then carry followed_by_this_brand_recently (how many times this brand's scripts followed it in the last 45 days) and the list is ordered FOR VARIETY (never-followed and less-used first, recently-followed last, ties shuffled) instead of newest-first - so the same three references don't come back every batch. Each row's `requires` says what making your own version of that format needs: original_clip (the meme IS that clip/sound with a new caption - the editor reuses the example's own video), performer (someone on camera acting to the sound), own_footage (the brand's footage under the sound), screen_recording, hybrid. Match it to what the brand actually HAS (raw.list) before choosing - a 'performer' format with no performer clip, or an 'original_clip' meme you'd fake with b-roll, is the wrong pick.","operationId":"invoke_swipe_list","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"description":"The brand you are picking a reference FOR. Adds followed_by_this_brand_recently per row and orders the list for variety (never-followed / less-used first, recently-followed last). Always pass it when choosing an example to follow.","type":"string"},"from_ad_account":{"description":"true = only examples imported from the brand's own connected ad account (they carry a real performance snapshot); false = only outside inspiration.","type":"boolean"},"global_only":{"description":"true = only the built-in GLOBAL swipe file (AdBrain's curated examples available to every account).","type":"boolean"},"limit":{"description":"Max examples to return (default 30).","type":"integer"},"offset":{"description":"Skip this many rows (paging). Rows are newest first.","type":"integer"},"placement":{"description":"Filter by where the creative was made to run: one of organic_social, paid_social, ctv_linear (connected/linear TV spots), online_video (long-form landscape, e.g. YouTube pre-roll). Searches the whole library. Aliases like 'CTV' or 'linear tv' are accepted.","type":"string"},"video_style":{"description":"Filter to examples whose detected video_styles include this style (case-insensitive, e.g. 'Trending Sound', 'Voice Over', 'Talking Head'). The filter searches the ENTIRE swipe file, not just the newest rows - always use it when the target format is known.","type":"string"},"with_signals":{"description":"true = include ranking signals per row: is_global, performance (spend/purchases/revenue/roas from the ad account), running_days (how long an ad-library ad has been active - long-running = proven), views/likes/engagement_score for organic posts. Use for 'best of' picks.","type":"boolean"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"swipe.list","tags":["swipe"],"x-long-running":false,"x-permission":"swipe.read"}},"/skills/swipe.update/invoke":{"post":{"description":"Rename a swipe-file example (set its title) and optionally update its description/notes. Use this to PRESERVE the user's own project names and identifiers: when a file they uploaded or a project they referenced carries a meaningful name (e.g. 'INTV404_v2_Dont fall for the hype...'), that name should be the example's title - their naming convention outranks any auto-generated title. Also use it when the user explicitly asks to rename an example. Do NOT use junk filenames (random digit strings, IMG_1234, timestamps) as titles - infer the real name from the chat or ask.","operationId":"invoke_swipe_update","requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"description":"Optional notes to store on the example (e.g. context the user gave about the project).","type":"string"},"example_id":{"description":"The swipe example to update (from swipe.list or the upload reference).","type":"integer"},"title":{"description":"The new title - the user's project name/identifier, kept verbatim (e.g. 'INTV404_v2 - Dont fall for the hype around nanohydroxyapatite').","type":"string"}},"required":["example_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"swipe.update","tags":["swipe"],"x-long-running":false,"x-permission":"swipe.write"}},"/skills/trash.restore/invoke":{"post":{"description":"Bring deleted OR disappeared things BACK. Use whenever the user asks to restore, recover, undelete, or 'bring back' something they removed - a brand, script, swipe-file example, raw asset, static-ad batch, video cut (item_type='video_edit' - one cut per id; a version's revisions are separate cuts; posts that were cancelled when it was deleted are not re-scheduled), persona, landing page, rough idea, artifact, folder, or product - OR when a brand seems to have VANISHED (e.g. after a deploy/org switch) and isn't in the normal trash. Call action='list' first: it returns recoverable trashed items AND 'hidden_brands' (live brands hidden by an organization mismatch). Then action='restore' with item_type+item_id to undelete a trashed item, or action='recover_hidden' with brand_id to bring a hidden brand back into the current workspace. Both re-home the item so it actually shows up again. Use this instead of telling the user something is gone for good. Read-then-write.","operationId":"invoke_trash_restore","requestBody":{"content":{"application/json":{"schema":{"properties":{"action":{"description":"'list' to see recoverable + hidden items (default), 'restore' to undelete a trashed item, 'recover_hidden' to bring back a live brand hidden by an org mismatch.","enum":["list","restore","recover_hidden"],"type":"string"},"brand_id":{"description":"brand_id of a hidden brand to bring back (required for action='recover_hidden'; from list's hidden_brands).","type":"string"},"item_id":{"description":"Id of the item to restore (required for action='restore'). Use the id from action='list'.","type":"string"},"item_type":{"description":"What to restore (required for action='restore').","enum":["brand","script","raw_asset","static_ad","persona","landing_page","rough_idea","swipe_file","artifact","video_generation","video_edit","folder","product","chat"],"type":"string"},"query":{"description":"Optional keyword to filter the list by name.","type":"string"}},"required":[],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"trash.restore","tags":["trash"],"x-long-running":false,"x-permission":"trash.write"}},"/skills/upload.appraise/invoke":{"post":{"description":"Cheaply LOOK at a chat upload before deciding what it is. Samples a few frames (video) or the image itself and guesses: is this a produced AD EXAMPLE to copy, or the user's own RAW MATERIAL (b-roll, interviews, product shots) to build an ad from? Costs one small vision call - it does NOT run the expensive swipe analysis, does NOT promote anything into the swipe file, and saves nothing. Use it when the user's message doesn't make an upload's purpose clear, then either decide or ask the user with the guess in hand ('this looks like an example to copy - right?'). The user's stated intent always outranks this guess.","operationId":"invoke_upload_appraise","requestBody":{"content":{"application/json":{"schema":{"properties":{"example_id":{"description":"The chat upload's id (upload/example #N).","type":"integer"}},"required":["example_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"upload.appraise","tags":["upload"],"x-long-running":false,"x-permission":"swipe.read"}},"/skills/user.ask/invoke":{"post":{"description":"PAUSE this job and ask the user ONE question in the chat, then wait for their answer. Use it whenever the user's call genuinely changes what you'd build: (1) a blocker only they can resolve (an upload that could be an example to copy OR their own footage to build from); (2) a CONSEQUENTIAL CREATIVE FORK \u2014 two plausible readings of the request that produce meaningfully different deliverables; (3) a REUSE opportunity \u2014 finished work from this same conversation could satisfy the request faster or better than generating from scratch (offer it: 'reuse the statics we just made, or design fresh?'). A skilled human strategist asks ONE sharp question at moments like these instead of silently guessing \u2014 the user would much rather tap a button than receive the wrong deliverable. Ask ONE specific question. ALWAYS pass `options` with 2-5 short, concrete choices when the answer is a choice (the user gets tappable buttons + a free-text 'Other'); omit options only for a genuinely open-ended question. Returns {status:'answered', answer} when they reply; 'no_answer' if they don't reply in time (then proceed with your most reasonable interpretation and state the assumption); 'cancelled' if they stopped the job. Don't ask about things the conversation or account data already answers, and never stack multiple questions.","operationId":"invoke_user_ask","requestBody":{"content":{"application/json":{"schema":{"properties":{"options":{"description":"2-5 short, concrete answer choices the user can tap. Omit only for an open-ended question; a free-text 'Other' is always offered too.","items":{"type":"string"},"type":"array"},"question":{"description":"The single, specific question for the user.","type":"string"}},"required":["question"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"user.ask","tags":["user"],"x-long-running":true,"x-permission":"user.ask"}},"/skills/video.edit/invoke":{"post":{"description":"CUT a finished video ad (mp4) for a script from the brand's OWN uploaded footage - AdBrain's editor picks the shots, cuts to the script's hook/body/CTA, times on-screen captions, records the voiceover (when configured), and renders. It studies the script's reference swipe example (analysis + its real frames) for structure and pacing, and only uses raw-asset clips tagged to this product or brand-wide (never another product's footage). `variants` (1-10) renders that many edits = that many VERSIONS of this ONE script - each leads with a different script hook (hook 1, 2, 3... in order) and a different shot order. 'N versions' is always one script with N hooks and variants=N, never N scripts; when N exceeds the script's hook count, script.add_hook first. Edits render in parallel, so a batch takes about as long as one cut (a few minutes); the result card fills in live, and the finished video + its timeline are readable via record.get entity_type='video_edit'. Requirements: the script exists, and the brand has video raw assets whose footage index has finished (uploads index automatically - check raw.list file_type='video' and the `footage` summary; if a clip shows 'not indexed yet', wait or ask the user to re-index). If the footage doesn't contain the product, the editor stops and says exactly what's missing - relay that, don't retry blindly. NO-SCRIPT / ORGANIC MODE: when the user filmed the content themselves (a talking-head take, a founder video, a day's footage) and wants it 'edited together' / 'cut into a post', pass asset_ids (+ brand_id) WITHOUT script_id: the editor transcribes the take, cuts it on sentences (removes restarts, filler, dead air), adds word-synced captions and code-made motion graphics in the brand's look, and renders. Put the user's direction in instructions. Clips still indexing are fine here - the editor waits for the index itself. WHAT asset_ids MEAN (with or without a script): they are the MAIN footage - what the cut is built from. They do NOT hide the rest: the editor still sees and can search every other indexed clip and every image of the brand, and uses them as supporting material (b-roll, cutaways, pictures). Pass only_these_clips=true ONLY when the user wants no other clips than those in the cut (the brand's images and graphics and the built-in library stay available); the result reports which applied as `library_scope` ('brand' | 'only_these'). A CREATOR ON A CUT (creator_id) = WHOSE PIECE IT IS, nothing more. Like a creator in real life they can narrate a voiceover, talk to camera, do a green screen, host a podcast, react to a clip or act to a trending sound - the editor works out how they appear from the script's format, the reference example and the instructions, and their identity (their cloned voice, their filmed clips, their reference photos) stays with the cut however that turns out. Picking a creator does NOT mean they must be on camera and does NOT ban other people from the cut: the editor has the brand's whole footage library and may show other people when the piece calls for it (say 'only <name>, nobody else' in instructions when the user wants that). A VOICEOVER AD is narration over footage - the voice is heard, the speaker need not be seen, the picture is the brand's b-roll, product shots, screen recordings and graphics. It needs NO footage of the narrator and NOTHING generated: with a creator it is THEIR voice (creator_id; add creator_role='voice' when the user asked for a voiceover in so many words), with no creator the editor casts a fitting voice. Never turn a voiceover request into a generated a-roll, and never tell the user a voiceover ad needs footage of the narrator. FULLY GENERATED A-ROLL (generate_aroll=true + creator_id + script_id): no filmed footage needed - the creator performs the script on camera, generated from their reference photos and the product's photos in their cloned voice, faithfully reconstructing the script's reference swipe example for THIS brand and product (not a face swap of the original). The user asking for it IS the permission - no setting forbids it. It is priced per second of video, so unless the user's Settings skip the price check the first call returns needs_input with the price; relay it and call again with allow_creator_generation=true on the user's yes.","operationId":"invoke_video_edit","requestBody":{"content":{"application/json":{"schema":{"properties":{"allow_creator_generation":{"description":"The user's answer to the PRICE of generating the creator (creator_id) with AI. true = they were told the price and said yes (or said up front not to ask: 'just generate it, I know it costs'); false = 'real footage only'. Leave it out otherwise and the skill does the right thing by itself: the cut is made from the brand's real footage with the creator as its voice; only generate_aroll=true, or a script whose format needs them ON CAMERA (talking head, podcast, green screen...) when no footage of them exists, returns ONE needs_input question with the exact price and the voiceover alternative - or starts right away when the user's Settings say 'AI creators: generate when I ask'. Never pass true on your own.","type":"boolean"},"allow_generated_footage":{"description":"FILLER CLIPS ONLY (nothing to do with creators - see generate_aroll): may the editor, on its own, GENERATE a short abstract AI clip (Higgsfield / Seedance) as a LAST RESORT for a non-human visual the brand's footage lacks (a texture, an object, an environment)? Filler never shows people or imitates filmed/UGC/stock footage, and a brand with a real library gets at most one clip. Paid per clip (roughly $0.10-0.60 each, max 3 per cut - video_edit_service.MAX_GENERATED_CLIPS). Leave it out unless the user answered: the user's Settings decide ('always' allows, 'off' never). Pass false when the user says anything like 'real footage only' / 'no AI footage'; pass true only to relay an explicit yes.","type":"boolean"},"aspect_ratio":{"description":"Orientation of the deliverable - set it from the PLACEMENT, never leave it to default when the user named one: CTV / connected TV, linear TV, YouTube pre-roll or in-stream, landscape, website hero -> '16:9'. Reels / TikTok / Shorts / Stories / organic vertical -> '9:16' (default). Feed square -> '1:1'; feed portrait -> '4:5'. The editor reframes vertical footage for a wide frame (punch-in, blurred fill, split layouts) - it never letterboxes by default.","type":"string"},"asset_ids":{"description":"Optional: raw asset ids (video clips) - the main footage for this cut; the rest of the brand's library stays available as supporting material unless only_these_clips is true. Default (none given): every indexed clip tagged to the script's product or brand-wide.","items":{"type":"integer"},"type":"array"},"brand_id":{"description":"Required when there is no script_id: the brand the footage belongs to (brand.list).","type":"string"},"creator_id":{"description":"THE CREATOR OF THIS CUT: the id of a creator profile (brand.get lists a brand's creators; record.get entity_type='creator'). It says whose piece this is: their cloned voice is the voice of the cut, their filmed clips are marked for the editor, and anything generated of a person is them. It does NOT decide how they appear (voiceover, talking head, green screen, podcast, trending sound... the editor reads that from the script, the example and the instructions), does NOT require footage of them, and does NOT exclude other people from the cut. Pass creator_id whenever the user picked a creator in chat or says 'featuring <name>' / 'just me' / 'with <name>' / 'in <name>'s voice' - and when they say ONLY that person may appear, put that in instructions. Never pick a creator the user didn't name.","type":"integer"},"creator_role":{"description":"OPTIONAL, and only when the USER said how the creator should appear - leave it out otherwise and the editor decides (the normal case). 'voice' = the user asked for a voiceover / VO / narration / 'my voice over b-roll': the creator narrates in their cloned voice over the brand's footage, works with ZERO footage of them, nothing is generated, no extra cost (it needs their cloned voice). 'on_camera' = the user asked to SEE them (talking head, 'have me in the video'): the cut needs their filmed clips, or generate_aroll=true. Never set it from your own guess about the format, and never combine 'voice' with generate_aroll.","enum":["on_camera","voice"],"type":"string"},"generate_aroll":{"description":"FULLY GENERATED TALKING-HEAD A-ROLL: the creator (creator_id) performs the script's spoken lines ON CAMERA - every segment generated from their reference photos and the product's photos, spoken in their cloned voice, following the script's reference example (setting, framing, how the product is held, the beats) - and the cut is built from that instead of filmed footage. PASS TRUE WHENEVER the user wants a creator ON CAMERA in a video that was never filmed: recreate / reproduce an ad with them, a talking-head or UGC video 'with me as the creator', 'my AI clone', 'AI UGC', 'generate the a-roll'. NOT for a voiceover ad: a voiceover is the creator's VOICE over the brand's footage (creator_role='voice') and needs nobody on camera. The user's request is the permission - nothing in Settings forbids it, and 'real footage only' rules about filler clips do not apply to it. Needs script_id (a script with spoken lines) and creator_id (with reference photos). It is charged per generated second: the skill returns needs_input with the exact price first (relay it; call again with allow_creator_generation=true on the user's yes) unless the user's Settings skip the price check, in which case it starts at once. With no `variants` it makes ONE version (each version is generated in full). Each generated segment is saved to the brand's Raw Assets (folder 'AI a-roll', tagged to the creator, ai_generated).","type":"boolean"},"instructions":{"description":"Optional creative direction for the editor in the user's words (e.g. 'open on the unboxing', 'no voiceover, captions only', 'under 20 seconds').","type":"string"},"music_asset_id":{"description":"The exact track for this cut: an audio raw asset id (or a video asset whose sound should be lifted). MUSIC IS OPT-IN - without this, cuts have NO music unless the instructions ask for it or the format is a trending-sound ad. Never pick a track the user didn't choose; if music is wanted and none is uploaded, ask them for it.","type":"integer"},"only_these_clips":{"description":"Default false. true = the cut may use ONLY the clips in asset_ids: no other clips of the brand are shown to the editor or searchable (its images and graphics and the built-in library still are). Pass it only when the user said so ('use only these clips', 'no other footage'). Needs asset_ids.","type":"boolean"},"post_plan":{"description":"What happens to each cut the moment it FINISHES rendering. mode: 'auto' (default - the brand's connected accounts that have auto-post ON, scheduled out by their delay so a bad cut can be pulled back), 'now' (post immediately), 'schedule' (needs scheduled_at), or 'none' (only notify; the user reviews and posts by hand). scheduled_at is ISO 8601: either with an offset/'Z', or a plain wall-clock time ('2026-11-06T09:00') together with timezone (IANA name, e.g. 'America/New_York' - the house default for posting; use it whenever the user says a clock time without naming a zone). destination_ids narrows 'now'/'schedule' to specific posting destinations (post.destinations lists them). Pass it only when the user said what should happen after the cut.","properties":{"destination_ids":{"items":{"type":"integer"},"type":"array"},"mode":{"enum":["auto","now","schedule","none"],"type":"string"},"scheduled_at":{"type":"string"},"timezone":{"type":"string"}},"type":"object"},"product_id":{"description":"Optional (no-script mode): the product the video is about; default = the clips' tag or the brand itself (__brand__).","type":"string"},"review_policy":{"description":"Per-cut override of the brand's review policy - what a human approves before these cuts post. 'auto': post per the post plan the moment the cut finishes; 'cut': hold the finished cut until the user approves it (review_status 'approved'), then post per the plan; 'script': the script must be Approved before the cut is even made (the cuts wait in status 'held'), then the cut is held for approval too. Leave it out to follow the brand's default (brand.get -> review_policy). Pass it when the user says things like 'let me look at this one before it goes out' (cut) or 'just post it' (auto).","enum":["auto","cut","script"],"type":"string"},"script_id":{"description":"The script to cut (from script.list / script.write). Omit for an ORGANIC cut straight from footage (then asset_ids + brand_id are required).","type":"integer"},"swipe_example_id":{"description":"Optional: override the reference example (default: the script's own followed example).","type":"integer"},"title":{"description":"Optional (no-script mode): a title for the cut(s).","type":"string"},"variants":{"description":"How many edits (versions of this one script) to make (1-10). Each leads with a different hook. OMIT it unless the user named a number: the default is 3 versions for an AD (one per hook, to test) and 1 for an ORGANIC post (to publish).","type":"integer"}},"required":[],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"video.edit","tags":["video"],"x-long-running":true,"x-permission":"video.write"}},"/skills/video.list/invoke":{"post":{"description":"List the video cuts AdBrain has edited (newest first): id, title, status/progress, review status (draft / in_review / changes_requested / approved), script, brand/product, duration, review-link state and whether it has unresolved comments. Filter by script_id, brand_id, status, or review_status. Open one with record.get entity_type='video_edit'.","operationId":"invoke_video_list","requestBody":{"content":{"application/json":{"schema":{"properties":{"brand_id":{"type":"string"},"limit":{"description":"Max rows (default 30).","type":"integer"},"review_status":{"description":"draft | in_review | changes_requested | approved","type":"string"},"script_id":{"type":"integer"},"status":{"description":"queued | planning | rendering | done | failed | cancelled","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"video.list","tags":["video"],"x-long-running":false,"x-permission":"video.read"}},"/skills/video.revise/invoke":{"post":{"description":"Make a REVISED version of a finished video cut from feedback. Pulls the cut's unresolved review comments (timecoded, with the reviewer's drawings on the frames) and any `instructions` you pass, hands them to the editor with the previous timeline, and renders a new cut (the original stays). Use it when the user gives notes on a cut in chat ('tighten the hook', 'the caption at 0:04 is wrong', 'use the shelf shot instead') or asks you to apply the comments left on the review link. Long-running; returns a video_edit card that fills in live. Read the result later with record.get entity_type='video_edit'. FEEDBACK IS INTERPRETED, NOT COPIED: each comment is turned into the principle behind it and the editor applies it across the WHOLE cut (a b-roll mismatch flagged at 0:04 fixes every mismatched b-roll shot), and durable rules/preferences are remembered for this user, brand, product or style. SIBLING VERSIONS: the result's `siblings_suggested` lists the other finished versions from the SAME SET as this cut (the versions made together in one video.edit request, newest revision of each) that the same feedback applies to. An earlier set of cuts of the same script that the user re-cut later is NOT a sibling and is never revised by apply_to_siblings - to revise a cut outside the set, the user has to ask for it and you pass its id (its own edit_id, or sibling_ids). The result's `revised` lists every revision this call started - tell the user that count. Unless the user already said 'all versions' / 'just this one', ASK them in one line whether to apply it to those too, then call video.revise again with apply_to_siblings=true (same edit_id) - or pass apply_to_siblings=true straight away when they already said so. Never make the user repeat feedback per version.","operationId":"invoke_video_revise","requestBody":{"content":{"application/json":{"schema":{"properties":{"allow_generated_footage":{"description":"Override the parent cut's AI-footage permission for this revision. Pass false whenever the feedback says the cut looks like stock footage, shows a fake version of the founder, or asks for 'real footage only' - the redo then cuts from real clips exclusively. Omit to keep the parent's setting.","type":"boolean"},"apply_to_siblings":{"description":"Also revise the other finished versions from this cut's set (the versions made in the same request) with the same feedback - one revision each. Pass true when the user wants the change on all versions.","type":"boolean"},"comment_ids":{"description":"Optional: only these review comments (default: every unresolved comment on the cut).","items":{"type":"integer"},"type":"array"},"edit_id":{"description":"The finished cut to revise (a video_edit id).","type":"integer"},"instructions":{"description":"The user's notes in their own words (optional when there are review comments).","type":"string"},"music_asset_id":{"description":"Swap the music: an audio raw asset id - one the user uploaded, or a track from the built-in AdBrain MUSIC LIBRARY (raw.list file_type='audio' library=true shows them with genre / energy / bpm / mood). The revision then re-times the cut to that track. Pass 0 to remove music.","type":"integer"},"sibling_ids":{"description":"Optional with apply_to_siblings: only these sibling cuts (default: all suggested).","items":{"type":"integer"},"type":"array"}},"required":["edit_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"video.revise","tags":["video"],"x-long-running":true,"x-permission":"video.write"}},"/skills/web.fetch/invoke":{"post":{"description":"Read a PUBLIC web page and return its readable text, title/description, and the images and logos it contains (with URLs). Use it right after web_search to actually read the page you found - a review, a pricing page, a competitor's site, an article, a product page - and to discover the brand's logo or product image URLs (images flagged logo=true, plus the favicon). To bring an image INTO the account use web.grab_asset with the URLs this returns; to capture how a page LOOKS use web.screenshot. Public http(s) only - private/internal hosts are refused. NOT for social posts: for an X/Twitter, Instagram, TikTok, YouTube or Facebook post or profile link use social.look (a social link passed here is handed to social.look automatically).","operationId":"invoke_web_fetch","requestBody":{"content":{"application/json":{"schema":{"properties":{"max_chars":{"description":"How much text to return (default 8000, max 20000).","type":"integer"},"url":{"description":"The page to read.","type":"string"}},"required":["url"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"web.fetch","tags":["web"],"x-long-running":false,"x-permission":"web.read"}},"/skills/web.grab_asset/invoke":{"post":{"description":"Download one or more PUBLIC images, logos (png/svg/webp/jpg) or short mp4s from the web and save them as raw assets of a brand - the brand's own logo from their site, product photos from their store, a partner / press logo for a 'featured in' card, an app icon. Get URLs from web.fetch (images with logo=true, product images), from web_search, or from the user. Each file becomes an indexed raw asset with the role and label you give it, so the editor and static generator can use the REAL thing instead of drawing one. 25 MB per file, images and mp4 only, public hosts only.","operationId":"invoke_web_grab_asset","requestBody":{"content":{"application/json":{"schema":{"properties":{"asset_role":{"description":"logo | product | packaging | person | lifestyle | general","enum":["logo","product","packaging","person","lifestyle","general"],"type":"string"},"brand_id":{"description":"The brand to attach them to (brand.list).","type":"string"},"description":{"description":"What it is / where it came from.","type":"string"},"label":{"description":"Name for the asset(s); numbered when several.","type":"string"},"product_id":{"description":"Optional product for product/packaging images.","type":"string"},"urls":{"description":"Direct asset URLs (max 10).","items":{"type":"string"},"type":"array"}},"required":["urls","brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"web.grab_asset","tags":["web"],"x-long-running":false,"x-permission":"raw.write"}},"/skills/web.screenshot/invoke":{"post":{"description":"Capture a REAL public web page with a headless browser and save the capture as an image raw asset of a brand (it is indexed like any upload, so statics, scripts and the video editor can use it). viewport: 'mobile' (390x844 @3x, iPhone), 'desktop' (1440x900 @2x), 'vertical' (1080x1920), 'landscape' (1920x1080), 'square', or 'WxH'. selector crops to one element (a hero, a pricing table, the nav); full_page captures the whole scroll; steps (max 12: scroll / click / type / hover / wait, each with a CSS selector) walk the page to a feature or dismiss a modal first. Use it whenever an ad needs the brand's actual UI, site, pricing, reviews or a competitor's page on screen - NEVER ask the user for a screenshot you can take, and never let anything draw a fake UI. Public http(s) only.","operationId":"invoke_web_screenshot","requestBody":{"content":{"application/json":{"schema":{"properties":{"asset_role":{"description":"product (a clean view of the software IS the product) | general | logo (default product for the brand's own app/site, general otherwise).","type":"string"},"brand_id":{"description":"The brand the capture belongs to (brand.list).","type":"string"},"color_scheme":{"description":"light | dark","type":"string"},"description":{"description":"What the screen shows and what it's for (helps the editor pick it).","type":"string"},"full_page":{"type":"boolean"},"label":{"description":"Name for the asset, e.g. 'Pricing page - mobile'.","type":"string"},"product_id":{"description":"Optional product the screen is about.","type":"string"},"selector":{"description":"CSS selector to crop to.","type":"string"},"steps":{"description":"[{action:'scroll', px:800} | {action:'click', selector} | {action:'type', selector, text} | {action:'hover', selector} | {action:'wait', ms}]","items":{"type":"object"},"type":"array"},"url":{"type":"string"},"viewport":{"description":"mobile | desktop | vertical | landscape | square | WxH (default mobile)","type":"string"}},"required":["url","brand_id"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"web.screenshot","tags":["web"],"x-long-running":false,"x-permission":"raw.write"}},"/skills/x.mentions/invoke":{"post":{"description":"ADMIN ONLY. Read recent @-mentions of Cortex's X account (who said what, with tweet ids you can hand to x.reply), plus her own recent posts/replies from the receipts log. Read-only - does NOT advance the autopilot's mentions cursor, so checking here never makes the autopilot miss anything.","operationId":"invoke_x_mentions","requestBody":{"content":{"application/json":{"schema":{"properties":{"limit":{"description":"How many recent own-posts to include from the log (default 10).","type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"x.mentions","tags":["x"],"x-long-running":false,"x-permission":"x.mentions"}},"/skills/x.post/invoke":{"post":{"description":"ADMIN ONLY. Publish a post to Cortex's own X (Twitter) account. Two modes: pass `text` to post exactly that (you write it in your X voice - short, native, no hashtags, no links, under 280 chars), or pass `swipe_example_id` WITHOUT text to auto-compose the standard daily-style teardown of that swipe-file example with its creative attached. Passing both posts your text with that example's media attached. This publishes to the real public internet immediately - if the admin dictated the gist, tighten it into X-native voice; if they dictated exact wording ('post exactly this'), post it verbatim.","operationId":"invoke_x_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"swipe_example_id":{"description":"Global swipe-file example to attach (and, if no text given, to write the teardown about).","type":"integer"},"text":{"description":"The tweet text (max 280 chars). Omit to auto-compose from swipe_example_id.","type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"x.post","tags":["x"],"x-long-running":false,"x-permission":"x.post"}},"/skills/x.reply/invoke":{"post":{"description":"ADMIN ONLY. Reply to a specific tweet from Cortex's X account. Pass the `tweet_id` (from x.mentions, or extracted from a pasted x.com/twitter.com status link) and the reply `text` in your X voice - remember that on X, one or two words is a complete reply when that's all a tweet deserves. Publishes immediately.","operationId":"invoke_x_reply","requestBody":{"content":{"application/json":{"schema":{"properties":{"text":{"description":"The reply (max 280 chars).","type":"string"},"tweet_id":{"description":"The tweet to reply to - a numeric id or a pasted x.com status link.","type":"string"}},"required":["tweet_id","text"],"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"x.reply","tags":["x"],"x-long-running":false,"x-permission":"x.reply"}},"/skills/x.timeline/invoke":{"post":{"description":"What Cortex has publicly posted on her own X (Twitter) account @-handle recently - her daily ad teardowns (each tied to a global swipe-file example), replies, and thread engagements. Available to EVERYONE (it's all public posts): use it when a user mentions seeing Cortex on X/Twitter, asks about 'that ad you posted', wants the swipe-file example behind a post, or asks for the free resource from her bio. Each entry includes the swipe_example_id when a post covered one - fetch the full example via record.get entity=swipe_example.","operationId":"invoke_x_timeline","requestBody":{"content":{"application/json":{"schema":{"properties":{"limit":{"description":"How many recent posts (default 15, max 50).","type":"integer"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvokeResponse"}}},"description":"Result (synchronous), or a job handle for long-running skills - poll GET /jobs/{job_id}."},"400":{"description":"Invalid parameters or a skill error (see result.error / result.message)."},"401":{"description":"Missing or invalid API key."},"402":{"description":"Payment required - the account has no credits for this action."},"404":{"description":"Unknown skill."}},"security":[{"bearerAuth":[]}],"summary":"x.timeline","tags":["x"],"x-long-running":false,"x-permission":"x.timeline"}},"/webhooks":{"get":{"operationId":"list_webhooks","responses":{"200":{"description":"Subscriptions + events"}},"security":[{"bearerAuth":[]}],"summary":"List webhook subscriptions and available events","tags":["webhooks"]},"post":{"operationId":"create_webhook","requestBody":{"content":{"application/json":{"schema":{"properties":{"events":{"description":"Omit to receive every event.","items":{"enum":["script.status_changed","video_edit.completed","video_edit.failed","video_edit.cancelled","video_edit.review_status_changed"],"type":"string"},"type":"array"},"url":{"format":"uri","type":"string"}},"required":["url"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Webhook incl. secret (shown once)"}},"security":[{"bearerAuth":[]}],"summary":"Subscribe a URL to events (signing secret returned once)","tags":["webhooks"]}},"/webhooks/{webhook_id}":{"delete":{"operationId":"delete_webhook","parameters":[{"in":"path","name":"webhook_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Removed"}},"security":[{"bearerAuth":[]}],"summary":"Remove a webhook subscription","tags":["webhooks"]}}},"servers":[{"url":"https://adbrainai.com/api/v1"}],"tags":[{"name":"meta"},{"name":"jobs"},{"name":"agent"},{"name":"webhooks"},{"name":"script"},{"name":"brand"},{"name":"product"},{"name":"raw"},{"name":"swipe"},{"name":"inspiration"},{"name":"reaction"},{"name":"persona"},{"name":"creator"},{"name":"static"},{"name":"video"},{"name":"image"},{"name":"artifact"},{"name":"capabilities"},{"name":"collection"},{"name":"memory"},{"name":"idea"},{"name":"orchestrate"},{"name":"goal"},{"name":"upload"},{"name":"user"},{"name":"trash"},{"name":"feedback"},{"name":"performance"},{"name":"organic"},{"name":"record"},{"name":"folder"},{"name":"web"},{"name":"social"},{"name":"x"},{"name":"post"}]}
