{"name":"AgentLedger","description":"Per-agent spend management: track spend across x402/MPP/API-key rails, set budget caps, get anomaly alerts, keep an audit trail.","url":"https://aiagentscity.com","api_base":"https://aiagentscity.com/v1","openapi":"https://aiagentscity.com/openapi.json","auth":{"type":"workspace_key","field":"workspace_key","description":"Get a workspace_key with no human at all by paying via POST /v1/billing/x402 (the paying wallet becomes the workspace identity), or by POST /start — no signup, no login, no card (GET /start renders the form only; it does not mint). NOTE: /v1/billing/x402 settles on Base MAINNET (eip155:8453) in real USDC. The paying wallet pays real money; the workspace is live immediately. Claiming a NEW agent_id requires that workspace_key in the first POST /v1/track or /v1/budget body; that call mints an agent_secret in the response — save it, every later write to that agent_id must include it and needs no workspace_key. Reads (report/alerts/tokens) require agent_secret or workspace_key, sent as X-Agent-Secret or X-Workspace-Key. A LOST agent_secret is recoverable — the workspace_key can always mint a new one at POST /v1/agents/{agent_id}/rotate-secret, so losing a credential never bricks an agent_id."},"pricing":{"model":"freemium","amount_usd":19.0,"description":"Free tier is 3 agents per workspace, no expiry. Paid paths: an agent can pay via x402 itself for a time-boxed Pro pass (unlimited agents on the resolved workspace, 24h) — this is the ONLY way an agent can pay without a human. The monthly plans ($19/mo Starter, up to 10 agents; $79/mo Team, up to 50) are human-checkout only: they are sold through a Stripe payment link that a person must open and pay in a browser. POST /start?plan=starter does NOT subscribe anyone — it mints a FREE workspace and shows that link, and it returns 409 to a machine that asks for a paid plan. To start a monthly subscription for an existing workspace, POST /v1/billing/checkout with X-Workspace-Id and X-Workspace-Key; that returns the checkout_url a human then opens. Only the x402 Pro pass is unlimited; the monthly plans are capped per tier, and the x402 pass is the only agent-purchasable path. See capabilities below for the x402 price and pass duration."},"capabilities":[{"id":"mint_workspace_x402","description":"Self-serve workspace + workspace_key for an agent with a wallet — no human, no login. Present an x402 payment in the X-PAYMENT header; the paying wallet becomes the workspace identity. $0.01 via x402 buys a one-time 24h trial (unlimited agents) per wallet on the workspace your wallet resolves to — no card, no human. After the trial, subscribe to a monthly plan (/v1/billing/checkout with X-Workspace-Id and X-Workspace-Key returns a Stripe link a human opens to pay; /start?plan=starter is the human door and does NOT subscribe) Do this first: a workspace_key is required to claim a new agent_id. settles on Base MAINNET (eip155:8453) in real USDC. The paying wallet pays real money; the workspace is live immediately. If you hold no wallet, mint at POST /start instead (no signup, no card, but capped at 3 agents; GET /start only renders the form and does not mint).","endpoint":"/v1/billing/x402","method":"POST","free":false},{"id":"recover_workspace_x402","description":"Recover a LOST workspace_key for a wallet-paid workspace: sign `agent-ledger:recover:{wallet}:{unix_ts}` with the payer wallet (EIP-191 personal_sign, ts within 10 min) and POST {wallet, timestamp, signature} — a fresh key is issued and the old one invalidated.","endpoint":"/v1/billing/x402/recover","method":"POST","free":true},{"id":"track_spend","description":"Record a spend entry for an agent","endpoint":"/v1/track","method":"POST","free":true},{"id":"set_budget","description":"Set monthly/daily budget caps for an agent","endpoint":"/v1/budget","method":"POST","free":true},{"id":"check_spend","description":"Ask before spending: allowed or denied with a reason code, the estimate and the headroom left. Same decision the proxy enforces. Read-only.","endpoint":"/v1/check","method":"POST","free":true},{"id":"get_report","description":"Spend report — totals, by rail, by service, anomalies","endpoint":"/v1/report/{agent_id}","method":"GET","free":true},{"id":"get_alerts","description":"Anomaly alerts for an agent","endpoint":"/v1/alerts/{agent_id}","method":"GET","free":true},{"id":"get_tokens","description":"Token burn report — in/out totals by model","endpoint":"/v1/tokens/{agent_id}","method":"GET","free":true},{"id":"rotate_agent_secret","description":"Recover a LOST agent_secret: mint a new one for an agent_id you own, invalidating the previous credential immediately. Workspace_key only — an agent_secret cannot rotate itself. 404 if the agent_id is not claimed.","endpoint":"/v1/agents/{agent_id}/rotate-secret","method":"POST","free":true},{"id":"route_through_proxy","description":"Point your provider base_url at /proxy/{provider} — openai, anthropic, or any vendor listed in providers.json (deepseek, moonshot ship as examples; adding one is a config edit). Every call is metered and capped BEFORE it reaches the provider: a call that would cross the budget gets 402 to the caller and the provider is never contacted. Pass-through — send your provider credential in Authorization / x-api-key and AgentLedger forwards it without storing it. Traffic that bypasses the proxy is not enforced.","endpoint":"/proxy/{provider}/{path}","method":"POST","free":true},{"id":"register_alert_webhook","description":"Register an http(s) webhook for this workspace's alerts — budget.warning at 80%, budget.exceeded when a write is actually blocked, and anomaly.detected. Delivered on the event with retries; every attempt is recorded, including failures. Cost metadata only, never prompt content.","endpoint":"/v1/webhooks","method":"POST","free":true},{"id":"share_report_link","description":"Mint a read-only, expiring URL for an agent's human-readable report page — a browser cannot send X-Agent-Secret as a header, so this is how a report reaches a person. Scoped to ONE agent_id, read-only, expiring (7 days default, 90 max), revocable in bulk.","endpoint":"/v1/report/{agent_id}/share","method":"POST","free":true},{"id":"revoke_agent_secret","description":"Invalidate an agent's secret while keeping its spend history. The agent_id stays claimed, so no other workspace can take it over.","endpoint":"/v1/agents/{agent_id}/revoke-secret","method":"POST","free":true}],"contact":"entradox@icloud.com","legal":"Parmanand LLC. Beta software, provided as-is. Privacy: /privacy · Terms: /terms. Cost metadata only — prompts and responses are never stored."}