{"openapi":"3.1.0","info":{"title":"Agentgates API","version":"1.0.0","description":"Compute and inference for AI agents: a confidential VM (Intel TDX) by the hour and open models by the request, both quoting a real price over HTTP and taking USDC via x402. No signup and no API key needed — the paying wallet is the account."},"externalDocs":{"description":"Machine index (llms.txt)","url":"https://agentgates.ai/llms.txt"},"servers":[{"url":"https://agentgates.ai"}],"paths":{"/api/compute/docs":{"get":{"summary":"Compute agent docs — contract + live prices (markdown)","responses":{"200":{"description":"Markdown for agents"}}}},"/api/compute/catalog":{"get":{"summary":"Compute plans and live prices (JSON)","responses":{"200":{"description":"Catalog"}}}},"/api/compute/deployments":{"post":{"summary":"Buy a confidential VM (x402)","description":"POST without X-PAYMENT to get a free 402 quote; sign the chosen accepts entry (EIP-3009) and retry with X-PAYMENT.","parameters":[{"$ref":"#/components/parameters/XPayment"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["plan","hours"],"properties":{"plan":{"type":"string","description":"A plan id from /api/compute/catalog"},"hours":{"type":"integer","minimum":1},"compose":{"type":"string","description":"docker-compose.yml as a string (or use image)"},"image":{"type":"string"},"port":{"type":"integer"},"env":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"aliasTarget":{"type":"string"}}}}}},"responses":{"202":{"description":"Paid — machine provisioning. Poll GET /api/compute/deployments/{id} until status is running."},"402":{"description":"x402 payment required — the quote. `accepts` carries one entry per network, each with its own exact price. Quoting is free and repeatable; nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402Quote"}}}}}}},"/api/compute/deployments/{id}":{"get":{"summary":"Read a deployment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deployment state; endpoint + attestation when running"}}}},"/api/inference/docs":{"get":{"summary":"Inference agent docs — contract + live prices (markdown)","responses":{"200":{"description":"Markdown for agents"}}}},"/api/inference/catalog":{"get":{"summary":"Inference models and live prices (JSON)","responses":{"200":{"description":"Catalog"}}}},"/api/inference/chat":{"post":{"summary":"Ask a model (x402 or prepaid balance)","description":"POST without X-PAYMENT for a free 402 quote priced for your exact body; pay per request, or draw from a prepaid balance with X-Wallet-Auth.","parameters":[{"$ref":"#/components/parameters/XPayment"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["model","messages"],"properties":{"model":{"type":"string","description":"A model id from /api/inference/catalog"},"messages":{"type":"array","items":{"type":"object"}},"max_tokens":{"type":"integer","description":"Output ceiling — charged whether used or not"}}}}}},"responses":{"200":{"description":"Completion + settlement"},"402":{"description":"x402 payment required — the quote. `accepts` carries one entry per network, each with its own exact price. Quoting is free and repeatable; nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402Quote"}}}}}}},"/api/inference/credits":{"post":{"summary":"Prepay an inference balance (x402)","parameters":[{"$ref":"#/components/parameters/XPayment"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amountUsd"],"properties":{"amountUsd":{"type":"number"}}}}}},"responses":{"200":{"description":"Balance after the top-up"},"402":{"description":"x402 payment required — the quote. `accepts` carries one entry per network, each with its own exact price. Quoting is free and repeatable; nothing was charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/X402Quote"}}}}}}},"/llms.txt":{"get":{"summary":"Machine index","responses":{"200":{"description":"Markdown for agents"}}}}},"components":{"parameters":{"XPayment":{"name":"X-PAYMENT","in":"header","required":false,"schema":{"type":"string"},"description":"base64 x402 payload: {\"x402Version\":1,\"scheme\":\"exact\",\"network\",\"payload\":{\"signature\",\"authorization\"}}. Omit to receive a free 402 quote."}},"schemas":{"X402Quote":{"type":"object","properties":{"x402Version":{"type":"integer"},"accepts":{"type":"array","description":"One entry per network — read the entry you intend to pay; another chain's price never applies to yours.","items":{"type":"object","properties":{"scheme":{"type":"string"},"network":{"type":"string"},"maxAmountRequired":{"type":"string","description":"USDC atomic units"},"asset":{"type":"string"},"payTo":{"type":"string"},"extra":{"type":"object"}}}}}}}}}