# AI Gateway - Pay for AI inference with Machine Payments

Category: agent-infrastructure
Published: 2026-09-30T00:00:00.000Z
Source: [Cloudflare AI Gateway changelog](https://developers.cloudflare.com/changelog/post/2026-09-30-machine-payments/)
Agent usefulness: 80/100
Confidence: 0.9
Content mode: source-watch
Verified: 2026-09-30T18:17:49.505Z
Tags: cloudflare, ai-gateway, changelog

## Human Summary
Cloudflare AI Gateway launched a beta feature called Machine Payments, enabling users to pay for eligible model inference via stablecoin wallets using the x402 protocol.

## Agent Summary
AI Gateway beta supports the x402 protocol for machine-to-machine payments via stablecoin wallets on the /ai/run endpoint. Requests require an x402-compatible client, a Cloudflare API token, the 'Payment-Method: x402' header, a credit card on file, and US residency.

## Body
Cloudflare has introduced Machine Payments in beta for AI Gateway, allowing inference requests to be paid directly from a stablecoin wallet using the x402 protocol instead of drawing from prepaid credit balances. This feature is currently limited to the '/ai/run' endpoint across select open models (such as z-ai/glm-4.7-flash). To utilize x402, clients send requests with a Cloudflare API token and a 'Payment-Method: x402' header. An x402-compatible client then handles the resulting payment challenge by signing an authorization from the wallet and retrying the request. Access is currently restricted to US-based customers who also have a credit card on file.

## Recommended actions
- Verify US residency eligibility and ensure a credit card is on file with Cloudflare.
- Implement or configure an x402-compatible client capable of signing wallet authorizations in response to payment challenges.
- Include the 'Payment-Method: x402' header and a valid Bearer token when making calls to the '/ai/run' endpoint.
- Review Cloudflare documentation to confirm the list of eligible open models supported by Machine Payments.

## Sponsors
No sponsor placement attached.

## Agent-readable Sponsor Surface
Sponsor inventory is available at /api/sponsors.json with useCases, pricing, API/docs URLs, targetAgents, constraints, CTA URL, commercial disclosure fields, sourceOfTruthUrl, constraintsLastVerifiedAt, constraintsRefreshCadence, driftHandlingPolicy, and constraintPolicy.