opencheap.si
鸣谢

Pay for LLM API calls with USDC, without an account or an API key

Updated November 14, 2026

With OpenCheap, an AI agent pays for one LLM call in USDC on Base, with no account and no API key. It sends the request with no key, the API answers 402 需付款 with the price of that completion, the agent signs the payment from its wallet and repeats the request, and the answer comes back in the same response. This is the open x402 protocol, so any x402 client works, and every chat model in the catalog can be paid this way.

0
accounts or API keys needed
$0.001
smallest payment for one call
Base
network, USDC, x402 v2

How one call is paid

Three steps, in one request and its retry.

  1. Call with no key
    Send the chat completion with no Authorization header. Every chat model works.
  2. Read the 402
    The answer is 402 with a PAYMENT-REQUIRED header: scheme exact, network eip155:8453 (Base), the USDC asset, the payee and the amount in 6-decimal units. x-quote-model and x-quote-max-tokens say what the amount covers.
  3. Sign and repeat
    The agent signs an EIP-3009 authorization for that amount and repeats the request with PAYMENT-SIGNATURE (the older X-PAYMENT works too). The completion is in that response; the transfer settles in the background.

An agent on Base, in TypeScript

@x402/fetch reads the 402, signs with the wallet you give it, and retries.

import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

const wallet = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY);
const pay = wrapFetchWithPaymentFromConfig(fetch, { schemes: [{ network: "eip155:*", client: new ExactEvmScheme(wallet) }] });

// No Authorization header: the API answers 402 with the price, pay() signs and retries.
const res = await pay("https://api.opencheap.si/v1/chat/completions", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ model: "claude-sonnet-5", max_tokens: 400, messages: [{ role: "user", content: "Summarise this page" }] }),
});
console.log((await res.json()).choices[0].message.content);
# 1. Ask with no key
curl -i https://api.opencheap.si/v1/chat/completions -H "Content-Type: application/json" \
  -d '{ "model": "kimi-k3", "max_tokens": 256, "messages": [{ "role": "user", "content": "Hello" }] }'

# HTTP/2 402
# payment-required: <base64 x402 v2 challenge: scheme exact, network eip155:8453,
#                    asset USDC, payTo, amount in 6-decimal units>
# x-quote-model: kimi-k3
# x-quote-max-tokens: 256

# 2. Sign an EIP-3009 USDC authorization for that amount, then repeat the same request
#    with the header PAYMENT-SIGNATURE: <signed payload>. The completion is in that response.

The catalog with every model's rate needs no key either: GET https://app.opencheap.si/api/v1/models. The full protocol, the quote rules and streaming are in the x402 docs.

Three ways an agent can pay

NeedsBest for
Per call with x402A Base wallet with USDC. No account, no key.An agent that calls now and then, or that should never hold credentials.
A balance it tops up itselfAn API key, and USDC on Base for the top-up.Many calls: one balance, usage history, and a spend limit on the key.
Signed in with its walletA wallet that signs a Sign-In with Ethereum message. No email, no password.An agent that runs its own account, keys and budgets from code or MCP.

问题与解答

Can an AI agent pay for LLM tokens without an account or an API key?

Yes. On OpenCheap an agent calls https://api.opencheap.si/v1/chat/completions with no key, gets a 402 Payment Required with the USDC price of that one completion, signs the payment from its own wallet and repeats the request. The answer comes back in that response. This is the open x402 protocol, on Base.

What does the agent need?

A wallet that can sign an EIP-3009 USDC authorization on Base (eip155:8453), such as a viem account, and an x402 client, such as @x402/fetch with ExactEvmScheme. The private key stays with the agent.

How is the price of one call set?

Before the first byte, from the model's catalog rates, the prompt (about four characters per token) and the output cap: max_tokens, 512 when you set none and 4,096 at most. The quote is at least $0.001. The agent pays the quote, and the provider is held to that cap.

Which models can it pay for?

