1. Discover: machine-readable pricing
slug and publicCatalogEnabled. An unknown
slug and a disabled catalog return the same 404.
2. Sign up: one call, no CAPTCHA
agent_… reference ID), a subscription to your
designated free default plan, and a customer-scoped API key — once.
Enable with agentSignupEnabled + agentSignupDefaultPlanId (validated
free and ACTIVE at save). An hourly per-account cap returns 429 with
Retry-After.
3. Scoped keys
Customer-scoped keys (ck_live_…/ck_test_…) are pinned to one customer
and carry scopes: read (balances, entitlements, usage) and purchase
(actions that spend money). Endpoints not deliberately opened to customer
keys deny them — a leaked agent key cannot see other customers or touch
tenant configuration.
Tenants manage keys with their own sk_ key:
4. Pay: off-session with a saved card, 402 fallback without
Pre-authorize once (SetupIntent — card data never touches Tanso):POST /api/v1/client/subscriptions) with a saved or supplied
paymentMethodId charges off-session and returns the created subscription
synchronously. Without one, customer-key callers get HTTP 402
(payment_required) carrying a hosted checkoutUrl for the principal plus
a checkoutSessionId to poll:
PURCHASED credit grant stamped at book price, idempotent
by payment intent. The same 402 + polling fallback applies. Every
agent-initiated charge is checked against the account’s spend cap
(agentMaxTopupAmount) before money moves.
5. Use: pre-flight quotes and the burndown API
Entitlement checks return acreditQuote with estimated credits and cost —
an agent can ask “what will this run cost me, and can I afford it” before
doing the work. For the standing question — when do I run out —:
Dev readiness
- Every error carries a stable
code(unauthorized,payment_required,insufficient_credits,idempotency_conflict, …) in one envelope shape — branch on codes, not messages. - Mutating client-API requests accept an
Idempotency-Keyheader: identical retries within 24h replay the stored response; a reused key with a different body returns409 idempotency_conflict. - OpenAPI at
/v3/api-docs, Swagger UI at/swagger-ui.html.
MCP for customer agents
The MCP server includes a curated customer-facing tool set that works withck_ keys: listPlans, getCreditPrices, checkEntitlement,
getUsageForecast, subscribePlan, purchaseCredits. Spend tools require
confirmAction: true. Tenant-configuration tools (Admin*, Stripe setup)
are gated behind app.mcp.admin-tools.enabled (default false) so an agent
key can never reconfigure your pricing.
Deliberately not yet
Rate-limit headers, outbound webhooks (usage thresholds, spend alerts), per-key budgets, Web Bot Auth, and A2A agent cards are roadmap. Thegovernance block in pricing.json reports only what is true.