# AI Gateway - Pay for AI inference with Machine Payments

Publisher-attributed story with a reviewed brief or permitted publisher paragraph. The original publisher is responsible for the linked reporting.

- Publisher: Cloudflare Developers
- Category: AI
- Original publication time: 2026-09-30T00:00:00Z
- First observed by NexusTechWire: 2026-10-01T15:54:34Z
- Original source: https://developers.cloudflare.com/changelog/post/2026-09-30-machine-payments/
- NexusTechWire record: https://nexustechwire.com/news/news-fb758f750a9a1ec8a258

## From the publisher

AI Gateway now supports Machine Payments in beta. With Machine Payments, clients can use the x402 protocol to pay for eligible inference requests directly from a stablecoin wallet instead of maintaining a prepaid credit balance. Machine Payments is available for the /ai/run endpoint with select open models. To request x402 payment, authenticate with a Cloudflare API token and include the Cloudflare-specific Payment-Method: x402 header: curl -iX POST "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE\_ACCOUNT\_ID/ai/run" \\ --header "Authorization: Bearer $CLOUDFLARE\_API\_TOKEN" \\ --header "Payment-Method: x402" \\ --header "Content-Type: application/json" \\ --data '\{ "model": "z-ai/glm-4.7-flash", "input": \{ "messages": \[ \{ "role": "user", "content": "What is Cloudflare?"

Source license: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). Publisher excerpt shortened and converted to plain text. Original source license applies.

Read the full original: [Cloudflare Developers](https://developers.cloudflare.com/changelog/post/2026-09-30-machine-payments/)

This record does not reproduce the complete article or represent independent confirmation of every source claim.
