AD BRAIN

Plug AdBrain into your own tools.

Everything AdBrain does — write scripts, cut and revise video ads, generate statics, organize brands, products and footage, read ad performance — is a skill you can call over REST or MCP, and every meaningful change can call you back over a signed webhook. Built so your AI agent can wire it into Notion, Monday, Slack, Zapier, Cursor or your own stack in one sitting.

Hand this to your AI agent

Paste the text below into Cursor, Claude, ChatGPT or any agent that can read a URL. It contains the base URL, auth, the spec and the events — enough to integrate without a human reading the docs.

Open openapi.json

Base URL

https://adbrainai.com/api/v1

Auth

Authorization: Bearer <key> — keys live in AdBrain under Settings → API keys. One key per integration.

Shape

One endpoint per skill: POST /skills/{name}/invoke with a JSON body. Long jobs return a handle; poll GET /jobs/{id}.

MCP

https://adbrainai.com/mcp — the same skills as tools for Claude, Cursor and other MCP clients.

Quickstart

1. Create an API key in AdBrain (Settings → API keys). 2. List what you can call. 3. Call it.

# what can I call?
curl https://adbrainai.com/api/v1/skills -H "Authorization: Bearer $ADBRAIN_KEY"

# your brands and their ids
curl -X POST https://adbrainai.com/api/v1/skills/brand.list/invoke \
  -H "Authorization: Bearer $ADBRAIN_KEY" -H "Content-Type: application/json" -d '{}'

# kick off a video edit for a script (returns a job handle immediately)
curl -X POST https://adbrainai.com/api/v1/skills/video.edit/invoke \
  -H "Authorization: Bearer $ADBRAIN_KEY" -H "Content-Type: application/json" \
  -d '{"script_id": 2276, "variants": 3, "aspect_ratio": "9:16"}'

# revise a finished cut with notes (targeted revision)
curl -X POST https://adbrainai.com/api/v1/skills/video.revise/invoke \
  -H "Authorization: Bearer $ADBRAIN_KEY" -H "Content-Type: application/json" \
  -d '{"edit_id": 56, "instructions": "swap the hook shot for the close-up, keep everything else"}'

# change a script's workflow status (this emits script.status_changed to your webhooks)
curl -X POST https://adbrainai.com/api/v1/skills/record.update/invoke \
  -H "Authorization: Bearer $ADBRAIN_KEY" -H "Content-Type: application/json" \
  -d '{"entity_type": "script", "id": 2276, "fields": {"status": "Approved"}}'

# approve a finished cut (emits video_edit.review_status_changed)
curl -X POST https://adbrainai.com/api/v1/skills/record.update/invoke \
  -H "Authorization: Bearer $ADBRAIN_KEY" -H "Content-Type: application/json" \
  -d '{"entity_type": "video_edit", "id": 56, "fields": {"review_status": "approved"}}'

# poll a job
curl https://adbrainai.com/api/v1/jobs/<job_id> -H "Authorization: Bearer $ADBRAIN_KEY"

Reading and editing any record works the same way: record.get / record.update take an entity_type (script, brand, raw_asset, video_edit, …) and an id. A result with status: "needs_input" is a question for a human — show it, then call again with the answer. Every call is metered in credits exactly like the app.

Webhooks

Subscribe a URL once; AdBrain POSTs JSON to it as things happen. Each delivery carries X-AdBrain-Event and X-AdBrain-Signature (HMAC-SHA256 hex of the raw body, keyed with the secret you receive when you create the subscription — it is shown once).

script.status_changedvideo_edit.completedvideo_edit.failedvideo_edit.cancelledvideo_edit.review_status_changed
# subscribe
curl -X POST https://adbrainai.com/api/v1/webhooks -H "Authorization: Bearer $ADBRAIN_KEY" -H "Content-Type: application/json" \
  -d '{"url": "https://yourapp.example.com/adbrain", "events": ["script.status_changed", "video_edit.completed", "video_edit.review_status_changed"]}'

# verify (Python)
import hmac, hashlib
expected = hmac.new(SECRET.encode(), raw_body, hashlib.sha256).hexdigest()
ok = hmac.compare_digest(expected, request.headers["X-AdBrain-Signature"])

# payload
{"event": "video_edit.completed", "ts": "2026-10-25T20:14:03Z",
 "data": {"id": 56, "title": "Bleeding Gums Finally Fixed — cut 1 · hook 1", "status": "done",
          "script_id": 2277, "brand_id": "…", "aspect_ratio": "16:9", "duration_seconds": 30.0,
          "video_url": "https://adbrainai.com/api/video-edits/56/video", "review_url": "https://adbrainai.com/review/video/…"}}

MCP

Point any MCP client at https://adbrainai.com/mcp with the same Bearer key. Every skill appears as a tool with its schema; long-running tools return job ids to poll with job_status. This is the fastest path when the integration is itself an AI agent.

API reference

Generated live from the skill registry, so it always matches what the API accepts. Raw spec: /api/v1/openapi.json.