One credential, two superpowers
A single API key (or wallet) for both LLM inference and JSON-RPC calls.
11 chains supported
Ethereum, Base, Arbitrum, Optimism, Polygon, Linea, Avalanche, BSC, Blast, zkSync Era, and Starknet (mainnet plus testnets).
Stake VVV for headless funding
Stake VVV on Base to earn daily DIEM, the only fully headless funding path for a minted API key. USD and crypto top-ups are also available through the dashboard.
Keyless auth via x402
Agents can authenticate with a wallet signature and pay in USDC on Base or Solana.
Why Venice for on-chain agents?
Authentication
Pick the auth method that matches how your agent runs.
Both methods share the same rate limits and billing in Venice credits.
Crypto RPC quickstart
Send any JSON-RPC 2.0 method toPOST /crypto/rpc/{network}.
X-Venice-RPC-Credits (credits charged), X-Venice-RPC-Cost-USD (dollar cost), and X-Request-ID (correlation ID).
Supported networks
Use
GET /crypto/rpc/networks for the live, authoritative list.
Method tiers
Methods are grouped into three credit tiers. Total cost =baseCredits[chain] × methodTier.
Full list and pricing detail in the Crypto RPC API reference.
Agent recipes
Common patterns for AI agents that need to read and write on-chain.Read a wallet’s native balance
Read ERC-20 token balance
Call thebalanceOf(address) selector with eth_call. The data field is the 4-byte selector (0x70a08231) followed by the wallet address left-padded to 32 bytes. Easiest to let a library encode it:
Send a signed transaction (full lifecycle)
Venice never holds your private keys. The agent gathers tx parameters via RPC reads, signs locally with a library like viem or ethers, then relays the raw hex through Venice.1
Get the next nonce
"pending" so back-to-back sends don’t collide.2
Get gas price
eth_feeHistory to compute maxFeePerGas and maxPriorityFeePerGas.3
Estimate gas
4
Sign locally
5
Submit through Venice
Idempotency-Key on relays so a network blip can’t double-broadcast.6
Poll for receipt
result is non-null. Check result.status ("0x1" = success).Every
eth_sendRawTransaction call is logged server-side with the tx hash, network, request ID, and calling user ID. The signed payload itself is not retained. This audit trail exists so compromised keys used for illicit relays can be traced back to the responsible account.Batch multiple calls (multi-chain portfolio check)
Send up to 100 JSON-RPC objects in one request. Each is validated and billed independently.{network} endpoints.
Safe retries with idempotency
Set theIdempotency-Key header to any string matching [A-Za-z0-9_-]{1,255}. Venice caches the response for 24 hours keyed on (user, key). Replays return the cached result with Idempotent-Replayed: true and charge nothing.
Funding the agent’s API key
Once the agent has a Venice API key, it needs spendable balance on the underlying account before paid endpoints will accept the key. There are two ways to put balance there:
For an agent that runs unattended, DIEM via VVV staking is the only fully headless funding path for a minted API key today. If the agent’s daily spend exceeds its DIEM allocation, the realistic options are: stake more VVV, or have an operator sign in and top up in USD or crypto.
Autonomous VVV staking and key generation
A truly autonomous agent can manage its own VVV wallet on Base, stake it, and mint its own Venice API key with no human in the loop. The full flow:1
2
Stake VVV
approve the staking contract on the VVV token, then stake(amount) on 0x321b7ff75154472B18EDb199033fF4D116F340Ff. The wallet’s sVVV balance updates atomically with the stake.3
Mint an API key
GET /api/v1/api_keys/generate_web3_key returns a JWT that expires 15 minutes after issuance. Sign the raw token with the staking wallet, then POST the address, signature, and token back. Venice returns an API key bound to the user account derived from that wallet.x402 wallet auth in 30 seconds
If your agent already has a Base or Solana wallet, skip the API key entirely. Thevenice-x402-client SDK handles Sign-In-With-X signing, top-ups, and balance tracking.
/crypto/rpc/{network} for blockchain reads and writes. Full protocol details in the x402 guide.
Pricing
Crypto RPC is billed in Venice credits. Each response includesX-Venice-RPC-Credits (credits charged) and X-Venice-RPC-Cost-USD (dollar cost) so your agent can track spend per request.
Base credits per chain
Cost examples
Observed pricing for standard, advanced, and large method tiers:
Always trust the
X-Venice-RPC-Cost-USD response header for the authoritative cost. Errored items in batch requests are billed at a flat 5 credits each.
Rate limits
When exceeded, the endpoint returns
429 with standard X-RateLimit-* response headers.
Error handling
Common HTTP responses your agent should handle:
Per-item batch errors (e.g. invalid params on one of N calls) come back inside a
200 OK response with a JSON-RPC error field on the offending item. Those items are billed at a flat 5 credits each.
Not supported
These categories of methods are intentionally rejected:- WebSocket-only (
eth_subscribe,eth_unsubscribe): the proxy is HTTP-only. Poll instead. - Stateful filters (
eth_newFilter,eth_getFilterChanges, etc.): filter state is pinned to a single backend and breaks on a load-balanced proxy. Useeth_getLogsinstead. - Key-holding methods (
eth_sign,eth_accounts,eth_mining): hosted providers don’t hold user keys. Sign client-side and submit viaeth_sendRawTransaction. - Unmapped methods: anything not allowlisted returns
400. Contact support to request additions.
Resources
Crypto RPC API Reference
Full method list, pricing, and response headers
Supported Networks
Live list of supported network slugs
x402 Wallet Auth
Authenticate and pay with a Base or Solana wallet
Autonomous Agent API Key
Mint your own key by staking VVV
Postman Collection
27 ready-to-run Crypto RPC examples
Pricing
DIEM, credit pricing, and payment options