> ## Documentation Index
> Fetch the complete documentation index at: https://selat.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API keys vs pay-per-call

> Two ways an agent can access a paid API — provision a key up front, or pay per call on an HTTP 402 challenge. When each makes sense, and why agents increasingly need the second.

There are two ways an agent gets to use a paid API: **provision an API key ahead of time**, or **pay per call at the moment of use** on an `HTTP 402` challenge. The first is how nearly every API works today; the second is what lets an agent use a service it discovered mid-task, with no prior relationship. This page compares them.

## The API-key model

You sign up, get a key, store it, and attach it to every request. Billing is a subscription or a metered invoice settled later. It works well when you know in advance which services you will use and you can manage their credentials.

For an autonomous agent, that model strains:

* **Provisioning is human and up front.** Someone must create an account and a key for every service before the agent can touch it — so the agent can only use services chosen ahead of time.
* **Keys are long-lived secrets.** They sit in the agent's environment, can leak, and must be rotated and scoped.
* **Discovery and use are decoupled.** An agent that finds a useful API mid-task can't use it until a human sets up billing.

## The pay-per-call model

The server answers a request it can't fulfill for free with `402 Payment Required` and a payment instruction; the client pays and retries with proof. No account, no key, no prior relationship — the payment *is* the authorization. Both [x402](/docs/primers/x402) and [MPP](/docs/primers/mpp-tempo) implement this on [HTTP 402](/docs/primers/http-402).

* **No provisioning.** An agent can pay a service the instant it discovers it.
* **No stored secret.** A payment is made at the moment of need, not a credential kept around to leak.
* **Discovery and use collapse into one step.** Find it, price it, pay it, use it — in the same run.

## At a glance

|                   | API key                             | Pay-per-call (x402 / MPP)      |
| ----------------- | ----------------------------------- | ------------------------------ |
| Setup             | Account + key per service, up front | None — pay on the `402`        |
| Who provisions    | A human, ahead of time              | The agent, at call time        |
| Secret to manage  | Long-lived key                      | None                           |
| Discover-then-use | Blocked on setup                    | Same step                      |
| Billing           | Subscription / metered invoice      | Per call, at time of use       |
| Best when         | Known, fixed set of services        | Services discovered at runtime |

## When each makes sense

**Keep API keys** for the handful of core services your agent always uses, where a stored credential is acceptable and the provider only offers keyed access.

**Reach for pay-per-call** the moment your agent needs to use services it discovers at runtime, wants to avoid holding secrets, or needs to pay across many providers without an account at each. That is the case agentic workloads keep hitting — see [Agentic payments](/docs/primers/agentic-payments).

## Where SELAT fits

Pay-per-call removes the API key but adds its own work: the merchant picks the rail, so an agent may face an x402 challenge from one service and MPP from the next, each with its own settlement shape. SELAT puts a rail-neutral path in front of that — discover a capability, then pay it per call from your own [Circle Agent Wallet](/docs/glossary#circle-agent-wallet), **no API key and no signup**, with SELAT translating your one signed shape into whatever the upstream speaks. See [x402 vs MPP](/docs/primers/x402-vs-mpp) for the rail side, and the [Catalog MCP](/docs/selat-mcp) or [SELAT CLI](/docs/selat-cli) to try it.

## FAQ

### Do I need an API key to use SELAT?

No. SELAT pays per call on the `402` challenge from your own Circle Agent Wallet. There is no per-service signup or stored key.

### Is pay-per-call more expensive than a subscription?

It depends on volume. Pay-per-call charges only for what you use, which suits spiky, discover-at-runtime agent workloads; a subscription can be cheaper for steady, high-volume use of one known service.

### Can I mix both?

Yes. Keep keys for your fixed core services and use pay-per-call for everything an agent discovers at runtime.
