LinkedIn Marketing
API

Two on-ramps. One credit wallet.

Ounie accounts hit the REST endpoints with a bearer token. AI assistants — including the Ounie AI Team — connect over MCP and get a native tool surface. Both run the same generation pipeline and draw your shared Ounie credits (1 credit = 1¢), never overdrawing. Every artifact is grounded in your private Ounie brain and cited, so generation needs a credential ounie.com trusts — your Ounie master key. There is no keyless x402 rail here: the actions read your private knowledge, so an anonymous payer can't run them.

Authentication
Two bearer rails. Both draw the same Ounie wallet; only the master key grounds.
lmk_live_… · per-app key

Mint on Dashboard → API keys (shown once, up to 5 active). Lists your brains-less, reads and lists your library. It has no ounie.com credential, so generation is refused with a clear message to use your master key.

ounie_live_… · Ounie master key

Your ounie.com developer key. Enable fleet access on ounie.com → Settings → Developer, then use it here — it’s forwarded upstream so generation is grounded and cited from your brains. One key works across every Ounie app.

Authorization: Bearer ounie_live_…
# or, if your client can't set headers, ride the URL:
?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 lmk_live_… key or your Ounie master key ounie_live_… (grounding needs the master key).
Endpoint  https://linkedin-marketing.ounie.com/api/mcp
Header    Authorization: Bearer ounie_live_…

# If your MCP client can't set headers, append the key as a query param:
https://linkedin-marketing.ounie.com/api/mcp?api_key=ounie_live_…

Connect the Ounie AI Team (TabTab): add an HTTP MCP server with the URL above carrying ?api_key=ounie_live_…— the Team can’t set request headers, so the key rides the URL. Tools appear automatically.

ToolWhat it doesCost
list_brainsList the Ounie brains you can ground in (master key).free
generateDraft ONE artifact: comment · post · hook · plan · profile.2–5 credits
list_assetsList your generated artifacts (optionally by action).free
get_assetRead one artifact — content, copy text, citations.free
get_credit_balanceSpendable Ounie credits + monthly included.free
get_pricingPer-action pricing + agent access. No auth required.public
whoamiThe authenticated key's owner + whether it can ground.free
// Tool call → generate
{ "action": "comment",
  "brain_ids": ["…"],
  "post_url": "https://www.linkedin.com/posts/…" }
→ { "asset_id": "…", "content": { "comment": "…", … },
    "copy_text": "…", "grounded": true, "credits_spent": 3 }
REST · the same endpoints the dashboard uses
Send Authorization: Bearer ounie_live_… (or ?api_key=) on any of these. Cookie sessions work too — it’s the same route.
GET/api/brainsYour Ounie brains

The brain picker. Grounded rail — needs the master key. Free.

POST/api/assetsGenerate one artifact
{ "action": "post", "brain_ids": ["…"], "topic": "a lesson worth sharing" }
// comment/hook also take "post_url"; profile takes "profile_url"

Bills the action price (comment 3 · profile 5 · plan 5 · hook 2 · post 2). Grounded + cited from your brains. Failed reads / thin brains refund automatically.

GET/api/assetsYour library

Every artifact you've generated. Free.

GET/api/assets/{id}One artifact

Full content + citations. Free.

PATCH/api/assets/{id}Edit an artifact
{ "content": { … }, "title": "…" }

Free — edit the generated text in place.

POST/api/assets/{id}/regenerateRegenerate

Re-runs the same action with the stored input and re-bills the action price.

DELETE/api/assets/{id}Delete an artifact

Free.

x402 · not offered here
Some Ounie apps expose a keyless pay-per-call x402 rail. This one doesn’t: every artifact is grounded in yourprivate Ounie brain, so there’s no anonymous run to sell — agent access is API keys / MCP, drawing your Ounie credits.
Shape of a generated artifact
{
  "asset_id": "…",
  "action": "post",
  "content": { "hook": "…", "body": "…", "hashtags": ["…"] },
  "copy_text": "Ready-to-paste text for LinkedIn.",
  "citations": [                 // brain pages the draft is grounded in
    { "brainId": "…", "slug": "…", "title": "…", "url": "https://ounie.com/…" }
  ],
  "grounded": true,
  "thin": false,
  "credits_spent": 2
}