Gas-free payments and pay per request
Switched off unless this deployment turns it on.
GET /v1/billing/methodsanswersmeridian.enabled; when it isfalse, nothing on this page is available and the Billing page does not show the panel.
In plain English
You can pay Sable two new ways, both without paying a network fee yourself:
- Top up by signing. On the Billing page, choose an amount, pick your wallet and sign. You do not send a transaction; you sign a permission slip for that exact amount. A company called Meridian turns it into a real payment and pays the network fee.
- Pay per request, no account. A program can call Sable with no API key. Sable answers "payment required" with the terms, the program signs a payment, sends the request again, and gets its answer.
Three things to know:
- Meridian is a separate company, not Sable. It keeps its own fee, about 1%. If you pay $5.00, about $4.95 reaches Sable.
- Sable adds only what actually arrives. Sable reads the payment on the blockchain itself. If Meridian says a payment went through but Sable cannot see the money arrive, nothing is added and the team is alerted.
- Top-ups are credit, not a deposit you can withdraw. Prepaid credit is non-refundable and non-transferable, the same as a USDT top-up.
The one exception to point 2 is Circle nanopayments, below: those are added on Circle's word and settle later, so they are small and capped.
What you can pay with
| Coin | Network | How it is signed | First time |
|---|---|---|---|
| USDC | NetworkBase | How it is signedEIP-3009 TransferWithAuthorization | First timeNothing extra |
| USDG | NetworkRobinhood Chain | How it is signedPermit2 PermitWitnessTransferFrom | First timeOne approval transaction (a small network fee), then gas-free |
The deployment decides which coins it offers: GET /v1/billing/methods →
meridian.assets is the list. A top-up is between $0.10 and $1,000 by
default (meridian.caps).
Topping up from the Billing page
- Link the wallet you will pay from (Wallets page). A signature from a wallet that is not linked to your account is refused. This is what stops anyone who sees your signed payment from spending it on their own account.
- Open Billing → Pay gas-free, choose the amount and the coin.
- Pick your wallet. It switches network if it needs to, then asks you to sign.
- Sable sends the signed payment through Meridian, reads the transaction on the chain, and adds what arrived. The page shows the amount added, Meridian's fee, and a link to the transaction.
The page sends your signature to one place only: Sable's own gateway. A signed payment is like a signed cheque until it settles, so never paste one into another site.
For developers
Where the money goes
For USDC and USDG, the payment you sign is made out to Meridian's
facilitator contract (0x8E7769D440b3460b92159Dd9C6D17302b036e2d6), not to
Sable. In one transaction the facilitator takes its fee and forwards the rest to
Sable's treasury. Sable credits the amount it reads reaching the treasury, never
the amount you signed and never Meridian's report of it.
The X-PAYMENT payload
Any metered request (chat, embeddings, messages, responses, sandboxes, images)
accepts a standard x402 payment in the X-PAYMENT header: base64 of
{
"x402Version": 1,
"scheme": "exact",
"network": "base",
"payload": {
"signature": "0x…",
"authorization": {
"from": "0xYourWallet",
"to": "0x8E7769D440b3460b92159Dd9C6D17302b036e2d6",
"value": "5000000",
"validAfter": "0",
"validBefore": "1790000000",
"nonce": "0x…32 random bytes…"
}
}
}
The result comes back in X-PAYMENT-RESPONSE (base64 JSON:
success, transaction, network, payer, status, creditedMicroUsd,
kind, note). Where to sign what: a 402's accepts array, or
GET /v1/billing/methods → meridian.
- With an API key, an
exactpayment tops up that key's account. The paying wallet must be linked to the account. - With no API key, the paying wallet is the account: Sable finds the
account that wallet signs in with (or opens one, with no signup grant), credits
it, and serves the request. A settled payment can be reused as the wallet's
identity for ten minutes (
caps.keyless_reuse_secs), never past its own deadline. - From the portal,
POST /v1/billing/meridian/topupwith{"payment": <the X-PAYMENT value or its JSON>}settles a top-up with no request attached, through the same path.
Signing an EIP-3009 payment (TypeScript, no viem)
The SDK signs and retries for you, with @noble only:
import { fetchWithX402, privateKeySigner, decodePaymentResponse } from "@sable-network/sdk";
// An agent's own hot wallet holding a little USDC on Base. Never a treasury key.
const signer = privateKeySigner(process.env.AGENT_WALLET_KEY!);
const res = await fetchWithX402(
signer,
"https://api.buildsable.com/v1/chat/completions",
{
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
model: "sable-llama-3.3-70b",
messages: [{ role: "user", content: "hi" }],
}),
},
{ network: "base", maxAmount: 5_000_000n }, // never sign more than 5 USDC
);
console.log(await res.json());
console.log(decodePaymentResponse(res)); // what was credited, and the transactionThe typed data is the token's own EIP-712 domain (name and version from
extra, the chain id, the token as verifyingContract) and the
TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce) type. The Python SDK has the same
helper (eip3009_payment_header).
Pay per request with a maximum (upto)
An upto payment signs a maximum instead of an amount (Permit2, through the
x402 upto proxy). Sable serves the request, measures what it actually cost, and
settles only that, adding about 1% so Meridian's fee comes out of the payment
rather than the price. It never settles more than you signed. upto is for
requests with no API key only (a keyed caller already has a balance to draw
on), and one signature may cover at most $5 by default
(caps.upto_max_micro_usd).
Circle nanopayments
If you hold USDC in a pre-funded Circle Gateway Wallet, you can pay tiny
amounts with no transaction at all: you sign an authorization over Circle's
GatewayWalletBatched domain, made out to Sable's treasury, and Circle settles
many of them later in one batch. Because the money arrives later, Sable credits
these on Circle's verification plus its own check of your signature, and caps
them: $1 per payment and $20 per wallet per day by default
(caps.gateway_max_payment_micro_usd, caps.gateway_daily_cap_micro_usd).
Everything else on this page is credited only after Sable reads the money
arriving on-chain.
Refusals
A payment Sable does not accept is answered with a fixed error class and credits nothing. The common ones:
| Class | Meaning |
|---|---|
payer_not_linked_to_account | MeaningThe paying wallet is not linked to the account (keyed or portal top-ups). |
amount_below_minimum / amount_above_maximum | MeaningOutside the top-up bounds. |
authorization_expired | MeaningThe signature's deadline passed before it was settled. |
authorization_not_to_facilitator | MeaningThe payment was made out to someone other than Meridian's facilitator. |
payment_already_used | MeaningThat signature was already settled. |
no_transfer_to_treasury | MeaningMeridian reported success but nothing reached Sable's treasury. Nothing was credited; the operator is alerted. |
sender_sanctioned / screening_unavailable | MeaningThe paying wallet was refused by sanctions screening, or the screener could not be reached (fail closed). |
Meridian's own error text is never passed through; you get the class.