Every chat model in the catalog, ranked the same way as a call with a key: the cheapest healthy provider for that prompt, then the next one if it fails before the first byte. Decision models need a key.

Is the agent charged if the call fails?

A 404, or a 503 before any provider accepts the request, is not settled. The USDC transfer is submitted once a provider accepts, through the Coinbase facilitator.

Does it stream?

Yes. "stream": true returns server-sent events, the same chunks as a call with a key. The amount is still fixed up front from the output cap.

What if the agent makes many calls?

It can hold a balance instead: an agent with a key adds USDC on Base from its own wallet (a 5.5 % fee), then every call draws from that balance and can carry a spend limit. It can also sign in with its wallet to hold an account of its own.

More guides

最便宜的LLM API
最便宜的 LLM API(实时价格,每日更新)

热门模型的实时报价(按100万代币计价),由系统自动路由至最便宜且运行正常的提供商。一个兼容OpenAI的密钥。按需付费,无月费。

最便宜的 DeepSeek API
更实惠的 DeepSeek API,附官方价格对比表

Official DeepSeek API prices next to live OpenCheap rates for V4.1 Flash, V4 Pro and other DeepSeek models. One OpenAI-compatible key. Prices move; the tables are dated.

Cheapest-provider routing
An LLM router that sends each request to the cheapest provider

OpenCheap routes each request to the cheapest healthy provider of your model, fails over before the first byte, and bills that provider's price.

One API key for all AI models
One API key for all AI models

One OpenCheap key calls Anthropic, Google, OpenAI, DeepSeek, Moonshot, Qwen and more through the OpenAI SDK: change the base URL and the key.

Spend limits per key
Set a daily spend limit on each API key your agents use

Give each OpenCheap key a daily, weekly, monthly or lifetime spend limit, so an agent left running overnight can't spend more than you allow.

Cursor, LiteLLM, OpenAI SDK
Connect Cursor, LiteLLM or the OpenAI SDK with the base URL

Connect Cursor, LiteLLM and the OpenAI SDK to OpenCheap with a base URL, a key and a model id. Steps, env variables, code and common errors.

OpenCheap vs OpenRouter
OpenCheap vs OpenRouter for cheapest pricing and failover

OpenCheap routes to the cheapest provider by default; OpenRouter balances price, speed and uptime. Compare live prices, failover and fees.

Cheapest Claude API
一款价格低廉的Claude API,附官方价格对比

Anthropic's list prices next to live OpenCheap rates for Claude. One OpenAI-compatible key. Prices move; both tables are dated.

最便宜的GPT API
GPT API 的定价,以及调用它的最便宜方式

GPT API pricing per 1M tokens: OpenAI's list rates for GPT-6, GPT-5 and GPT-4 models next to live OpenCheap prices, on one OpenAI-compatible key.

Cheapest Gemini API
The cheapest way to use Gemini through an API

Gemini chat models on OpenCheap, with today's price per million input and output tokens from the same book as the pricing page.

最便宜的 Qwen API
最便宜的 Qwen API,附官方价格对比

Qwen API pricing per 1M tokens: Alibaba Cloud's list rates next to live OpenCheap prices for Qwen4 Max, Qwen3 Coder and more. One OpenAI-compatible key.

最便宜的 Llama API
最便宜的 Llama API,实时报价

Llama 4 Maverick、Scout、3.3 70B 和 3.1 8B 的 Llama API 定价(按 100 万个令牌计),来自最便宜且服务稳定的提供商。包含一个与 OpenAI 兼容的密钥。

最便宜的Kimi API
The cheapest Kimi API, with official prices side by side

Kimi API pricing per 1M tokens: Moonshot's list rates next to live OpenCheap prices for Kimi K3.1 Pro, K3 and K2.6. One OpenAI-compatible key.

Claude Code for less
Run Claude Code for less

Point Claude Code at OpenCheap and pick a model per task: Claude at the provider's price, or open models for a fraction, on one key with a spend limit.

每款主要车型,仅需一把钥匙。