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 key | x402 wallet | |
|---|---|---|
| Setup | Account, card, create key | Wallet with USDC on Base, x402 client |
| If it leaks | Spending up to your account limits | Spending up to the wallet balance |
| Billing | Monthly invoice or prepaid credit | Paid per call, on the spot |
| Good for | Steady, high-volume apps | Scripts, prototypes, AI agents |
What you need
- A wallet on the Base network, for example one created through Coinbase AgentKit or another x402-capable wallet.
- Some USDC on Base in it. $1 covers 100 answers.
- An x402 v2 client, or Coinbase AgentKit with the iamai-agentkit npm plugin, or our MCP server for AI agents.
Honest limits
- The chat API isn't sold on RapidAPI, so there is no card-paid version of it.
- It runs one model, gpt-oss-120b. It is not GPT-4o or any other hosted OpenAI model.
- The request format isn't OpenAI-compatible, and there is no streaming or tool calling.
- Up to 12,000 characters in and 2,000 tokens out per answer.
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
