The same engine you drive through the web UI, exposed as JSON over HTTPS. Build CI gates. Ship agents. Stop checking screenshots.
$ curl https://api.prior.run/api/v1/ads/compare -H "Authorization: Bearer $PR_KEY" -d '{"image_a": "…", "image_b": "…", …}' // analysis phase ·············· 75s // synthesis phase ············· 15s ← { "memo_id": "comp_b81b0b93", "status": "complete", "memo": { verdict: { winner: "A" }, confidence_level: "Moderate", verdict_headline: "We prefer Design A" … } }▍
https://api.prior.runhttp://localhost:8000Authorization: Bearer pr_live_••••••••••••Generate at /settings. Plaintext shown once.
Every product memo the web UI produces — verdict, reactions, quotes, audience preference, risk flags — in one JSON response.
/api/v1/design/review↳ single design01/api/v1/design/compare↳ two variants02/api/v1/design/multi↳ three to five variants03/api/v1/design/flow↳ two funnels04Scroll-stop, hook clarity, brand recall. Platform-aware when you pass run_platform=meta | tiktok | google. Inspiration drafts bundle action items into one new image + body copy + headline + CTA — CTA is auto-snapped to the platform's allowed list.
/api/v1/ads/single↳ one creative01/api/v1/ads/compare↳ two head-to-head02/api/v1/ads/multi↳ three to five03/api/v1/ads/inspiration↳ draft from recs · single + compare04/api/v1/ads/inspiration/{id}↳ latest draft05Create returns a memo_id immediately. Poll until status = complete — typically 75–120s for ads, 90–180s for non-ads.
/api/v1/memo/{id}↳ full memo JSON0101curl -X POST https://api.prior.run/api/v1/ads/compare \02 -H "Authorization: Bearer $PRIORRUN_API_KEY" \03 -H "Content-Type: application/json" \04 -d '{05 "image_a": "https://cdn.brand.com/hero-a.png",06 "image_b": "https://cdn.brand.com/hero-b.png",07 "campaign_context": "Gen Z skincare, TikTok awareness.",08 "run_platform": "tiktok"09 }'
01{02 "memo_id": "comp_b81b0b93",03 "status": "pending",04 "url": "https://prior.run/ads/memo/comp_b81b0b93"05}
01curl https://api.prior.run/api/v1/memo/comp_b81b0b93 \02 -H "Authorization: Bearer $PRIORRUN_API_KEY"0304# → { memo_id, status: "complete", memo: { verdict,05# quotes, action_items, lens_highlights, ... } }
Images
Base64, data URL, or https. Max 10 MB.
Dedup
Duplicate or near-duplicate images rejected (400).
Ads context
10–500 chars. Sanitized for injection.
Modes
3–5 images for multi, 2–5 screens per flow.
Auth
Bearer pr_live_… . Keys are user-scoped.
Polling
Create returns memo_id · poll GET /memo/{id} until status=complete.
[ end of specification ]