{"openapi":"3.1.0","info":{"title":"Agent Middleware API","description":"## Agent Transaction Integrity\n\n**Make consequential agent actions transactional.**\n\nTransaction-integrity boundary for consequential autonomous actions on the configured upstream-MCP path: one logical action binds scoped authority and configured consumption to at most one gateway dispatch and debit, records delivery_uncertain instead of automatically redispatching, and links gateway evidence for required external reconciliation.\n\nIt is not a full agent middleware platform. This is a durable gateway state machine, not one distributed ACID transaction and not proof of the downstream effect. A remote side effect is exactly once only when the upstream honors the forwarded idempotency key. See `/WEDGE.md` and `/SECURITY_LIMITATIONS.md`.\n\n### Canonical Loop\n\n`logical action -> authorize -> reserve allowance -> debit -> claim dispatch -> confirmed outcome | delivery_uncertain -> receipt/audit -> authoritative external reconciliation required`\n\n### Product Surface\n\n- **Logical action identity** — accepted key bound to one payload\n- **Bounded authority consumption** — scoped permit and configured allowance\n- **One-shot gateway dispatch/debit** — at most once per accepted action\n- **Explicit uncertainty** — `delivery_uncertain` is not auto-redispatched\n- **Linked gateway evidence** — receipt and audit data for reconciliation\n- **Discovery** — `.well-known/agent.json`, `/mcp/tools.json`, `/llms.txt`, `/v1/discover`\n\n### Proof Surfaces\n\nAgentic-web, browser, content, oracle, sandbox, media, IoT, red-team, and telemetry demos are labeled scaffolding. They mount only when `ENABLE_PROOF_SURFACES=true` and do not define the product.\n\n### Authentication\n\nProtected endpoints require an API key via the `X-API-Key` header.\n\n### For Agents\n\nStart at `/.well-known/agent.json`, then `/llms.txt` and `/mcp/tools.json`. Prefer `PUBLIC_URL` over any localhost server entry.","contact":{"name":"Christopher Sellers","url":"https://calendly.com/regengine/30min","email":"1@christophersellers.com"},"license":{"name":"MIT"},"version":"1.3.0"},"servers":[{"url":"https://api.thisisatest.tech","description":"Public API (set PUBLIC_URL)"}],"paths":{"/v1/audit/events":{"get":{"tags":["Control Plane Audit"],"summary":"Get Audit Events","operationId":"get_audit_events_v1_audit_events_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"event","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event"}},{"name":"wallet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Id"}},{"name":"key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Id"}},{"name":"tool","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"}},{"name":"endpoint","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"}},{"name":"policy_decision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Decision Id"}},{"name":"request_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"}},{"name":"ok","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ok"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"summary","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Summary"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEventListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/summary":{"get":{"tags":["Control Plane Audit"],"summary":"Get Audit Summary","operationId":"get_audit_summary_v1_audit_summary_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/audit/verify-chain":{"post":{"tags":["Control Plane Audit"],"summary":"Verify Chain","operationId":"verify_chain_v1_audit_verify_chain_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditChainVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditChainVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/policies":{"post":{"tags":["Policy Bundles"],"summary":"Create Policy","operationId":"create_policy_v1_policies_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyBundleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyBundleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Policy Bundles"],"summary":"List Policies","operationId":"list_policies_v1_policies_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wallet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyBundleListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/policies/{policy_id}":{"get":{"tags":["Policy Bundles"],"summary":"Get Policy","operationId":"get_policy_v1_policies__policy_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyBundleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Policy Bundles"],"summary":"Patch Policy","operationId":"patch_policy_v1_policies__policy_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"policy_id","in":"path","required":true,"schema":{"type":"string","title":"Policy Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyBundlePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyBundleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/wallets/sponsor":{"post":{"tags":["Agent Financial Gateways"],"summary":"Create a sponsor wallet (liability sink)","description":"Bootstrap operator provisioning only. Create a human-owned root account that acts as the 'liability sink' for agent spending. Sponsors ingest fiat currency via payment rails and convert it to ecosystem credits. Agent wallets are provisioned from sponsor balances.","operationId":"create_sponsor_wallet_v1_billing_wallets_sponsor_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSponsorWalletRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"401":{"description":"Missing API key"},"402":{"description":"Insufficient funds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientFundsResponse"}}}},"403":{"description":"Bootstrap administrator access required"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/wallets/agent":{"post":{"tags":["Agent Financial Gateways"],"summary":"Provision an agent wallet","description":"Create a pre-paid wallet for an autonomous agent, funded from a sponsor's balance. The agent can then transact autonomously up to its budget without human intervention. Supports daily spend limits and automatic refills.","operationId":"create_agent_wallet_v1_billing_wallets_agent_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAgentWalletRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"401":{"description":"Missing API key"},"402":{"description":"Insufficient funds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientFundsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/wallets/{wallet_id}":{"get":{"tags":["Agent Financial Gateways"],"summary":"Get wallet details","operationId":"get_wallet_v1_billing_wallets__wallet_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"type":"string","title":"Wallet Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"401":{"description":"Missing API key"},"402":{"description":"Insufficient funds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientFundsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/wallets":{"get":{"tags":["Agent Financial Gateways"],"summary":"List wallets","operationId":"list_wallets_v1_billing_wallets_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wallet_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by wallet type","title":"Wallet Type"},"description":"Filter by wallet type"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletListResponse"}}}},"401":{"description":"Missing API key"},"402":{"description":"Insufficient funds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientFundsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/ledger/{wallet_id}":{"get":{"tags":["Agent Financial Gateways"],"summary":"Get wallet ledger","operationId":"get_ledger_v1_billing_ledger__wallet_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"type":"string","title":"Wallet Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerResponse"}}}},"401":{"description":"Missing API key"},"402":{"description":"Insufficient funds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientFundsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/charge":{"post":{"tags":["Agent Financial Gateways"],"summary":"Charge a wallet for API usage","operationId":"charge_wallet_v1_billing_charge_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wallet_id","in":"query","required":true,"schema":{"type":"string","title":"Wallet Id"}},{"name":"service_category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ServiceCategory"},{"type":"null"}],"title":"Service Category"}},{"name":"service","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ServiceCategory"},{"type":"null"}],"description":"Service category (alias for service_category)","title":"Service"},"description":"Service category (alias for service_category)"},{"name":"units","in":"query","required":false,"schema":{"type":"number","exclusiveMinimum":0,"description":"Number of units consumed","default":1.0,"title":"Units"},"description":"Number of units consumed"},{"name":"request_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Path"}},{"name":"description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing API key"},"402":{"description":"Insufficient funds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientFundsResponse"}}}},"403":{"description":"Wallet expired, frozen, or denied by policy"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/pricing":{"get":{"tags":["Agent Financial Gateways"],"summary":"Get pricing table","operationId":"get_pricing_v1_billing_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingTableResponse"}}}},"401":{"description":"Missing API key"},"402":{"description":"Insufficient funds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientFundsResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/v1/permits":{"get":{"tags":["Trust Permits"],"summary":"List Permits","operationId":"list_permits_v1_permits_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wallet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"subject_key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Key Id"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"expires_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires After"}},{"name":"expires_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Trust Permits"],"summary":"Create Permit","operationId":"create_permit_v1_permits_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/permits/{permit_id}":{"get":{"tags":["Trust Permits"],"summary":"Get Permit","operationId":"get_permit_v1_permits__permit_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"permit_id","in":"path","required":true,"schema":{"type":"string","title":"Permit Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/permits/{permit_id}/receipts":{"get":{"tags":["Trust Permits"],"summary":"List Permit Receipts","operationId":"list_permit_receipts_v1_permits__permit_id__receipts_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"permit_id","in":"path","required":true,"schema":{"type":"string","title":"Permit Id"}},{"name":"tool","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/permits/{permit_id}/revoke":{"post":{"tags":["Trust Permits"],"summary":"Revoke Permit","operationId":"revoke_permit_v1_permits__permit_id__revoke_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"permit_id","in":"path","required":true,"schema":{"type":"string","title":"Permit Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/permits/verify":{"post":{"tags":["Trust Permits"],"summary":"Verify Permit","operationId":"verify_permit_v1_permits_verify_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/permit-requests":{"post":{"tags":["Trust Permits"],"summary":"Create Permit Request","description":"Ask a human for a permit this agent cannot mint itself.\n\nThe caller must hold the subject wallet — it is asking for authority over\nits own spend. The issuer must be that wallet or one above it in the\nsponsor -> agent -> child hierarchy, mirroring ``POST /v1/permits``: an\nagent may ask its funder for authority, never an unrelated wallet.","operationId":"create_permit_request_v1_permit_requests_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitRequestCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/permit-requests/{request_id}":{"get":{"tags":["Trust Permits"],"summary":"Get Permit Request","description":"Poll a request; returns the minted permit once a human has approved.","operationId":"get_permit_request_v1_permit_requests__request_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/permit-requests/{request_id}/card":{"get":{"tags":["Trust Permits"],"summary":"Get Permit Request Card","description":"The approver's card for this request, as a hosted page.\n\nSame rendering as the notification email, so the two surfaces cannot show\ndifferent terms for one decision. Read-only: the approve/reject action\nlives in Sentinel.","operationId":"get_permit_request_card_v1_permit_requests__request_id__card_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/quotes":{"post":{"tags":["Trust Permits"],"summary":"Create Quote","description":"Quote one call of a tool for a wallet the caller owns.\n\nThe price is read from the tool's live registration and frozen into a\nsigned statement. No idempotency key: quoting is free, has no side effect\non the wallet, and a duplicate quote is simply a second unspent\ncommitment that expires on its own.","operationId":"create_quote_v1_quotes_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/quotes/{quote_id}":{"get":{"tags":["Trust Permits"],"summary":"Get Quote","operationId":"get_quote_v1_quotes__quote_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"quote_id","in":"path","required":true,"schema":{"type":"string","title":"Quote Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/receipts":{"get":{"tags":["Trust Receipts"],"summary":"List Receipts","operationId":"list_receipts_v1_receipts_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"permit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permit Id"}},{"name":"wallet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Id"}},{"name":"tool","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/receipts/permit/{permit_id}":{"get":{"tags":["Trust Receipts"],"summary":"List Receipts For Permit","operationId":"list_receipts_for_permit_v1_receipts_permit__permit_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"permit_id","in":"path","required":true,"schema":{"type":"string","title":"Permit Id"}},{"name":"wallet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Id"}},{"name":"tool","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/receipts/reconciliation/refunds":{"get":{"tags":["Trust Receipts"],"summary":"List Refund Reconciliations","operationId":"list_refund_reconciliations_v1_receipts_reconciliation_refunds_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["pending","resolved"],"type":"string"},{"type":"null"}],"default":"pending","title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundReconciliationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/receipts/reconciliation/refunds/{receipt_id}/retry":{"post":{"tags":["Trust Receipts"],"summary":"Retry Refund Reconciliation","operationId":"retry_refund_reconciliation_v1_receipts_reconciliation_refunds__receipt_id__retry_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","title":"Receipt Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundReconciliationRetryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/receipts/{receipt_id}":{"get":{"tags":["Trust Receipts"],"summary":"Get Receipt","operationId":"get_receipt_v1_receipts__receipt_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","title":"Receipt Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/receipts/{receipt_id}/evidence":{"get":{"tags":["Trust Receipts"],"summary":"Get Receipt Evidence","operationId":"get_receipt_evidence_v1_receipts__receipt_id__evidence_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","title":"Receipt Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptEvidenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/receipts/{receipt_id}/portable":{"get":{"tags":["Trust Receipts"],"summary":"Get Portable Receipt","description":"Export a receipt as evidence that survives leaving this plane.\n\nReading a receipt is authorized like any other tenant data. What the\ncaller gets back is not: the bundle can be handed to a downstream agent,\nan auditor, or an operator who holds no credential here, and they can\nstill check the signature against the published keys.","operationId":"get_portable_receipt_v1_receipts__receipt_id__portable_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","title":"Receipt Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortableReceiptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/receipts/verify":{"post":{"tags":["Trust Receipts"],"summary":"Verify Receipt","operationId":"verify_receipt_v1_receipts_verify_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/evidence/{receipt_id}":{"get":{"tags":["Trust / Evidence"],"summary":"Buyer-facing trust evidence bundle","description":"Returns the single, verifiable artifact for a receipt: the signed receipt, its permit, the linked ledger entry and audit event, and a `verification` map (receipt signature, permit signature, audit chain, request hash). This is the artifact a buyer can hand to an auditor.","operationId":"get_evidence_bundle_v1_evidence__receipt_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"receipt_id","in":"path","required":true,"schema":{"type":"string","title":"Receipt Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvidenceBundleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/launch/preflight":{"post":{"tags":["Preflight"],"summary":"Pre-flight Readiness Check","description":"Runs a comprehensive validation sweep before production launch:\n\n1. **KEYS** — Reject test-key/placeholder API keys, validate Stripe tokens\n2. **DOMAIN** — Verify BASE_URL is a real domain, manifests will resolve\n3. **ORACLE** — Validate agent directory registration URLs\n4. **ASSETS** — Check content source URLs and crawl targets\n\nReturns a GO/NO-GO verdict with per-check details.","operationId":"run_preflight_v1_launch_preflight_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightRequest","default":{"base_url":"","stripe_secret_key":"","campaign_source_url":""}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflightResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/mcp/tools.json":{"get":{"tags":["MCP"],"summary":"Mcp Tools Manifest","description":"Return the MCP tools.json manifest.\n\nThis is an unauthenticated HTTP mirror of tool metadata exposed by this\nproject's governed JSON-RPC subset. Clients can obtain the same list by\nsending ``tools/list`` to ``/mcp/messages``; that endpoint does not\nimplement the complete MCP initialization lifecycle.\n\nQuery Parameters:\n    category: Optional service category filter\n\nReturns:\n    MCP tools.json manifest with tool definitions","operationId":"MCP_Tools_Manifest_mcp_tools_json_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ServiceCategory"},{"type":"null"}],"title":"Category"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/messages":{"post":{"tags":["MCP"],"summary":"Mcp Json-Rpc Messages","description":"Legacy project JSON-RPC endpoint, kept for existing clients and the local proof scripts. It does not implement the standard MCP initialization lifecycle. Check `/.well-known/agent.json` before assuming the standard MCP Streamable HTTP endpoint at POST /mcp is available; both transports run the same governed permit→meter→receipt path when enabled.","operationId":"MCP_JSON_RPC_Messages_mcp_messages_post","deprecated":true,"security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/tools/{service_id}/invoke":{"post":{"tags":["MCP"],"summary":"Invoke a registered MCP tool","description":"Legacy REST-shaped invoke, kept for existing clients. New integrations should call tools through the standard MCP Streamable HTTP endpoint at POST /mcp (or the legacy JSON-RPC POST /mcp/messages); every entry point runs the same governed permit→meter→receipt path.","operationId":"Invoke_MCP_Tool_mcp_tools__service_id__invoke_post","deprecated":true,"security":[{"APIKeyHeader":[]}],"parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","title":"Service Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/tools":{"get":{"tags":["MCP"],"summary":"List all available MCP tools (paginated)","description":"List all available MCP-enabled services with pagination.\n\nQuery Parameters:\n    category: Optional service category filter\n    limit: Maximum number of tools to return (default 100, max 500)\n    offset: Number of tools to skip for pagination\n\nReturns:\n    Paginated list of tool definitions with schemas","operationId":"List_MCP_Tools_mcp_tools_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ServiceCategory"},{"type":"null"}],"title":"Category"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Max tools to return","default":100,"title":"Limit"},"description":"Max tools to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of tools to skip","default":0,"title":"Offset"},"description":"Number of tools to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Mcp Tools Mcp Tools Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/tools/{service_id}":{"get":{"tags":["MCP"],"summary":"Get a specific MCP tool definition","description":"Get the MCP tool definition for a specific service.\n\nReturns the full tool schema including:\n- inputSchema\n- output schema availability metadata\n- pricing and category annotations","operationId":"Get_MCP_Tool_mcp_tools__service_id__get","parameters":[{"name":"service_id","in":"path","required":true,"schema":{"type":"string","title":"Service Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Mcp Tool Mcp Tools  Service Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/mcp/public":{"post":{"tags":["MCP Public Endpoint"],"summary":"Public read-only MCP endpoint (official MCP SDK, stateless Streamable HTTP, JSON responses, no authentication)","description":"Hand one public MCP message to the official SDK's transport.\n\nDeliberately no auth dependency: every tool behind this surface is a\nread of public material. Origin validation still applies — the absence\nof credentials is not an invitation to be a cross-site oracle.","operationId":"Public_MCP_Streamable_HTTP_Endpoint_mcp_public_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/api-keys":{"post":{"tags":["API Key Management"],"summary":"Create a new API key","description":"Create a new API key for a wallet. The key is only shown once - store it securely.","operationId":"create_api_key_v1_api_keys_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyWithSecret"}}}},"401":{"description":"Missing API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{wallet_id}":{"get":{"tags":["API Key Management"],"summary":"List API keys for a wallet","description":"Get all API keys for a wallet. Keys are masked for security.","operationId":"list_api_keys_v1_api_keys__wallet_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"type":"string","title":"Wallet Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyListResponse"}}}},"401":{"description":"Missing API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/rotate":{"post":{"tags":["API Key Management"],"summary":"Rotate an API key","description":"Rotate an API key by creating a new one and optionally revoking the old one. Returns the new key which is only shown once.","operationId":"rotate_api_key_v1_api_keys_rotate_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateAPIKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotationResponse"}}}},"401":{"description":"Missing API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{wallet_id}/{key_id}":{"delete":{"tags":["API Key Management"],"summary":"Revoke an API key","description":"Immediately revoke an API key. This action cannot be undone.","operationId":"revoke_api_key_v1_api_keys__wallet_id___key_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"type":"string","title":"Wallet Id"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"reason","in":"query","required":false,"schema":{"type":"string","default":"user_request","title":"Reason"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/emergency-revoke":{"post":{"tags":["API Key Management"],"summary":"Emergency key revocation","description":"Immediately revoke ALL API keys for a wallet. Use for security incidents.","operationId":"emergency_revoke_v1_api_keys_emergency_revoke_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmergencyKeyRevocationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/api-keys/{wallet_id}/logs":{"get":{"tags":["API Key Management"],"summary":"Get rotation audit logs","description":"Get audit logs for API key rotations on a wallet.","operationId":"get_rotation_logs_v1_api_keys__wallet_id__logs_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"type":"string","title":"Wallet Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/KeyRotationLogEntry"},"title":"Response Get Rotation Logs V1 Api Keys  Wallet Id  Logs Get"}}}},"401":{"description":"Missing API key"},"403":{"description":"Insufficient permissions"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signing-keys/active":{"get":{"tags":["Trust Signing Keys"],"summary":"Get Active Signing Key","description":"Return public metadata for the active transaction-evidence signing key.","operationId":"get_active_signing_key_v1_signing_keys_active_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigningKeyMetadataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signing-keys/{key_id}":{"get":{"tags":["Trust Signing Keys"],"summary":"Get Signing Key","description":"Return public metadata for an active or retired signing key.","operationId":"get_signing_key_v1_signing_keys__key_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigningKeyMetadataResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/alerts":{"get":{"tags":["Agent Self Inspection"],"summary":"List My Alerts","operationId":"list_my_alerts_v1_me_alerts_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/authority":{"get":{"tags":["Agent Self Inspection"],"summary":"Get My Authority","description":"What authority does this key currently hold?\n\nOne read answering the questions a planning agent asks before acting:\nwhat may I do (policies, active permits), what will pause for a human\n(human_approval_required), what have I already asked for (pending permit\nrequests), and what can I spend (balance, daily spend). Read-only and\nscoped to the caller's own wallet; listing never advances a decision or\npages a human.","operationId":"get_my_authority_v1_me_authority_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthoritySummaryResponse"}}}},"401":{"description":"Missing or invalid API key"},"403":{"description":"Key is not wallet-scoped (wallet_key_required)"},"404":{"description":"Key's wallet no longer exists (wallet_not_found)"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/permits":{"get":{"tags":["Agent Self Inspection"],"summary":"List My Permits","operationId":"list_my_permits_v1_me_permits_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"expires_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires After"}},{"name":"expires_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/permit-requests":{"get":{"tags":["Agent Self Inspection"],"summary":"List My Permit Requests","description":"Authority this wallet has asked a human for.\n\nRead-only: unlike polling one request by id, listing never advances a\ndecision, so an agent can survey what is outstanding without paging anyone\nor minting anything.","operationId":"list_my_permit_requests_v1_me_permit_requests_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitRequestListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/quotes":{"get":{"tags":["Agent Self Inspection"],"summary":"List My Quotes","description":"Price commitments this wallet holds — filter `status=active` for spendable.","operationId":"list_my_quotes_v1_me_quotes_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"tool","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/receipts":{"get":{"tags":["Agent Self Inspection"],"summary":"List My Receipts","operationId":"list_my_receipts_v1_me_receipts_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"permit_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permit Id"}},{"name":"tool","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"}},{"name":"outcome","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceiptListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/me/audit/events":{"get":{"tags":["Agent Self Inspection"],"summary":"List My Audit Events","operationId":"list_my_audit_events_v1_me_audit_events_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"event","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event"}},{"name":"tool","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"}},{"name":"endpoint","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"}},{"name":"policy_decision_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Decision Id"}},{"name":"request_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"}},{"name":"ok","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Ok"}},{"name":"created_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"}},{"name":"created_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEventListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/discover":{"get":{"tags":["Agent Discovery"],"summary":"Agent Discovery Manifest","description":"Aggregated capability index: services, MCP tools, and pricing. Bootstrap order is defined in `/.well-known/agent.json` under `agent_first.bootstrap_sequence` (this endpoint is optional after those hints).","operationId":"get_discovery_manifest_v1_discover_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoreDiscoveryManifest"}}}}}}},"/v1/discover/tools":{"get":{"tags":["Agent Discovery"],"summary":"List Available MCP Tools","description":"Returns all available MCP tools with their schemas and pricing.","operationId":"list_mcp_tools_v1_discover_tools_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/.well-known/agent.json":{"get":{"tags":["Agent Discovery"],"summary":"Agent Discovery Manifest","description":"Returns this project's agent bootstrap manifest for discovery clients. It is not an A2A Agent Card. Canonical category and claim boundaries live under agent_first.positioning; proof_surfaces are labeled demo/workload scaffolding.","operationId":"get_agent_json__well_known_agent_json_get","responses":{"200":{"description":"Project agent bootstrap manifest","content":{"application/json":{"schema":{}}}}}}},"/.well-known/trust-keys.json":{"get":{"tags":["Agent Discovery"],"summary":"Transaction-Evidence Public Signing Keys","description":"Unauthenticated publication of the Ed25519 public keys this gateway signs receipts, permits, and audit events with. Deliberately open: a receipt is only portable evidence if someone who holds no credential here can still check its signature. Retired keys stay listed so historical receipts remain verifiable; disabled keys are withheld because the gateway itself refuses to verify against them.","operationId":"get_trust_keys_json__well_known_trust_keys_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/jwks.json":{"get":{"tags":["Agent Discovery"],"summary":"Transaction-Evidence JWKS (JSON Web Key Set)","description":"Standard JWK Set (RFC 7517) view of the same Ed25519 public keys published at /.well-known/trust-keys.json, for verifiers that auto-discover keys in JWKS form. Unauthenticated by design: a receipt is only portable evidence if a party holding no credential here can still check its signature. Each key is OKP/Ed25519 (`alg: EdDSA`); match a receipt's `kid` to the JWK `kid`. trust-keys.json carries the same keys with issuance/retirement metadata a bare JWK Set omits.","operationId":"get_jwks_json__well_known_jwks_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/mcp/tools.json":{"get":{"tags":["Agent Discovery"],"summary":"MCP Tools Manifest","description":"Compatibility mirror of the project's public MCP-shaped tool list.","operationId":"get_mcp_tools_json__well_known_mcp_tools_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llm.txt":{"get":{"tags":["Static"],"summary":"Legacy LLM-Readable Instructions Alias","description":"Backward-compatible singular alias for /llms.txt; both routes serve identical plain-text instructions.","operationId":"get_llm_txt_llm_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/llms.txt":{"get":{"tags":["Static"],"summary":"LLM-Readable Instructions","description":"Plain-text instructions at the plural llms.txt proposal path. The legacy /llm.txt route serves identical content.","operationId":"get_llm_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/WEDGE.md":{"get":{"tags":["Static"],"summary":"Transaction-integrity boundary","description":"Compatibility path to the transaction-integrity boundary definition.","operationId":"get_wedge_md_WEDGE_md_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/SECURITY_LIMITATIONS.md":{"get":{"tags":["Static"],"summary":"Security limitations","description":"Honest non-claims and production posture requirements.","operationId":"get_security_limitations_md_SECURITY_LIMITATIONS_md_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/DESIGN_PARTNER_GUIDE.md":{"get":{"tags":["Static"],"summary":"Design partner guide","description":"Transaction-integrity demo and dogfood path for design partners.","operationId":"get_design_partner_guide_md_DESIGN_PARTNER_GUIDE_md_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/docs/partner-api-key-bootstrap.md":{"get":{"tags":["Static"],"summary":"Partner API key bootstrap","description":"Gated operator flow to provision wallet-scoped agent API keys.","operationId":"get_partner_api_key_bootstrap_md_docs_partner_api_key_bootstrap_md_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/docs/agent-accountability.md":{"get":{"tags":["Static"],"summary":"Agent accountability","description":"Why an autonomous agent runs inside the permit/receipt loop, how to verify a receipt offline, and what receipts do not prove.","operationId":"get_agent_accountability_md_docs_agent_accountability_md_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/dashboard":{"get":{"tags":["Static"],"summary":"Public operator evidence index","description":"Truthful public status and evidence links. It contains no fabricated telemetry, authenticated tenant data, or browser credential handling.","operationId":"get_human_dashboard_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"404":{"description":"Dashboard not found"}}}},"/docs/index":{"get":{"tags":["Documentation & Discovery"],"summary":"Structured documentation index","description":"Returns a JSON index for the consequential-action transaction-integrity boundary. Proof-surface service entries appear only when mounted.","operationId":"get_doc_index_docs_index_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"tags":["Discovery"],"summary":"API root — service index and operator evidence negotiation","description":"Returns the API service index for JSON callers or the truthful public operator evidence index for browsers. For machine bootstrap, follow `GET /.well-known/agent.json` → field `agent_first`.","operationId":"root__get","responses":{"200":{"description":"JSON service index or HTML operator evidence index","content":{"application/json":{"schema":{}},"text/html":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"tags":["Discovery"],"summary":"Liveness check","description":"Returns 200 if the API is running. Use for Kubernetes livenessProbe.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/ready":{"get":{"tags":["Discovery"],"summary":"Readiness check","description":"Returns 200 if all dependencies are ready. Use for Kubernetes readinessProbe.","operationId":"health_ready_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/dependencies":{"get":{"tags":["Discovery"],"summary":"Dependency health check","description":"Probes the dependencies this deployment runs on, in parallel with a short timeout. Each entry reports status, latency_ms, and an error message when unreachable. With proof surfaces unmounted (the production posture) the payload covers the transaction-integrity boundary only: postgres, redis, signing key, upstream MCP, version + commit SHA. Instances that mount proof surfaces additionally report those surfaces' dependencies and per-service simulation modes; deps whose consumers are simulated return `not_used` so the verdict doesn't degrade on mock-only deployments.","operationId":"health_dependencies_health_dependencies_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"APIKeyListResponse":{"properties":{"wallet_id":{"type":"string","title":"Wallet Id"},"keys":{"items":{"$ref":"#/components/schemas/APIKeyResponse"},"type":"array","title":"Keys"},"total_active":{"type":"integer","title":"Total Active"},"total_revoked":{"type":"integer","title":"Total Revoked"}},"type":"object","required":["wallet_id","keys","total_active","total_revoked"],"title":"APIKeyListResponse","description":"List of API keys for a wallet."},"APIKeyResponse":{"properties":{"key_id":{"type":"string","title":"Key Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"key_prefix":{"type":"string","title":"Key Prefix"},"masked_key":{"type":"string","title":"Masked Key"},"status":{"$ref":"#/components/schemas/APIKeyStatus"},"key_name":{"type":"string","title":"Key Name","default":"default"},"rotation_count":{"type":"integer","title":"Rotation Count","default":0},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"use_count":{"type":"integer","title":"Use Count","default":0}},"type":"object","required":["key_id","wallet_id","key_prefix","masked_key","status","created_at"],"title":"APIKeyResponse","description":"API key response with masked key for display."},"APIKeyStatus":{"type":"string","enum":["active","revoked","expired","suspended"],"title":"APIKeyStatus"},"APIKeyWithSecret":{"properties":{"key_id":{"type":"string","title":"Key Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"api_key":{"type":"string","title":"Api Key"},"key_prefix":{"type":"string","title":"Key Prefix"},"status":{"$ref":"#/components/schemas/APIKeyStatus"},"key_name":{"type":"string","title":"Key Name","default":"default"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"warning":{"type":"string","title":"Warning","default":"Store this key securely. It will not be shown again."}},"type":"object","required":["key_id","wallet_id","api_key","key_prefix","status","created_at"],"title":"APIKeyWithSecret","description":"API key response including the actual key (only shown once)."},"AlertListResponse":{"properties":{"alerts":{"items":{"$ref":"#/components/schemas/BillingAlert"},"type":"array","title":"Alerts"},"total":{"type":"integer","title":"Total"},"unacknowledged":{"type":"integer","title":"Unacknowledged"}},"type":"object","required":["alerts","total","unacknowledged"],"title":"AlertListResponse"},"AlertSeverity":{"type":"string","enum":["info","warning","error","critical"],"title":"AlertSeverity"},"AlertType":{"type":"string","enum":["low_balance","insufficient_funds","budget_exceeded","anomalous_spend","kyc_pending","kyc_rejected","suspicious_activity"],"title":"AlertType"},"AuditChainVerifyRequest":{"properties":{"wallet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Id"},"created_after":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created After"},"created_before":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created Before"}},"type":"object","title":"AuditChainVerifyRequest"},"AuditChainVerifyResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"checked_events":{"type":"integer","title":"Checked Events"},"first_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Event Id"},"last_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event Id"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"broken_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Broken Event Id"}},"type":"object","required":["valid","checked_events"],"title":"AuditChainVerifyResponse"},"AuditEventListResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/AuditEventResponse"},"type":"array","title":"Events"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit","default":50},"offset":{"type":"integer","title":"Offset","default":0},"has_more":{"type":"boolean","title":"Has More","default":false},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"},"summary":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["events","total"],"title":"AuditEventListResponse"},"AuditEventResponse":{"properties":{"event_id":{"type":"string","title":"Event Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"event":{"type":"string","title":"Event"},"wallet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Id"},"tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"},"endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endpoint"},"auth_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auth Source"},"key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Id"},"policy_decision_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Decision Id"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"ok":{"type":"boolean","title":"Ok"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"payload_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payload Hash"},"previous_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Previous Hash"},"chain_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chain Hash"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"},"signature_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature Key Id"}},"type":"object","required":["event_id","created_at","event","wallet_id","tool","endpoint","auth_source","key_id","policy_decision_id","request_id","ok","error","metadata"],"title":"AuditEventResponse"},"AuditSummaryResponse":{"properties":{"total":{"type":"integer","title":"Total"},"by_event":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Event"},"by_outcome":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Outcome"},"by_wallet":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Wallet"},"by_policy_reason":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Policy Reason"}},"type":"object","required":["total","by_event","by_outcome","by_wallet","by_policy_reason"],"title":"AuditSummaryResponse"},"AuthoritySummaryResponse":{"properties":{"wallet_id":{"type":"string","title":"Wallet Id"},"balance":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Balance"},"daily_spend_used":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Daily Spend Used"},"human_approval_required":{"type":"boolean","title":"Human Approval Required"},"policies":{"items":{"$ref":"#/components/schemas/PolicyBundleResponse"},"type":"array","title":"Policies"},"active_permits":{"items":{"$ref":"#/components/schemas/PermitResponse"},"type":"array","title":"Active Permits"},"active_permits_total":{"type":"integer","title":"Active Permits Total"},"pending_permit_requests":{"items":{"$ref":"#/components/schemas/PermitRequestResponse"},"type":"array","title":"Pending Permit Requests"},"pending_permit_requests_total":{"type":"integer","title":"Pending Permit Requests Total"}},"type":"object","required":["wallet_id","balance","daily_spend_used","human_approval_required","policies","active_permits","active_permits_total","pending_permit_requests","pending_permit_requests_total"],"title":"AuthoritySummaryResponse","description":"Answer to \"what authority do I currently have?\" for one wallet key.\n\nComposes reads the caller can already make one at a time — balance,\nactive policy constraints, active permits, pending permit requests — into\na single view, so a planning agent sees what it may do, what will pause\nfor a human, and what it has already asked for, without stitching four\nlists together. Everything here describes the caller's own wallet."},"BillingAlert":{"properties":{"alert_id":{"type":"string","title":"Alert Id"},"alert_type":{"$ref":"#/components/schemas/AlertType"},"wallet_id":{"type":"string","title":"Wallet Id"},"message":{"type":"string","title":"Message"},"threshold_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Threshold Amount"},"threshold_amount_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Threshold Amount Exact"},"current_balance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Balance"},"current_balance_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Balance Exact"},"severity":{"$ref":"#/components/schemas/AlertSeverity","default":"info"},"acknowledged":{"type":"boolean","title":"Acknowledged","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["alert_id","alert_type","wallet_id","message","created_at"],"title":"BillingAlert","description":"Billing alert for sponsors or agents."},"CoreDiscoveryManifest":{"properties":{"name":{"type":"string","title":"Name","description":"Service name"},"version":{"type":"string","title":"Version","description":"API version"},"description":{"type":"string","title":"Description","description":"What this service provides"},"capabilities":{"items":{"$ref":"#/components/schemas/ServiceCapability"},"type":"array","title":"Capabilities","description":"List of service capabilities"},"mcp_tools":{"items":{"$ref":"#/components/schemas/MCPToolInfo"},"type":"array","title":"Mcp Tools","description":"Available MCP tools"},"pricing":{"items":{"$ref":"#/components/schemas/PricingTier"},"type":"array","title":"Pricing","description":"Pricing tiers"},"authentication":{"additionalProperties":true,"type":"object","title":"Authentication"},"rate_limits":{"additionalProperties":true,"type":"object","title":"Rate Limits","description":"Enforced request budget and the bucket it is counted against. Mirrors the X-RateLimit-* response headers."},"documentation":{"additionalProperties":true,"type":"object","title":"Documentation"},"integration_guides":{"additionalProperties":true,"type":"object","title":"Integration Guides","description":"Integration entry points; proof-surface guides only when mounted."},"agent_first":{"additionalProperties":true,"type":"object","title":"Agent First","description":"Same metadata as /.well-known/agent.json agent_first: bootstrap order and where to read simulation vs real state."}},"type":"object","required":["name","version","description"],"title":"CoreDiscoveryManifest","description":"Wedge-only discovery manifest — what a production deployment serves.\n\nResponse model for /v1/discover when proof surfaces are unmounted, so the\npublic OpenAPI contract carries no proof-surface vocabulary. Instances\nthat mount proof surfaces serve the DiscoveryManifest subclass instead."},"CreateAPIKeyRequest":{"properties":{"wallet_id":{"type":"string","title":"Wallet Id","description":"Wallet ID to create key for."},"key_name":{"type":"string","maxLength":50,"title":"Key Name","description":"Human-readable name for this key.","default":"default"},"expires_in_days":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Expires In Days","description":"Optional expiration in days. None = no expiration."},"max_uses":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Uses","description":"Optional max uses. None = unlimited."}},"type":"object","required":["wallet_id"],"title":"CreateAPIKeyRequest","description":"Request to create a new API key for a wallet."},"CreateAgentWalletRequest":{"properties":{"sponsor_wallet_id":{"type":"string","title":"Sponsor Wallet Id","description":"ID of the sponsor wallet funding this agent."},"agent_id":{"type":"string","title":"Agent Id","description":"Agent ID from the comms registry."},"budget_credits":{"type":"number","exclusiveMinimum":0.0,"title":"Budget Credits","description":"Credits to provision from the sponsor's balance."},"daily_limit":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Daily Limit","description":"Optional daily spend cap."},"auto_refill":{"type":"boolean","title":"Auto Refill","description":"Auto-refill from sponsor when balance drops below threshold.","default":false},"auto_refill_threshold":{"type":"number","minimum":0.0,"title":"Auto Refill Threshold","description":"Refill trigger threshold.","default":100.0},"auto_refill_amount":{"type":"number","minimum":0.0,"title":"Auto Refill Amount","description":"Amount to refill.","default":1000.0}},"type":"object","required":["sponsor_wallet_id","agent_id","budget_credits"],"title":"CreateAgentWalletRequest","description":"Provision a pre-paid agent wallet under a sponsor."},"CreateSponsorWalletRequest":{"properties":{"sponsor_name":{"type":"string","maxLength":128,"minLength":1,"title":"Sponsor Name","description":"Human or organization name for the liability sink.","examples":["Acme Corp Engineering"]},"email":{"type":"string","title":"Email","description":"Contact email for billing alerts and top-up requests.","examples":["billing@acme.com"]},"initial_credits":{"type":"number","minimum":0.0,"title":"Initial Credits","description":"Initial credit balance (in ecosystem credits).","default":0.0},"currency":{"type":"string","title":"Currency","description":"Fiat currency for external payment rails.","default":"USD"},"require_kyc":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Kyc","description":"Require KYC verification before allowing fiat top-ups. Defaults to system setting."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Arbitrary metadata (Stripe customer ID, org info, etc.)."}},"type":"object","required":["sponsor_name","email"],"title":"CreateSponsorWalletRequest","description":"Create a human sponsor (liability sink) root account."},"DispatchEvidenceResponse":{"properties":{"attempt_id":{"type":"string","title":"Attempt Id"},"state":{"type":"string","title":"State"},"public_tool_id":{"type":"string","title":"Public Tool Id"},"upstream_tool_name":{"type":"string","title":"Upstream Tool Name"},"upstream_origin":{"type":"string","title":"Upstream Origin"},"request_hash":{"type":"string","title":"Request Hash"},"response_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Hash"},"ledger_entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ledger Entry Id"},"credits_authorized":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Credits Authorized"},"credits_charged":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Credits Charged"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"dispatched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dispatched At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["attempt_id","state","public_tool_id","upstream_tool_name","upstream_origin","request_hash","credits_authorized","credits_charged","created_at"],"title":"DispatchEvidenceResponse","description":"Sanitized upstream-dispatch evidence; result payloads and secrets stay private."},"EmergencyKeyRevocationRequest":{"properties":{"wallet_id":{"type":"string","title":"Wallet Id","description":"Wallet ID to revoke keys for."},"reason":{"type":"string","maxLength":255,"title":"Reason","description":"Reason for emergency revocation.","default":"security_incident"},"create_new_key":{"type":"boolean","title":"Create New Key","description":"Whether to create a new emergency key.","default":true}},"type":"object","required":["wallet_id"],"title":"EmergencyKeyRevocationRequest","description":"Request to immediately revoke all keys for a wallet."},"EvidenceBundleResponse":{"properties":{"receipt_id":{"type":"string","title":"Receipt Id"},"valid":{"type":"boolean","title":"Valid"},"receipt":{"$ref":"#/components/schemas/ReceiptResponse"},"permit":{"anyOf":[{"$ref":"#/components/schemas/PermitResponse"},{"type":"null"}]},"ledger_entry":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ledger Entry"},"audit_event":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Audit Event"},"dispatch":{"anyOf":[{"$ref":"#/components/schemas/DispatchEvidenceResponse"},{"type":"null"}]},"verification":{"additionalProperties":{"type":"string"},"type":"object","title":"Verification"}},"type":"object","required":["receipt_id","valid","receipt"],"title":"EvidenceBundleResponse","description":"Flat, buyer-facing trust artifact for a single receipt."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InsufficientFundsResponse":{"properties":{"error":{"type":"string","title":"Error","default":"insufficient_funds"},"wallet_id":{"type":"string","title":"Wallet Id"},"current_balance":{"type":"number","title":"Current Balance"},"current_balance_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Balance Exact"},"required_amount":{"type":"number","title":"Required Amount"},"required_amount_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Required Amount Exact"},"shortfall":{"type":"number","title":"Shortfall"},"shortfall_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Shortfall Exact"},"top_up_url":{"type":"string","title":"Top Up Url"},"message":{"type":"string","title":"Message","default":"Wallet balance insufficient."}},"type":"object","required":["wallet_id","current_balance","required_amount","shortfall","top_up_url"],"title":"InsufficientFundsResponse","description":"Structured 402 Payment Required response."},"KYCStatus":{"type":"string","enum":["not_required","pending","verified","rejected","expired"],"title":"KYCStatus"},"KeyRotationLogEntry":{"properties":{"log_id":{"type":"string","title":"Log Id"},"key_id":{"type":"string","title":"Key Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"rotation_type":{"$ref":"#/components/schemas/RotationType"},"old_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Old Key Id"},"new_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Key Id"},"trigger_reason":{"type":"string","title":"Trigger Reason"},"triggered_by":{"type":"string","title":"Triggered By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["log_id","key_id","wallet_id","rotation_type","trigger_reason","triggered_by","created_at"],"title":"KeyRotationLogEntry","description":"Audit log entry for key rotation."},"LedgerAction":{"type":"string","enum":["credit","debit","transfer","refund","arbitrage_margin"],"title":"LedgerAction"},"LedgerEntry":{"properties":{"entry_id":{"type":"string","title":"Entry Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"action":{"$ref":"#/components/schemas/LedgerAction"},"amount":{"type":"number","title":"Amount","description":"Credit amount (positive=credit, negative=debit)."},"amount_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount Exact","description":"Exact transaction amount as a decimal string."},"balance_after":{"type":"number","title":"Balance After","description":"Wallet balance after this transaction."},"balance_after_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance After Exact","description":"Exact post-transaction balance as a decimal string."},"service_category":{"anyOf":[{"$ref":"#/components/schemas/ServiceCategory"},{"type":"null"}]},"description":{"type":"string","title":"Description","default":""},"request_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Path"},"compute_cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Compute Cost"},"compute_cost_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Compute Cost Exact"},"margin":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Margin"},"margin_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Margin Exact"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["entry_id","wallet_id","action","amount","balance_after","timestamp"],"title":"LedgerEntry","description":"A single atomic transaction in the billing ledger."},"LedgerResponse":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/LedgerEntry"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"},"wallet_id":{"type":"string","title":"Wallet Id"},"period_credits":{"type":"number","title":"Period Credits"},"period_credits_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Credits Exact"},"period_debits":{"type":"number","title":"Period Debits"},"period_debits_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Period Debits Exact"}},"type":"object","required":["entries","total","wallet_id","period_credits","period_debits"],"title":"LedgerResponse","description":"Paginated ledger entries."},"MCPToolInfo":{"properties":{"service_id":{"type":"string","title":"Service Id"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"credits_per_call":{"type":"number","title":"Credits Per Call"},"unit_name":{"type":"string","title":"Unit Name"}},"type":"object","required":["service_id","name","description","category","credits_per_call","unit_name"],"title":"MCPToolInfo"},"McpContext":{"properties":{"wallet_id":{"type":"string","title":"Wallet Id","description":"Wallet to charge for this call"},"request_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Path","description":"Optional request path for tracking"},"permit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permit Id","description":"Signed permit for governed calls"},"quote_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote Id","description":"Signed price quote to charge against (locks the price)"},"idempotency_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Key","description":"Replay key for governed calls"}},"type":"object","required":["wallet_id"],"title":"McpContext","description":"MCP execution context passed in tool calls."},"PermitCreateRequest":{"properties":{"issuer_wallet_id":{"type":"string","title":"Issuer Wallet Id"},"subject_wallet_id":{"type":"string","title":"Subject Wallet Id"},"subject_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Key Id"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"allowed_tools":{"items":{"type":"string"},"type":"array","title":"Allowed Tools"},"max_credits":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Max Credits"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"nonce":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nonce"},"requires_human_approval":{"type":"boolean","title":"Requires Human Approval","default":false},"max_calls_per_tool":{"additionalProperties":{"type":"integer"},"type":"object","title":"Max Calls Per Tool"},"aggregate_value_cap":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Aggregate Value Cap"},"forbidden_fields":{"items":{"type":"string"},"type":"array","title":"Forbidden Fields"},"recipient_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Domain"}},"type":"object","required":["issuer_wallet_id","subject_wallet_id","max_credits","expires_at"],"title":"PermitCreateRequest"},"PermitListResponse":{"properties":{"permits":{"items":{"$ref":"#/components/schemas/PermitResponse"},"type":"array","title":"Permits"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["permits","total","limit","offset","has_more"],"title":"PermitListResponse"},"PermitRequestCreate":{"properties":{"issuer_wallet_id":{"type":"string","title":"Issuer Wallet Id"},"subject_wallet_id":{"type":"string","title":"Subject Wallet Id"},"allowed_tools":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Allowed Tools"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"max_credits":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Max Credits"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"justification":{"type":"string","maxLength":2000,"minLength":1,"title":"Justification"},"requires_human_approval":{"type":"boolean","title":"Requires Human Approval","default":false}},"type":"object","required":["issuer_wallet_id","subject_wallet_id","allowed_tools","max_credits","expires_at","justification"],"title":"PermitRequestCreate","description":"An agent asking a human for authority it cannot mint itself."},"PermitRequestListResponse":{"properties":{"requests":{"items":{"$ref":"#/components/schemas/PermitRequestResponse"},"type":"array","title":"Requests"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["requests","total","limit","offset","has_more"],"title":"PermitRequestListResponse"},"PermitRequestResponse":{"properties":{"request_id":{"type":"string","title":"Request Id"},"status":{"type":"string","enum":["pending","minting","approved","rejected","expired","failed"],"title":"Status"},"issuer_wallet_id":{"type":"string","title":"Issuer Wallet Id"},"subject_wallet_id":{"type":"string","title":"Subject Wallet Id"},"subject_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Key Id"},"allowed_tools":{"items":{"type":"string"},"type":"array","title":"Allowed Tools"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"max_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Max Credits"},"permit_expires_at":{"type":"string","format":"date-time","title":"Permit Expires At"},"requires_human_approval":{"type":"boolean","title":"Requires Human Approval"},"justification":{"type":"string","title":"Justification"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"decided_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decided By"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"simulated":{"type":"boolean","title":"Simulated","default":false},"permit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permit Id"},"permit":{"anyOf":[{"$ref":"#/components/schemas/PermitResponse"},{"type":"null"}]},"poll_url":{"type":"string","title":"Poll Url"}},"type":"object","required":["request_id","status","issuer_wallet_id","subject_wallet_id","allowed_tools","scopes","max_credits","permit_expires_at","requires_human_approval","justification","requested_at","expires_at","poll_url"],"title":"PermitRequestResponse"},"PermitResponse":{"properties":{"permit_id":{"type":"string","title":"Permit Id"},"issuer_wallet_id":{"type":"string","title":"Issuer Wallet Id"},"subject_wallet_id":{"type":"string","title":"Subject Wallet Id"},"subject_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Key Id"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"allowed_tools":{"items":{"type":"string"},"type":"array","title":"Allowed Tools"},"max_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Max Credits"},"spent_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Spent Credits"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"nonce":{"type":"string","title":"Nonce"},"status":{"type":"string","title":"Status"},"requires_human_approval":{"type":"boolean","title":"Requires Human Approval","default":false},"signature":{"type":"string","title":"Signature"},"key_id":{"type":"string","title":"Key Id"},"issued_at":{"type":"string","format":"date-time","title":"Issued At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"max_calls_per_tool":{"additionalProperties":{"type":"integer"},"type":"object","title":"Max Calls Per Tool"},"aggregate_value_cap":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Aggregate Value Cap"},"forbidden_fields":{"items":{"type":"string"},"type":"array","title":"Forbidden Fields"},"recipient_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recipient Domain"}},"type":"object","required":["permit_id","issuer_wallet_id","subject_wallet_id","subject_key_id","scopes","allowed_tools","max_credits","spent_credits","expires_at","nonce","status","signature","key_id","issued_at"],"title":"PermitResponse"},"PermitVerifyRequest":{"properties":{"permit_id":{"type":"string","title":"Permit Id"},"wallet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Id"},"tool":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool"},"estimated_credits":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Estimated Credits"}},"type":"object","required":["permit_id"],"title":"PermitVerifyRequest"},"PermitVerifyResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"},"permit":{"anyOf":[{"$ref":"#/components/schemas/PermitResponse"},{"type":"null"}]}},"type":"object","required":["valid"],"title":"PermitVerifyResponse"},"PolicyBundleCreate":{"properties":{"wallet_id":{"type":"string","title":"Wallet Id"},"name":{"type":"string","minLength":1,"title":"Name"},"allowed_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Tools"},"allowed_service_categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Service Categories"},"max_cost_per_action":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Cost Per Action"},"daily_spend_limit":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Daily Spend Limit"},"require_real_effects":{"type":"boolean","title":"Require Real Effects","default":false},"risk_tier":{"type":"string","title":"Risk Tier","default":"medium"},"human_approval_required":{"type":"boolean","title":"Human Approval Required","default":false},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["wallet_id","name"],"title":"PolicyBundleCreate"},"PolicyBundleListResponse":{"properties":{"policies":{"items":{"$ref":"#/components/schemas/PolicyBundleResponse"},"type":"array","title":"Policies"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["policies","total"],"title":"PolicyBundleListResponse"},"PolicyBundlePatch":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"},"allowed_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Tools"},"allowed_service_categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Service Categories"},"max_cost_per_action":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Cost Per Action"},"daily_spend_limit":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Daily Spend Limit"},"require_real_effects":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Real Effects"},"risk_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Tier"},"human_approval_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Human Approval Required"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"PolicyBundlePatch"},"PolicyBundleResponse":{"properties":{"policy_id":{"type":"string","title":"Policy Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"name":{"type":"string","title":"Name"},"allowed_tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Tools"},"allowed_service_categories":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Service Categories"},"max_cost_per_action":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Cost Per Action"},"daily_spend_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Spend Limit"},"require_real_effects":{"type":"boolean","title":"Require Real Effects"},"risk_tier":{"type":"string","title":"Risk Tier"},"human_approval_required":{"type":"boolean","title":"Human Approval Required"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["policy_id","wallet_id","name","allowed_tools","allowed_service_categories","max_cost_per_action","daily_spend_limit","require_real_effects","risk_tier","human_approval_required","is_active","created_at","updated_at"],"title":"PolicyBundleResponse"},"PortableReceiptResponse":{"properties":{"schema_version":{"type":"string","title":"Schema Version","default":"1.0"},"receipt_id":{"type":"string","title":"Receipt Id"},"issuer":{"type":"string","title":"Issuer","description":"Public origin of the issuing plane; empty when PUBLIC_URL is unset."},"alg":{"type":"string","title":"Alg","default":"Ed25519"},"kid":{"type":"string","title":"Kid","description":"Identifies which published key signed this receipt."},"canonicalization":{"type":"string","title":"Canonicalization","description":"Canonical-JSON contract version the signing_input follows."},"signing_input":{"type":"string","title":"Signing Input","description":"The exact UTF-8 string the signature covers. Verify over these bytes verbatim; do not re-serialize the parsed object."},"signature":{"type":"string","title":"Signature","description":"Base64 Ed25519 signature over signing_input."},"keys_url":{"type":"string","title":"Keys Url","description":"Where to fetch the public key for `kid`."}},"type":"object","required":["receipt_id","issuer","kid","canonicalization","signing_input","signature","keys_url"],"title":"PortableReceiptResponse","description":"A receipt as self-contained, offline-verifiable evidence.\n\nEverything needed to check the signature travels in this object, except\nthe public key — which is published unauthenticated at ``keys_url``. A\nholder verifies it without an account, a credential, or any call back to\nthe plane that issued it."},"PreflightCheckResult":{"properties":{"name":{"type":"string","title":"Name"},"passed":{"type":"boolean","title":"Passed"},"severity":{"type":"string","title":"Severity","description":"critical, warning, or info"},"message":{"type":"string","title":"Message"},"detail":{"type":"string","title":"Detail","default":""}},"type":"object","required":["name","passed","severity","message"],"title":"PreflightCheckResult","description":"Single preflight check outcome."},"PreflightRequest":{"properties":{"base_url":{"type":"string","title":"Base Url","description":"Production BASE_URL to validate (e.g., https://api.mycompany.com).","default":""},"stripe_secret_key":{"type":"string","title":"Stripe Secret Key","description":"Stripe secret key to validate (sk_live_... for production).","default":""},"campaign_source_url":{"type":"string","title":"Campaign Source Url","description":"Campaign content source URL to validate (e.g., a real launch video URL).","default":""}},"type":"object","title":"PreflightRequest","description":"Optional overrides for preflight validation."},"PreflightResponse":{"properties":{"checked_at":{"type":"string","format":"date-time","title":"Checked At"},"verdict":{"type":"string","title":"Verdict","description":"GO or NO-GO"},"total_checks":{"type":"integer","title":"Total Checks"},"passed":{"type":"integer","title":"Passed"},"failed":{"type":"integer","title":"Failed"},"warnings":{"type":"integer","title":"Warnings"},"critical_failures":{"type":"integer","title":"Critical Failures"},"checks":{"items":{"$ref":"#/components/schemas/PreflightCheckResult"},"type":"array","title":"Checks"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["checked_at","verdict","total_checks","passed","failed","warnings","critical_failures","checks","summary"],"title":"PreflightResponse","description":"Pre-flight readiness report — the checklist before you turn the key."},"PricingTableResponse":{"properties":{"pricing":{"items":{"$ref":"#/components/schemas/ServicePricing"},"type":"array","title":"Pricing"},"exchange_rate":{"type":"number","title":"Exchange Rate"},"exchange_rate_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchange Rate Exact"},"last_updated":{"type":"string","format":"date-time","title":"Last Updated"}},"type":"object","required":["pricing","exchange_rate","last_updated"],"title":"PricingTableResponse","description":"Full pricing table for all services."},"PricingTier":{"properties":{"tier_name":{"type":"string","title":"Tier Name"},"price_per_credit":{"type":"number","title":"Price Per Credit"},"minimum_purchase":{"type":"number","title":"Minimum Purchase"},"features":{"items":{"type":"string"},"type":"array","title":"Features"}},"type":"object","required":["tier_name","price_per_credit","minimum_purchase","features"],"title":"PricingTier"},"QuoteCreateRequest":{"properties":{"wallet_id":{"type":"string","title":"Wallet Id"},"tool":{"type":"string","title":"Tool"}},"type":"object","required":["wallet_id","tool"],"title":"QuoteCreateRequest","description":"Ask what one call of a tool will cost this wallet."},"QuoteListResponse":{"properties":{"quotes":{"items":{"$ref":"#/components/schemas/QuoteResponse"},"type":"array","title":"Quotes"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["quotes","total","limit","offset","has_more"],"title":"QuoteListResponse"},"QuoteResponse":{"properties":{"quote_id":{"type":"string","title":"Quote Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"tool":{"type":"string","title":"Tool"},"quoted_credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Quoted Credits"},"category":{"type":"string","title":"Category"},"status":{"type":"string","enum":["active","consumed","expired"],"title":"Status"},"issued_at":{"type":"string","format":"date-time","title":"Issued At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"consumed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Consumed At"},"signature":{"type":"string","title":"Signature"},"key_id":{"type":"string","title":"Key Id"}},"type":"object","required":["quote_id","wallet_id","tool","quoted_credits","category","status","issued_at","expires_at","signature","key_id"],"title":"QuoteResponse"},"ReceiptEvidenceCheck":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["passed","failed","skipped"],"title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"type":"object","required":["name","status"],"title":"ReceiptEvidenceCheck"},"ReceiptEvidenceResponse":{"properties":{"receipt_id":{"type":"string","title":"Receipt Id"},"valid":{"type":"boolean","title":"Valid"},"checks":{"items":{"$ref":"#/components/schemas/ReceiptEvidenceCheck"},"type":"array","title":"Checks"},"receipt":{"$ref":"#/components/schemas/ReceiptResponse"},"permit":{"anyOf":[{"$ref":"#/components/schemas/PermitResponse"},{"type":"null"}]},"audit_event":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Audit Event"},"audit_chain":{"anyOf":[{"$ref":"#/components/schemas/AuditChainVerifyResponse"},{"type":"null"}]},"ledger_entry":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ledger Entry"},"dispatch":{"anyOf":[{"$ref":"#/components/schemas/DispatchEvidenceResponse"},{"type":"null"}]}},"type":"object","required":["receipt_id","valid","checks","receipt"],"title":"ReceiptEvidenceResponse"},"ReceiptListResponse":{"properties":{"receipts":{"items":{"$ref":"#/components/schemas/ReceiptResponse"},"type":"array","title":"Receipts"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["receipts","total","limit","offset","has_more"],"title":"ReceiptListResponse"},"ReceiptResponse":{"properties":{"receipt_id":{"type":"string","title":"Receipt Id"},"idempotency_record_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency Record Id"},"dispatch_attempt_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dispatch Attempt Id"},"permit_id":{"type":"string","title":"Permit Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Id"},"tool":{"type":"string","title":"Tool"},"request_hash":{"type":"string","title":"Request Hash"},"response_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Hash"},"ledger_entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ledger Entry Id"},"credits_authorized":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Credits Authorized"},"credits_charged":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Credits Charged"},"outcome":{"type":"string","title":"Outcome"},"reason_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Code"},"audit_event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audit Event Id"},"approval_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Approval Id"},"constraints_evaluated":{"additionalProperties":true,"type":"object","title":"Constraints Evaluated"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"signature":{"type":"string","title":"Signature"},"signature_key_id":{"type":"string","title":"Signature Key Id"}},"type":"object","required":["receipt_id","permit_id","wallet_id","key_id","tool","request_hash","response_hash","ledger_entry_id","credits_authorized","credits_charged","outcome","audit_event_id","created_at","signature","signature_key_id"],"title":"ReceiptResponse"},"ReceiptVerifyRequest":{"properties":{"receipt_id":{"type":"string","title":"Receipt Id"}},"type":"object","required":["receipt_id"],"title":"ReceiptVerifyRequest"},"ReceiptVerifyResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"receipt":{"anyOf":[{"$ref":"#/components/schemas/ReceiptResponse"},{"type":"null"}]}},"type":"object","required":["valid"],"title":"ReceiptVerifyResponse"},"RefundReconciliationItem":{"properties":{"record_id":{"type":"string","title":"Record Id"},"receipt_id":{"type":"string","title":"Receipt Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"permit_id":{"type":"string","title":"Permit Id"},"ledger_entry_id":{"type":"string","title":"Ledger Entry Id"},"refund_entry_id":{"type":"string","title":"Refund Entry Id"},"credits":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Credits"},"status":{"type":"string","enum":["pending","resolved"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"}},"type":"object","required":["record_id","receipt_id","wallet_id","permit_id","ledger_entry_id","refund_entry_id","credits","status","created_at"],"title":"RefundReconciliationItem"},"RefundReconciliationListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RefundReconciliationItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"has_more":{"type":"boolean","title":"Has More"},"next_offset":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Offset"}},"type":"object","required":["items","total","limit","offset","has_more"],"title":"RefundReconciliationListResponse"},"RefundReconciliationRetryResponse":{"properties":{"item":{"$ref":"#/components/schemas/RefundReconciliationItem"},"replayed":{"type":"boolean","title":"Replayed"}},"type":"object","required":["item","replayed"],"title":"RefundReconciliationRetryResponse"},"RotateAPIKeyRequest":{"properties":{"wallet_id":{"type":"string","title":"Wallet Id","description":"Wallet ID owning the key."},"key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key Id","description":"Specific key ID to rotate. None = create new key only."},"revoke_old":{"type":"boolean","title":"Revoke Old","description":"Whether to revoke the old key after rotation.","default":false},"reason":{"type":"string","maxLength":255,"title":"Reason","description":"Reason for rotation.","default":"manual_rotation"}},"type":"object","required":["wallet_id"],"title":"RotateAPIKeyRequest","description":"Request to rotate an API key."},"RotationResponse":{"properties":{"rotation_id":{"type":"string","title":"Rotation Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"old_key_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Old Key Id"},"new_key":{"anyOf":[{"$ref":"#/components/schemas/APIKeyWithSecret"},{"type":"null"}]},"rotation_type":{"$ref":"#/components/schemas/RotationType"},"revoked_keys":{"items":{"type":"string"},"type":"array","title":"Revoked Keys","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["rotation_id","wallet_id","rotation_type","created_at"],"title":"RotationResponse","description":"Response after key rotation."},"RotationType":{"type":"string","enum":["manual","automatic","emergency","scheduled"],"title":"RotationType"},"ServiceCapability":{"properties":{"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"requires_auth":{"type":"boolean","title":"Requires Auth","default":true},"surface":{"type":"string","title":"Surface","description":"'product' = consequential-action transaction-integrity boundary; 'proof_surface' = labeled demo/workload scaffolding (often simulated).","default":"product"},"simulation_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Simulation Default","description":"When true, this surface defaults to simulation mode."}},"type":"object","required":["name","version","description","category"],"title":"ServiceCapability"},"ServiceCategory":{"type":"string","enum":["iot_bridge","telemetry_pm","media_engine","agent_comms","content_factory","red_team","oracle","platform_fee","swarm_delegation","protocol_gen","sandbox","rtaas"],"title":"ServiceCategory"},"ServicePricing":{"properties":{"service_category":{"$ref":"#/components/schemas/ServiceCategory"},"unit":{"type":"string","title":"Unit"},"credits_per_unit":{"type":"number","title":"Credits Per Unit"},"credits_per_unit_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credits Per Unit Exact"},"description":{"type":"string","title":"Description","default":""}},"type":"object","required":["service_category","unit","credits_per_unit"],"title":"ServicePricing","description":"Per-action pricing for a service category."},"SigningKeyMetadataResponse":{"properties":{"key_id":{"type":"string","title":"Key Id"},"alg":{"type":"string","title":"Alg"},"public_key_b64":{"type":"string","title":"Public Key B64"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"activated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Activated At"},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At"}},"type":"object","required":["key_id","alg","public_key_b64","status","created_at"],"title":"SigningKeyMetadataResponse"},"ToolCallRequest":{"properties":{"name":{"type":"string","title":"Name","description":"Tool name (service_id)"},"arguments":{"additionalProperties":true,"type":"object","title":"Arguments","description":"Tool arguments"},"mcp_context":{"anyOf":[{"$ref":"#/components/schemas/McpContext"},{"type":"null"}],"description":"Billing context"}},"type":"object","required":["name"],"title":"ToolCallRequest","description":"MCP tool call request (tools/call method)."},"ToolCallResponse":{"properties":{"content":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Content"},"isError":{"type":"boolean","title":"Iserror","default":false},"structuredContent":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structuredcontent"},"receipt":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Receipt"}},"type":"object","required":["content"],"title":"ToolCallResponse","description":"MCP tool call response."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WalletListResponse":{"properties":{"wallets":{"items":{"$ref":"#/components/schemas/WalletResponse"},"type":"array","title":"Wallets"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["wallets","total"],"title":"WalletListResponse"},"WalletResponse":{"properties":{"wallet_id":{"type":"string","title":"Wallet Id"},"wallet_type":{"$ref":"#/components/schemas/WalletType"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"balance":{"type":"number","title":"Balance","description":"Current credit balance."},"balance_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Exact","description":"Exact current credit balance as a decimal string."},"lifetime_credits":{"type":"number","title":"Lifetime Credits","description":"Total credits ever deposited."},"lifetime_credits_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifetime Credits Exact"},"lifetime_debits":{"type":"number","title":"Lifetime Debits","description":"Total credits ever consumed."},"lifetime_debits_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lifetime Debits Exact"},"status":{"$ref":"#/components/schemas/WalletStatus"},"kyc_status":{"$ref":"#/components/schemas/KYCStatus","default":"not_required"},"daily_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Daily Limit"},"daily_limit_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Daily Limit Exact"},"auto_refill":{"type":"boolean","title":"Auto Refill","default":false},"auto_refill_threshold":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Refill Threshold"},"auto_refill_threshold_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Refill Threshold Exact"},"auto_refill_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Auto Refill Amount"},"auto_refill_amount_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Auto Refill Amount Exact"},"sponsor_wallet_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sponsor Wallet Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id"},"child_agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Child Agent Id"},"max_spend":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Spend"},"max_spend_exact":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Max Spend Exact"},"task_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Description"},"ttl_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ttl Seconds"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["wallet_id","wallet_type","balance","lifetime_credits","lifetime_debits","status","created_at"],"title":"WalletResponse","description":"Wallet details."},"WalletStatus":{"type":"string","enum":["active","suspended","frozen","closed","pending_kyc"],"title":"WalletStatus"},"WalletType":{"type":"string","enum":["sponsor","agent","child"],"title":"WalletType","description":"Wallet types in the three-tier system."}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","description":"API key for agent authentication. Pass in the X-API-Key header.","in":"header","name":"X-API-Key"}}}}