llms.txt Content
# 2s
> The (most) everything API for AI agents: 575+ pay-per-call endpoints on one origin. More live, ground-truth data than any other x402 service — public records, finance, crypto & web3, security & CVEs, legal, medical, weather, geo, B2B/EDI. A full AI gateway (chat, image, multi-model consensus across every major model). And agent infrastructure with no account: wallet-scoped storage, locks, queues, scheduled callbacks, pub/sub, and watchers. Pay per call in USDC on Base or Solana via x402 — no API keys, no signup. The first x402 API with upto billing: authorize the quoted max on AI endpoints, settle only actual usage. New endpoints land constantly.
## How it works
1. Call any endpoint with no auth → receive `402 Payment Required` with the x402 PaymentRequirements envelope. The `accepts` array lists every supported settlement rail.
2. Sign for the chain you hold USDC on:
- **Base**: sign an `EIP-3009 transferWithAuthorization` from your EVM wallet.
- **Solana**: sign a partial SPL token transfer transaction from your Solana wallet.
3. Retry the call with the base64-encoded payload in the `PAYMENT-SIGNATURE` header (or `X-PAYMENT` for v1 clients) → receive `200 OK` plus an `X-PAYMENT-TX` header pointing at the on-chain settlement.
Gas / transaction fees are paid by the facilitator. The caller only needs USDC.
## Try before you buy (free)
Verify any endpoint works before funding a wallet: add `?trial=1` to the URL (or send header `X-2s-Trial: 1`) with NO payment. You get one free real call per endpoint per hour (the actual handler runs and returns real data, marked `meta.trial`). Once used, the endpoint returns the normal `402` until the hour resets — pay per call via x402 for unlimited access.
- cURL: `curl "https://2s.io/api/validate/iban?iban=GB82WEST12345698765432&trial=1"`
- TypeScript: `new TwoS({ trial: true }).validate.iban({ iban: "GB82WEST12345698765432" })` — no key needed
- Python: `TwoS(trial=True).validate.iban(iban="GB82WEST