{"openapi":"3.1.0","info":{"title":"Aethergent","version":"1.0.0","description":"Ethereum wallet generation API for AI agents. One HTTP call, zero auth, zero downloads.","contact":{"url":"https://aethergent.com"}},"servers":[{"url":"https://aethergent.com"}],"paths":{"/":{"post":{"operationId":"generateWallet","summary":"Generate an Ethereum-compatible wallet","description":"Returns a new wallet with address and private key. No authentication required.","responses":{"200":{"description":"A new Ethereum wallet","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Ethereum address (0x + 40 hex chars)","example":"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18"},"private_key":{"type":"string","description":"Private key (0x + 64 hex chars)"},"created_at":{"type":"string","format":"date-time"},"_warning":{"type":"string"},"_storage":{"type":"object"},"_next":{"type":"object"}},"required":["address","private_key","created_at"]}}}},"429":{"description":"Rate limit exceeded"}}}},"/mcp":{"post":{"operationId":"mcpJsonRpc","summary":"MCP JSON-RPC 2.0 endpoint","description":"Model Context Protocol endpoint for tool discovery and invocation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"method":{"type":"string","enum":["initialize","tools/list","tools/call"]},"params":{"type":"object"},"id":{"type":["string","integer"]}},"required":["jsonrpc","method","id"]}}}},"responses":{"200":{"description":"JSON-RPC 2.0 response"}}},"get":{"operationId":"mcpManifest","summary":"MCP tool manifest","description":"Returns the list of available MCP tools.","responses":{"200":{"description":"Tool manifest"}}}},"/redeem":{"post":{"operationId":"redeemCode","summary":"Redeem a code for a funded wallet","description":"Exchange a redemption code (obtained via RightEmail) for a new wallet with $10.00 in ecosystem credits.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Redemption code from RightEmail"}},"required":["code"]}}}},"responses":{"201":{"description":"Wallet created with credits"},"400":{"description":"Invalid code"},"409":{"description":"Already redeemed"},"429":{"description":"Rate limit exceeded"}}}},"/credits/{address}":{"get":{"operationId":"getCredits","summary":"Check credit balance","description":"Returns the credit balance for a redeemed wallet. Requires wallet signature auth or internal key.","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Credit balance"},"401":{"description":"Auth required"},"404":{"description":"Wallet not found"}}}},"/credits/debit":{"post":{"operationId":"debitCredits","summary":"Debit credits from a wallet","description":"Internal endpoint for ecosystem services to spend credits. Requires X-Internal-Key header.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"amount":{"type":"integer","description":"Amount in cents"},"service":{"type":"string"},"description":{"type":"string"}},"required":["address","amount","service"]}}}},"responses":{"200":{"description":"Debit result"},"403":{"description":"Invalid internal key"}}}},"/credits/reserve":{"post":{"operationId":"reserveCredits","summary":"Reserve a credit block","description":"Pre-authorize a credit block for batch operations. Internal key required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"amount":{"type":"integer"},"service":{"type":"string"},"ttl_seconds":{"type":"integer","description":"Reservation TTL (default 60, max 300)"}},"required":["address","amount","service"]}}}},"responses":{"201":{"description":"Reservation created"},"403":{"description":"Invalid internal key"}}}},"/credits/settle":{"post":{"operationId":"settleReservation","summary":"Settle a credit reservation","description":"Report actual spend against a reservation. Unused credits are refunded. Internal key required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reservation_id":{"type":"string"},"spent":{"type":"integer","description":"Actual amount spent in cents"}},"required":["reservation_id","spent"]}}}},"responses":{"200":{"description":"Settlement result"},"403":{"description":"Invalid internal key"},"404":{"description":"Reservation not found"}}}},"/health":{"get":{"operationId":"healthCheck","summary":"Health check","responses":{"200":{"description":"Service health status"}}}}}}