Skip to main content
Codex supports pay-per-request access using MPP (Machine Payments Protocol), an open, payment-method agnostic protocol built on HTTP 402. AI agents and scripts can query the Codex API without an API key by paying $0.001 per request. MPP is co-authored by Tempo and Stripe, and the core Payment HTTP Authentication Scheme is on the IETF standards track.

How it works

Traditional API access requires account creation, API keys, and prepaid credits. With MPP, the flow is:
  1. Send a request to the Codex API
  2. The server responds with HTTP 402 Payment Required and a payment challenge
  3. The client pays $0.001 via USDC on Tempo
  4. The server validates the payment and returns the data
No Codex account signup, no API key, no billing dashboard. Just pay and query.
MPP access is ideal for autonomous agents, bots, and scripts that need programmatic access without manual account setup. For human developers building apps, we still recommend getting an API key for the best experience.

Pricing

Additional payment networks and Stripe payment methods (cards, wallets) are coming soon.

Quick start

The fastest way is to install the Codex skill:
Then follow these steps to get started:
  1. Ask the agent to use Codex to get the top 25 trending tokens (or whatever your query is)
  2. It will then try to execute the query using the API key. If it fails, it will fallback to MPP.
    • Or you can just ask it to use MPP directly
  3. It will then install Tempo’s tempo CLI to manage your Tempo wallet
  4. It will then redirect you to the Tempo website to authorize access
  5. There, you can either fund your new wallet (from Base, Solana, Ethereum, etc), or use an existing one. Your new wallet must have at least 1 USDC on Tempo to continue.
  6. Once funded, you press Continue and you will be prompted to authorize Tempo to access your wallet
  7. Once authorized, your agent will attempt to run the query using MPP
Tempo wallet authorization

Example usage

Ask your agent:
“Get me a list of 20 dog tokens.”
It will then check to see if you have provided an API key. Assuming you have enabled MPP, the skill will guide the agent to run it to generate:
And it will return a response like this:
And then it will likely summarize the results for you, like this: Codex Skills Summary
This is not an endorsement of any of these tokens, and they may be scams or rugs. Please do your own research before investing. You can also ask your agent to filter out scams.

Supported endpoints

MPP is available for all Codex query endpoints. Here are some of the most popular ones: See the full GraphQL Reference for all available endpoints. The beauty with the Codex Skills, however, is you don’t have to worry about any of this. Just ask your agent to use MPP and it will handle everything for you.
WebSocket subscriptions and webhooks are not available via MPP at this time.
At the moment, Codex only supports payments via MPP on the Tempo network. We will add support for other networks and payment methods in the future.

Learn more

  • MPP Documentation: Full protocol docs, SDKs, and guides
  • tempo CLI: Command-line client for making paid requests
  • Tempo: The network powering MPP stablecoin payments