Developers · REST API
Komendly API
Start Ad Packs from a website and get the finished Meta ads with image links. This is the API our Zapier app uses. All requests and responses are JSON.
Using an AI agent? Connect the Ozzy MCP server instead. For scripts, the npm CLI komendly wraps the same API.
Base URL and authentication
https://www.komendly.com- Sign in and open Dashboard > API (https://www.komendly.com/dashboard/api).
- Create a personal API key. It starts with
kmd_. Keep it secret. - Send it on every request in the Authorization header.
Authorization: Bearer kmd_YOUR_KEYThe key acts as you: same account, plan and credits as the web app. You can revoke it at Dashboard > API at any time.
GET /api/ads/me
Your account: email, plan and credit balance. Use it to check that a key works (Zapier's connection test calls it).
- balance is your credit balance. expiring lists referral credits that will expire ({ credits, expiresAt }).
- trialAvailable is true while the free Ad Pack is still unused. unlimitedUntil is set while an unlimited week pass runs.
Example request
curl https://www.komendly.com/api/ads/me \
-H "Authorization: Bearer kmd_YOUR_KEY"Example response · 200 OK
{
"id": "cmws0sample",
"name": "Jordan's workspace",
"plan": "trial",
"isPaid": false,
"trialAvailable": true,
"balance": 0,
"emailVerified": true,
"email": "jordan@acme-hvac.example",
"trialStatic": 10,
"expiring": [],
"unlimitedUntil": null
}POST /api/ads/runs
Start an Ad Pack: Ozzy reads the website and makes a pack of Meta ads. It takes a few minutes; poll the pack or the ready ads to get them.
| Name | In | Description |
|---|---|---|
| url | body, required | The business website. 3 to 2048 characters. Must be a public site. |
| goal | body | One of auto, leads, sales, traffic, awareness, app_installs. Default auto (Ozzy picks). |
| count | body | Number of static ads, 1 to 50. Default 10. |
| ratios | body | 1 to 3 of "4:5", "1:1", "9:16". Default ["4:5"]. |
| awareness | body | 1 to 5 of unaware, problem_aware, solution_aware, product_aware, most_aware. Default problem_aware and solution_aware. |
| motion | body | true adds one animated ad. |
| seed | body | Optional idea to build the ads around: { angle (required, max 240), hook, headline, style, origin }. Zapier sends the user's offer as angle and hook with origin "hook_library". |
| brandProfileId | body | Optional. Reuse a saved brand instead of reading the site again. |
| reextract | body | Optional. true reads the website again even if the brand is saved. |
- The free pack ignores count, ratios, awareness and motion: it uses the free-pack settings.
- If your free pack is still being made, you get that pack back with resumed: true and status 200 instead of a new one.
Example request
curl -X POST https://www.komendly.com/api/ads/runs \
-H "Authorization: Bearer kmd_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://acme-hvac.example","goal":"leads","motion":true,
"seed":{"angle":"$49 AC tune-up this week","hook":"$49 AC tune-up this week","origin":"hook_library"}}'Example response · 201 Created (200 when resumed)
{
"runId": "cmrun0sample",
"resumed": false
}GET /api/ads/runs
Your 20 newest Ad Packs, newest first. Zapier uses it for the "New Ad Pack" trigger and to find a pack by website.
- status is one of extracting, awaiting_confirm, queued, generating, completed, partial, failed, canceled.
- Weekly Drop packs also have a title, like "Weekly Drop · Nov 17".
Example request
curl https://www.komendly.com/api/ads/runs \
-H "Authorization: Bearer kmd_YOUR_KEY"Example response · 200 OK
{
"runs": [
{
"id": "cmrun0sample",
"url": "https://acme-hvac.example/",
"status": "completed",
"isTrial": false,
"createdAt": "2026-11-21T10:00:00.000Z",
"readyCount": 10,
"totalCount": 11
}
]
}GET /api/zapier/runs/{id}
One Ad Pack with its ads and image links. Zapier uses it for "Find Ad Pack" and after "Generate Ads From a Website".
| Name | In | Description |
|---|---|---|
| id | path, required | The Ad Pack id (runId from POST /api/ads/runs). |
- done is true when the pack is finished and no more ads are coming. Stop polling then.
- locked_count counts ready ads you can't download yet (free pack). Locked ads have no links.
- error is a plain sentence when the pack ran into a problem, else null.
Example request
curl https://www.komendly.com/api/zapier/runs/cmrun0sample \
-H "Authorization: Bearer kmd_YOUR_KEY"Example response · 200 OK
{
"id": "cmrun0sample",
"run_id": "cmrun0sample",
"website": "https://acme-hvac.example/",
"status": "completed",
"done": true,
"is_trial": false,
"created_at": "2026-11-21T10:00:00.000Z",
"completed_at": "2026-11-21T10:05:00.000Z",
"ready_count": 10,
"total_count": 10,
"locked_count": 0,
"error": null,
"download_note": null,
"image_url": "https://komendly-ads.s3.amazonaws.com/ads/cmrun0sample/ad-01-4x5.png?X-Amz-Expires=604800&X-Amz-Signature=...",
"image_urls": ["https://komendly-ads.s3.amazonaws.com/ads/cmrun0sample/ad-01-4x5.png?X-Amz-Expires=604800&X-Amz-Signature=..."],
"ads": [{
"id": "cmad0sample1",
"ad_id": "cmad0sample1",
"run_id": "cmrun0sample",
"website": "https://acme-hvac.example",
"kind": "static",
"status": "ready",
"headline": "AC out? Fixed today.",
"primary_text": "Same-day AC repair. Upfront prices, no overtime fees. Book in 60 seconds.",
"cta": "Book now",
"cta_type": "BOOK_NOW",
"angle": "No cooling on a hot day",
"awareness": "problem_aware",
"landing_url": "https://acme-hvac.example/book",
"image_url": "https://komendly-ads.s3.amazonaws.com/ads/cmrun0sample/ad-01-4x5.png?X-Amz-Expires=604800&X-Amz-Signature=...",
"video_url": null,
"image_urls": ["https://komendly-ads.s3.amazonaws.com/ads/cmrun0sample/ad-01-4x5.png?X-Amz-Expires=604800&X-Amz-Signature=..."],
"assets": [
{ "asset_id": "cmasset0feed", "ratio": "4:5", "mime": "image/png", "width": 1080, "height": 1350,
"url": "https://komendly-ads.s3.amazonaws.com/ads/cmrun0sample/ad-01-4x5.png?X-Amz-Expires=604800&X-Amz-Signature=...", "placements": ["feed"] }
],
"links_expire_at": "2026-11-28T10:05:00.000Z",
"view_url": "https://www.komendly.com/ads/runs/cmrun0sample",
"upgrade_url": "https://www.komendly.com/pricing?utm_source=zapier&utm_medium=integration",
"created_at": "2026-11-21T10:05:00.000Z"
}],
"links_expire_at": "2026-11-28T10:05:00.000Z",
"view_url": "https://www.komendly.com/ads/runs/cmrun0sample",
"upgrade_url": "https://www.komendly.com/pricing?utm_source=zapier&utm_medium=integration"
}GET /api/zapier/ads
Your newest ready ads with image links, newest first. Each ad has a stable id, so you can skip ads you have already seen. Zapier's "Ads Ready" trigger polls it.
| Name | In | Description |
|---|---|---|
| limit | query | 1 to 100. Default 50. |
| run_id | query | Optional. Only ads from this Ad Pack. |
- Only ready ads with at least one downloadable link are listed. created_at is when the ad became ready.
Example request
curl "https://www.komendly.com/api/zapier/ads?limit=50&run_id=cmrun0sample" \
-H "Authorization: Bearer kmd_YOUR_KEY"Example response · 200 OK
{
"ads": [{
"id": "cmad0sample1",
"ad_id": "cmad0sample1",
"run_id": "cmrun0sample",
"website": "https://acme-hvac.example",
"kind": "static",
"status": "ready",
"headline": "AC out? Fixed today.",
"primary_text": "Same-day AC repair. Upfront prices, no overtime fees. Book in 60 seconds.",
"cta": "Book now",
"cta_type": "BOOK_NOW",
"angle": "No cooling on a hot day",
"awareness": "problem_aware",
"landing_url": "https://acme-hvac.example/book",
"image_url": "https://komendly-ads.s3.amazonaws.com/ads/cmrun0sample/ad-01-4x5.png?X-Amz-Expires=604800&X-Amz-Signature=...",
"video_url": null,
"image_urls": ["https://komendly-ads.s3.amazonaws.com/ads/cmrun0sample/ad-01-4x5.png?X-Amz-Expires=604800&X-Amz-Signature=..."],
"assets": [
{ "asset_id": "cmasset0feed", "ratio": "4:5", "mime": "image/png", "width": 1080, "height": 1350,
"url": "https://komendly-ads.s3.amazonaws.com/ads/cmrun0sample/ad-01-4x5.png?X-Amz-Expires=604800&X-Amz-Signature=...", "placements": ["feed"] }
],
"links_expire_at": "2026-11-28T10:05:00.000Z",
"view_url": "https://www.komendly.com/ads/runs/cmrun0sample",
"upgrade_url": "https://www.komendly.com/pricing?utm_source=zapier&utm_medium=integration",
"created_at": "2026-11-21T10:05:00.000Z"
}]
}Errors
Errors come back as JSON with an HTTP status, a plain-language error you can show to people, and a stable code. Some errors add fields, like needed and available credits, or an upgrade_url.
HTTP/1.1 402 Payment Required
{
"error": "This needs 11 credits and you have 4. Top up or upgrade to continue.",
"code": "insufficient_credits",
"needed": 11,
"available": 4
}- 400invalid_input (body is not valid, e.g. no url) or blocked_url (not a public website).
- 401unauthenticated: the key is missing, wrong or revoked. Make a new key at Dashboard > API.
- 402Payment needed. insufficient_credits (with needed and available), trial_used, brand_limit, or a free-pack rule such as domain_used. Upgrade or top up at /pricing.
- 403suspended (account suspended) or api_key_refused (keys can't be used on that route).
- 404not_found: the Ad Pack doesn't exist or isn't in your workspace.
- 409busy: on an unlimited plan, wait for your current pack to finish, then start the next.
- 429rate_limited or job_limited. See the limits below. Wait and try again.
- 500internal: something went wrong on our side. Try again.
Credits and limits
- New accounts get a free Ad Pack: 10 free ads from your website, no card needed (20 if a friend's referral link sent you). The rest of the pack unlocks with any plan or a one-time $9 "Unlock this pack".
- Paid Ad Packs use credits: 1 credit per static ad per ratio, plus 5 credits per animated ad. Credits are held when the pack starts. Unlimited plans don't use credits.
- Each API key can make up to 120 requests per minute and start up to 30 jobs (like new Ad Packs) per hour.
- Each account can start up to 10 Ad Packs per hour.
- Over a limit you get 429. Wait a minute (or an hour for job limits) and try again.
Image links expire
Image and video links are presigned links. They work without a key, so tools like Slack, Google Sheets or Meta can fetch them. Each link is valid for 7 days. links_expire_at tells you when. Call the endpoint again for fresh links, or save the files before they expire.
More ways in
- MCP server for AI agents: add https://www.komendly.com/api/mcp to Claude, ChatGPT or Cursor and sign in. No key needed.
- npm CLI:
npx komendly login, then run commands from your terminal with a key from Dashboard > API. - All integrations.