# Authenticating to The Lobby API

## With an account

1. Sign in or create an account at https://thelobbynews.com/account/api and choose a plan.
2. Create a key there. It is shown once; we keep only its hash.
3. Send it on every request:

```
curl -H "Authorization: Bearer lobby_live_..." https://api.thelobbynews.com/v1/bills?limit=5
```

Every plan includes the raw data. Summaries, facts and topic scores are on the higher plan. Requests past the monthly allowance are paid from a prepaid credit balance, which can reload itself.

Every response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`. A 429 carries `Retry-After`.

## As an agent with no account

A request with no key gets `402 Payment Required` describing how to pay for it: per request by stablecoin (MPP on Tempo or Solana, or x402 with USDC on Base), or a prepaid pack by card through MPP (`POST https://api.thelobbynews.com/v1/credits/packs`), which returns a key.

## Errors

Every error is JSON: `{ "error": "code", "message": "what to do" }`. Nothing is charged for an error, a 404 or a 429.
