{"openapi":"3.1.0","info":{"title":"AgentLedger API","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/track":{"post":{"summary":"Create Track","operationId":"create_track_v1_track_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/budget":{"post":{"summary":"Create Budget","operationId":"create_budget_v1_budget_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BudgetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/report/{agent_id}":{"get":{"summary":"Get Report","operationId":"get_report_v1_report__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/alerts/{agent_id}":{"get":{"summary":"Get Alerts","operationId":"get_alerts_v1_alerts__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents":{"get":{"summary":"Get Agents","operationId":"get_agents_v1_agents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/stats":{"get":{"summary":"Stats","operationId":"stats_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/glama.json":{"get":{"summary":"Glama Claim","description":"Glama HTTP-challenge ownership verification file.","operationId":"glama_claim__well_known_glama_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"summary":"Llms Txt","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/robots.txt":{"get":{"summary":"Robots Txt","operationId":"robots_txt_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/server.json":{"get":{"summary":"Server Json","description":"MCP server discovery manifest at the canonical root path.","operationId":"server_json_server_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status":{"get":{"summary":"Status Page","operationId":"status_page_status_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/stripe/webhook":{"post":{"summary":"Stripe Webhook","description":"Fulfillment: checkout.session.completed -> customers.jsonl (HMAC-verified).","operationId":"stripe_webhook_stripe_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/agents/{agent_id}":{"delete":{"summary":"Delete Agent","description":"Remove an agent's ledger entirely. Owner-only (cron secret) — beta slots\nare per-product, so the operator can clear test/demo agents to free slots.","operationId":"delete_agent_v1_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/tokens/{agent_id}":{"get":{"summary":"Token Report","description":"Token burn report: totals in/out, by model, per period. Separate from\ndollar spend — answers 'what is this agent burning on?'","operationId":"token_report_v1_tokens__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/{email}":{"get":{"summary":"Billing Status","operationId":"billing_status_v1_billing__email__get","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BudgetRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"monthly_cents":{"type":"integer","title":"Monthly Cents"},"daily_cents":{"type":"integer","title":"Daily Cents","default":0}},"type":"object","required":["agent_id","monthly_cents"],"title":"BudgetRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"TrackRequest":{"properties":{"agent_id":{"type":"string","title":"Agent Id"},"rail":{"type":"string","title":"Rail"},"amount_cents":{"type":"integer","title":"Amount Cents"},"service":{"type":"string","title":"Service"},"tokens_in":{"type":"integer","title":"Tokens In","default":0},"tokens_out":{"type":"integer","title":"Tokens Out","default":0},"model":{"type":"string","title":"Model","default":""}},"type":"object","required":["agent_id","rail","amount_cents","service"],"title":"TrackRequest"},"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"}}}}