{"service":"cash2chat","version":"0.1.0","description":"Pay-per-call LLM API. Attach a Cashu ecash token to any request — no accounts, no KYC.","protocol":{"method":"POST","endpoint":"/v1/chat/completions","auth":"X-Cashu header with a valid Cashu token (cashuA... or cashuB...)","body":"OpenAI-compatible chat completions format","streaming":true},"endpoints":{"GET /":"You are here","GET /health":"Service health + upstream status","GET /stats":"Request statistics (admin, today + 7d summary)","GET /v1/info":"Version information","GET /v1/pricing":"Per-model pricing in units","POST /v1/chat/completions":"Send a stamped chat request","GET /v1/gate/balance":"Gate wallet ecash balance","POST /v1/gate/melt":"Melt ecash → USDC via mint (on-chain)","POST /homo/melt":"Melt ecash → Lightning invoice","GET /homo/balance":"Gate ecash balance (for Lightning melt)","POST /homo/withdraw":"Withdraw ecash from Gate (specify amount)","GET /homo/ui":"Admin dashboard (metrics, melt, errors — supports ?token= auth)"},"quick_start":["1. Get Cashu tokens from a supported mint","2. POST /v1/chat/completions with X-Cashu header + OpenAI-format body","3. Receive chat completion + X-Cashu-Receipt header"],"example":{"request":{"method":"POST","url":"/v1/chat/completions","headers":{"Content-Type":"application/json","X-Cashu":"cashuB...<your_token>"},"body":{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}},"cost":"200 sat (gpt-4o-mini per request)"},"mints":["https://mint.token2chat.com"],"pricing_url":"/v1/pricing","source":"https://github.com/TokenisAllAgentNeed/token2chat"}