MCP
Toolcredits is read-only. Same numbers as GET /api/v1/credits/balance.
On too-low balance, tools/call returns isError: true and a 402 message. No checkout URL. Buy over REST, then retry.
Free on MCP: credits, get_job, Instant Post poll / zip / list.
Humans should pay in studio (Account → Buy credits, shipping). Agents must not Stripe from MCP. On 402, send the user to studio or this REST checkout, then retry.
Buy a pack (REST)
One-time Stripe Checkout (mode=payment). Credits land after checkout.session.completed.
1
List packs
GET /api/v1/billing/packs with X-API-Key.2
Start checkout
POST /api/v1/credits/purchaseemail. Prefer this path over POST /api/v1/billing/purchase (logged-in alias) or POST /api/v1/billing/device/checkout (anon device).3
Pay
Open
checkout_url in a browser. Stripe Checkout, one-time payment.4
Confirm and retry
Webhook credits the account.
GET /api/v1/credits/balance or MCP credits, then retry the tool.top_up_url: "/api/v1/billing/purchase". That is the legacy alias. Unified purchase still works.
Packs
No plan/tier required.
POST /api/v1/billing/subscribe is a different flow. Do not send MCP users there to run Instant Post.
Auth
Samesc_live_* keys as MCP. Also sc_session / sc_anon on REST. MCP itself rejects anon.