Developers & agents
Connect to
Loop Gateway.
Public integration contract. Live paid use is still being tested.
Quickstart
Top up. Pay. Check. Chat.
Humans: open the purchase page, choose an amount (minimum 5000 sats), pay the invoice from your own Lightning wallet, and copy your key. No account needed.
Agents: follow the four calls. Check live rails first at agent-payments.json. Contract: OpenAPI 3.1. Per-call L402 is advertised, but paying it with stock clients is not yet tested; use prepaid.
- Top up.
POST https://api.loopxxi.com/v1/topupwith{"amount_sats":5000}. The response holds aloop_token and a BOLT11 invoice. - Pay. Pay that invoice from a Bitcoin Lightning wallet you control, after checking it against your budget.
- Check balance.
GET https://api.loopxxi.com/v1/balancewithAuthorization: Bearer <token>. It returns HTTP 401unknown_prepaid_tokenuntil the invoice settles. - Chat.
POST https://api.loopxxi.com/v1/chat/completionswith the same header and OpenAI-compatible JSON, e.g.{"model":"openai/gpt-4o-mini","messages":[{"role":"user","content":"ping"}],"max_tokens":16}. Copy a current model id from /v1/models.
Check before paying.
Use available models, current usage prices and payment discovery. A healthy endpoint is not proof that an independent paid request will succeed.
Prepaid credit is usage credit, not custody of a customer wallet. Tokens are bearer credentials; keep them private and verify settlement before chat.
Machine documentation.
- Gateway integration guide
- OpenAPI contract
- Product catalog
- Site guide for agents
- Check models and prices
Per-call L402 is advertised, but paying the challenge with independent stock clients is not yet tested. Prepaid remains the preferred first purchase.