What it is
A machine-payable API is an HTTP service that responds to a request for a paid resource with a 402 ("Payment Required") status, includes a structured invoice in the response (Lightning invoice for L402, on-chain payment instruction for x402, or similar), and serves the resource once the calling client pays the invoice and retries with a valid token. The defining characteristic is that the entire payment loop happens at machine speed, programmatically, without a human clicking "approve" — and without any pre-existing account, API key registration, or billing relationship between the API and the caller. Pricing can be per-call, per-token, per-data-volume, or any other granularity the API publisher chooses to expose. The pattern flips the default API economic model: instead of "register, get a key, pay a monthly invoice," it's "pay per use, no relationship required."
Why it matters
Most of the world's valuable APIs are gated by registration walls precisely because credit-card billing only works above a minimum monthly commitment. That economic floor excludes the long tail of usage where a caller wants $0.0003 worth of one specific lookup. Machine-payable APIs collapse that floor to zero: a publisher can offer something at a fraction of a cent per call, and an autonomous agent can decide in milliseconds whether that's worth it. The substrate this unlocks — agents that pay only for what they use, publishers monetizing usage that was previously uneconomical to serve — is widely expected to grow substantially through 2027 and beyond as the protocols (L402, x402, successors) standardize and tooling matures.
Key components
- HTTP 402 — the status code that signals "payment required" with a structured invoice
- Payment protocols — L402, x402, and successors that handle settlement at machine speed
- Token issuance — short-lived credentials that grant access once the invoice is paid
- Pricing metadata — machine-readable cost-per-call exposed alongside the resource
- No-account-required commerce — the publisher and caller do not need a pre-existing relationship
Related terms
Agent Commerce
The emerging market category where AI agents transact directly — paying for APIs, buying premium content, hiring other agents, and settling between machines without human approval per transaction. The economic activity layer above the agent stack.
Agent Operations
The discipline of running AI agents in production — capturing what they do, attributing what it costs, evaluating what they produce, and intervening when something goes wrong. The operational layer above agent observability and orchestration.
Agent Infrastructure
The runtime, network, and tooling substrate that AI agents need to execute reliably — sandboxed compute, tool access, memory, gateways to LLM providers, and the orchestration plumbing that connects them. Closer to the metal than agent operations.
LLM Gateway
A unified proxy in front of multiple LLM providers that captures every call, enforces policy, and lets a single application talk to Anthropic, OpenAI, xAI, Gemini, and local models through one interface.
L402 Protocol
A machine-to-machine payment protocol that combines HTTP status code 402 ("Payment Required") with the Bitcoin Lightning Network, designed for AI agents and APIs to transact in fractions-of-a-cent without involving credit cards or human approval. Originally called LSAT by Lightning Labs.