Click "Approve" on the Buy page to approve USDC for SettlementV2. This standing allowance is used for dashboard/API-key marketplace requests (/buy / OpenAI-compatible API key usage). Your funds stay in your wallet — nothing is locked or deposited — and you can revoke the SettlementV2 approval at any time.
This is separate from x402 upto Permit2 approval. A Permit2 approval for x402 agent payments does not satisfy the /buy SettlementV2 allowance, and a SettlementV2 approval does not authorize x402 Permit2 payments.
Returned by GET /v1/buyer/me → settlement_contract field
Fee multiplier
On-chain: Settlement.feeMultiplier() (10000 = 1.0x, no markup)
Buyer key prefix
inf_
Max keys per wallet
25
Auth header
Authorization: Bearer inf_xxx
How settlement works: After each API-key marketplace request completes, SettlementV2 calls transferFrom() to pull USDC from your wallet and send it to the seller. Your funds stay in your wallet — nothing is locked or deposited. You just need an active USDC allowance pointing at the SettlementV2 proxy. You can cap or revoke this allowance at any time. This is not the x402 Permit2 rail.
1. Get Your API Key (SIWE)
Request a challenge, sign it, get a persistent inf_ key:
bash
# Get SIWE challengeCHALLENGE=$(curl -s "https://api.surplusintelligence.ai/v1/buyer/auth/challenge?address=0xYourWallet")# Returns a SIWE message + nonce# Sign the SIWE message with your wallet, then exchange for a keycurl -X POST https://api.surplusintelligence.ai/v1/buyer/auth/keys \ -H "Content-Type: application/json" \ -d '{"message": "<SIWE message from challenge>", "signature": "0x..."}'# Returns: { "api_key": "inf_abc123...", "id": "...", ... }# Save this key — it will not be shown again.
Python (viem/web3):
python
from web3 import Web3import requestsBASE = "https://api.surplusintelligence.ai"# 1. Get challengeresp = requests.get(f"{BASE}/v1/buyer/auth/challenge?address={wallet_address}")challenge = resp.json()# 2. Sign the SIWE messagesigned = w3.eth.account.sign_message( encode_defunct(text=challenge["message"]), private_key=YOUR_KEY)# 3. Exchange for API keyresp = requests.post(f"{BASE}/v1/buyer/auth/keys", json={ "message": challenge["message"], "signature": signed.signature.hex()})api_key = resp.json()["api_key"] # inf_xxx
For programmatic API-key usage, approve USDC to the SettlementV2 proxy on Base. This can be a standard on-chain ERC-20 approve() (you pay Base gas) or, in the web app, a gasless EIP-2612 permit relayed under SI's SettlementV2 policy cap. The spender is SettlementV2, not Permit2. You need a small amount of ETH on Base only for the on-chain path (~$0.001).
python
from web3 import Web3w3 = Web3(Web3.HTTPProvider("https://mainnet.base.org"))USDC_ADDRESS = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"ERC20_ABI = [{"name": "approve", "type": "function", "stateMutability": "nonpayable", "inputs": [{"name": "spender", "type": "address"}, {"name": "value", "type": "uint256"}], "outputs": [{"name": "", "type": "bool"}]}]usdc = w3.eth.contract(address=USDC_ADDRESS, abi=ERC20_ABI)# settlement_contract from step 2 (/v1/buyer/me response)tx = usdc.functions.approve( settlement_contract, 100_000_000 # 100 USDC (6 decimals); use the smallest cap that fits your expected spend).build_transaction({ "from": wallet_address, "nonce": w3.eth.get_transaction_count(wallet_address), "gas": 60_000, "maxFeePerGas": w3.eth.gas_price,})signed = w3.eth.account.sign_transaction(tx, private_key=YOUR_KEY)tx_hash = w3.eth.send_raw_transaction(signed.raw_transaction)receipt = w3.eth.wait_for_transaction_receipt(tx_hash)# receipt.status == 1 means success
# All available modelscurl .../v1/models -H "Authorization: Bearer inf_xxx"# Best prices per modelcurl .../v1/prices -H "Authorization: Bearer inf_xxx"# Full orderbook for a specific modelcurl .../api/markets/claude-opus-4.6
# List all your keyscurl .../v1/buyer/keys -H "Authorization: Bearer inf_xxx"# Create another key with a labelcurl -X POST .../v1/buyer/keys \ -H "Authorization: Bearer inf_xxx" \ -d '{"label": "production-server"}'# Revoke a keycurl -X DELETE .../v1/buyer/keys/{keyId} \ -H "Authorization: Bearer inf_xxx"
8. Optional: Set Fallback Provider
If all marketplace sellers are down, requests fall back to your own provider key. Register it as a provider with model: null (applies to every model):