Call APEX from the client you already run
This page is for an agent or a program. If you want free tokens, use the faucet. You paste an address. There is no account.
Every paid tool lives at https://apexfaucet.xyz/api/x402/<name>. An unpaid call returns HTTP 402 with the price, the networks, and a worked example. The catalogue is /.well-known/x402.
On the routes agents already call (token info, NFT info, exit checks, page markdown, chat, and the others named in the 402), one address gets one real response per day with no payment header at the free route /api/free/<route> (same inputs; chat is a POST). The paid /api/x402/<route> is always the 402. Send a normal user agent, not a catalogue probe. A refused input does not use the day. The next call the same day answers 429. The response carries X-Apex-Free-Sample: 1.
Try one call before you pay
curl -A 'my-agent/1.0' \ 'https://apexfaucet.xyz/api/free/evm-token-info?token=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base'
A placeholder such as token=test is a 400 and does not use the free call. Use the example in the 400 body.
Coinbase x402 SDK (Node)
Packages checked on npm on 4 Nov 2026: @x402/fetch and @x402/evm. The register call is the one in the x402 Foundation fetch example. The key stays in your process. This page never asks for it.
npm install @x402/fetch @x402/evm viem
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client().register("eip155:*", new ExactEvmScheme(signer));
const payFetch = wrapFetchWithPayment(fetch, client);
const url = "https://apexfaucet.xyz/api/x402/evm-token-info?token=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base";
const res = await payFetch(url);
console.log(res.status, res.headers.get("PAYMENT-RESPONSE"));
console.log(await res.json());
Base (eip155:8453) is the first rail in the 402. Arc is eip155:5042. Solana is offered on the routes whose 402 lists it. Put a v2 payment body in PAYMENT-SIGNATURE. A v2 body in X-PAYMENT is accepted too: the body's x402Version is what we settle.
Python
PyPI package x402 2.26.0. Register the EVM exact scheme, then pay the 402. The free call above needs no package.
uv add "x402[httpx,evm]"
import os
from x402 import x402Client
from x402.mechanisms.evm.exact import ExactEvmScheme
client = x402Client()
client.register("eip155:*", ExactEvmScheme(signer=os.environ["EVM_SIGNER"]))
# Read the 402, then:
# payload = await client.create_payment_payload(payment_required)
# Repeat the same URL with header PAYMENT-SIGNATURE set to that payload.
Vercel AI SDK, LangChain, ElizaOS, Virtuals GAME, AgentKit
These frameworks do not need their own APEX package. Give the model one tool whose function is the payFetch above, or the free curl while the agent is still deciding. Coinbase AgentKit can call the same URL from a custom action. The payment is the x402 header, not an API key.
// A tool body any of those frameworks can call.
export async function apexTokenInfo({ token, chain = "base" }) {
const url = `https://apexfaucet.xyz/api/x402/evm-token-info?token=${token}&chain=${chain}`;
const res = await payFetch(url);
if (!res.ok) throw new Error(await res.text());
return res.json();
}
Chat is OpenAI-shaped. Set baseURL to https://apexfaucet.xyz/api/x402/v1 and pay the POST to /chat/completions with the same client. Models: GET /api/x402/v1/models (free). One short completion per address per day is free at POST /api/free/chat-completions; a paid call allows up to 1024 output tokens. Rails for chat are Base, Solana, and XNT on X1. Arc is not offered there because settlement gas would cost more than the price.
MCP
The server is https://apexfaucet.xyz/api/mcp. No API key. A metered tool returns the 402 terms until the arguments include the signed payment.
{
"mcpServers": {
"apex": { "url": "https://apexfaucet.xyz/api/mcp" }
}
}
What a 402 means
acceptsis the price and the address. Pay that, not a guess.freeSamplesays whether this address still has today's free call.clientsis this page.- A 400 means the input cannot be served. Nothing was charged. Fix it and call again.
- A payment that settles and then cannot be served is written down. Quote the transaction at safetynet.
Pay-safe before an Arc payment
These files call pay-safe, then the other team's payment, escrow release, or checkout. They were written from the public docs on 4 Nov 2026. They do not send a message to those teams. A verdict is not a permission to pay. DO_NOT_PAY and COULD_NOT_READ stop the next call. PASS and CAUTION continue. The key stays in the agent process.
The full check is $0.01 at /api/x402/pay-safe. The payee-only check is $0.002 at /api/x402/pay-safe-lite. Lite does not look at a duplicate, our catalog price, or a prior delivery, and it does not return PASS. The $0.01 check still does.
- syncly.mjs — before
GatewayClient.payon a seller, and before a booked InvoiceBook or PayVault payee. Docs: hiresyncly.site. - vestiarion.mjs — before
VestiarionSpendingLimit.pay(to, amount, ref)and beforeVestiarionEscrow.release(id), using the payee stored on the hold. - mercenta.mjs — after
mercenta_quotereturnsCLEARED, check the skill's checkout contract, thenmercenta_checkout. - elpis.mjs — the $0.002 lite check on
address, thenPOST /api/v1/actions. Elpis prices a successful settlement decision at $0.002. This call is separate. - circle-gateway.mjs — read the 402, check
payTo, thenGatewayClient.pay. Syncly's agents pay sellers through Circle Gateway.
Lite is paid on Base, Solana, or Circle Gateway on Arc or Base. A plain Arc transfer is not offered at $0.002. The $0.01 check still takes Arc.
Arc agent builders, including the Tameion teams, have a kit at /arc-builders/. Small x402 payments use the $0.002 lite check. Invoice, contractor, escrow, vault, and checkout payouts use the $0.01 check. 20 full checks a day are free at /pay-safe.