VSComparison Pages
API

Two on-ramps. One credit wallet.

Drive Comparison Pages from code or from an AI assistant — including the Ounie AI Team — over REST or MCP. Both run the same pipeline the dashboard uses and draw your shared Ounie credits (1 credit = 1¢), never overdrawing. Because a comparison is grounded in your private brain, there is no anonymous keyless rail: agent access is an Ounie API key or MCP.

Authentication · two rails
Bearer token on every call. Reads and edits of your own pages work with either rail; generating or refreshing a page is grounded in your brains, so it needs the master key.
cmp_live_…— this app's key

Minted at Dashboard → API keys. Lists, reads, edits, and deletes your comparison pages. It has no ounie.com credential, so it cannot reach your brains — brain-grounded generation returns a clear 403 master_key_required.

ounie_live_… — the Ounie master key

Your ounie.com developer key. Enable fleet access on ounie.com, then use it here. It's forwarded upstream to ounie.com so generation grounds in your private brains and cites them. Draws the same wallet.

Authorization: Bearer cmp_live_…        # read / manage pages
Authorization: Bearer ounie_live_…      # + generate / refresh (grounded)

# If your client can't set headers, append the key as a query param:
?api_key=cmp_live_…   (or ?api_key=ounie_live_…)
MCP · for AI assistants and the Ounie AI Team
Streamable HTTP at /api/mcp (legacy SSE at /api/sse). Auth with a cmp_live_… key or the Ounie master key ounie_live_….
Endpoint  https://compare.ounie.com/api/mcp
Header    Authorization: Bearer cmp_live_…

# Ounie AI Team (TabTab) can't set headers on an HTTP MCP entry —
# append the key to the URL instead:
https://compare.ounie.com/api/mcp?api_key=cmp_live_…
ToolWhat it doesCost
list_pagesList your comparison pages (competitor, public link, views, credits).free
get_pageRead one page — full content, brain citations, and its public share URL.free
list_brainsList your Ounie brains (master key only) to pick your product brain.free · master key
generate_pageGenerate hosted us-vs-them page(s) grounded + cited from your brain.8 credits/page · master key
refresh_pageRe-crawl the competitor and regenerate a page in place (same link).8 credits · master key
edit_ctaSet the owner-managed call-to-action (label + https URL).free
delete_pageDelete a page — kills its public /c/ link immediately.free
get_credit_balanceSpendable Ounie credits + monthly included.free
get_pricingPer-action pricing + agent-access rails. No auth required.public
whoamiThe authenticated key's owner, key id, and whether grounding is available.free
REST · the same endpoints the dashboard uses
Send Authorization: Bearer cmp_live_… (or ?api_key=) on any of these. Cookie sessions work too — it's the same route.
GET/api/brainsYour Ounie brains

Master key (or cookie) only — a cmp_live_ key gets 403 master_key_required. Free.

POST/api/pagesGenerate comparison page(s)
{ "brain_ids": ["…"], "our_name": "Acme", "competitor_urls": ["https://competitor.com"] }

Bills 8 credits per competitor produced (unreadable sites skipped + refunded). Grounded — needs a cookie session OR the Ounie master key; a cmp_live_ key gets 403.

GET/api/pagesList your pages

Free. Returns { pages }.

GET/api/pages/{id}Read one page

Full content + brain_citations + token. Free.

POST/api/pages/{id}/refreshRe-crawl + regenerate

Bills 8 credits. Same public link. Master key (or cookie).

PATCH/api/pages/{id}/contentEdit the page copy
{ "verdict": "…", "intro": "…", "features": [], "our_strengths": [], "their_strengths": [], "considerations": [], "faq": [] }

Free — your own words; citation pointers preserved.

PATCH/api/pages/{id}Edit the CTA
{ "cta_label": "Start free", "cta_url": "https://acme.com" }

Free. https only.

DELETE/api/pages/{id}Delete a page

Free. Kills the public /c/ link instantly.

Why there's no keyless x402 here
Some Ounie apps expose a keyless x402 pay-per-call rail in USDC. Comparison Pages does not: every page is grounded in yourown private Ounie brain, so there's no anonymous run to sell. Agent access is an Ounie API key or MCP, billed in your Ounie credits — brain-grounded actions require your Ounie master key.
Shape of a generated page
{
  "id": "…",
  "competitor_name": "Competitor",
  "public_url": "https://compare.ounie.com/c/<token>",
  "content": {
    "verdict": "…",
    "intro": "…",
    "features": [{ "feature": "…", "us": "…", "them": "…", "cite": { "brainId": "…", "slug": "…", "title": "…" } }],
    "our_strengths": [{ "point": "…", "cite": { … } }],
    "their_strengths": [{ "point": "…" }],
    "considerations": [{ "point": "…" }],
    "faq": [{ "q": "…", "a": "…", "cite": { … } }]
  },
  "brain_citations": [{ "brainId": "…", "slug": "…", "title": "…", "url": "https://ounie.com/…" }],
  "credits_spent": 8
}