An alternative to an OpenAI API key

If you want to call an LLM without creating an account and API key, use an API paid per call with x402: your wallet signs a small USDC payment with each request instead of sending a key. Our AI Chat Answer API works this way and charges $0.01 per answer with gpt-oss-120b. The catch is that you need a crypto wallet holding USDC on the Base network.

Try it free AI Chat Answer API — one answer from a large open model · $0.01 / call

What replaces the key

A normal API key is a password tied to your account and card. Anyone who holds it can spend from your account until you revoke it.

With x402, the first request gets a 402 answer with the price. Your client signs a payment for exactly that amount from your wallet and sends the request again with a PAYMENT-SIGNATURE header. The server checks the payment and answers. Nothing reusable is stored on either side.

POST /api/x402/services/3zGQQ2mdFxk1   {"prompt": "..."}
-> 402  price: $0.01 in USDC on Base

POST /api/x402/services/3zGQQ2mdFxk1   PAYMENT-SIGNATURE: <signed payment>
-> 200  {"result": {"answer": "...", "model": "gpt-oss-120b", "finish_reason": "..."}}

Key or wallet: the trade-offs

A practical safety habit: give an agent its own wallet with only a few dollars of USDC, and top it up when needed.

API keyx402 wallet
SetupAccount, card, create keyWallet with USDC on Base, x402 client
If it leaksSpending up to your account limitsSpending up to the wallet balance
BillingMonthly invoice or prepaid creditPaid per call, on the spot
Good forSteady, high-volume appsScripts, prototypes, AI agents

What you need

  1. A wallet on the Base network, for example one created through Coinbase AgentKit or another x402-capable wallet.
  2. Some USDC on Base in it. $1 covers 100 answers.
  3. An x402 v2 client, or Coinbase AgentKit with the iamai-agentkit npm plugin, or our MCP server for AI agents.

Honest limits

Other ways to avoid a key

Running an open model locally with Ollama needs no key and no payment per call, only a capable computer. Free tiers from cloud providers still need an account and a key. For trying our API by hand, the listing page gives 5 free answers a day with no wallet.

The product

Questions

Is it legal to use an API without a key?

Yes. A key is one way to identify who pays; x402 is another, where the payment itself is the proof.

Can someone steal my wallet like a key?

If someone gets the private key of the wallet, they can spend its balance. Keep only small amounts in a wallet used by scripts or agents.

Are failed calls charged?

No. You're charged only when the call works.

Related

Updated 2026-12-01