Skip to main content
Venice gives your agent both inference (230+ models) and blockchain access (10 EVM chains plus Starknet) through a single credential. Your agent can think, sign, and send transactions without juggling separate accounts for inference and RPC providers.

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.
Truly autonomous agents can mint their own API key by staking VVV on Base. See Autonomous Agent API Key Creation.

Crypto RPC quickstart

Send any JSON-RPC 2.0 method to POST /crypto/rpc/{network}.
Response:
Response headers include 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 the balanceOf(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:
The contract address above is VVV on Base. Swap it for any ERC-20 contract.

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

Use "pending" so back-to-back sends don’t collide.
2

Get gas price

For EIP-1559 chains, prefer eth_feeHistory to compute maxFeePerGas and maxPriorityFeePerGas.
3

Estimate gas

4

Sign locally

5

Submit through Venice

Always set Idempotency-Key on relays so a network blip can’t double-broadcast.
6

Poll for receipt

Poll every few seconds until 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.
For multi-chain reads (one call per chain), issue parallel requests to different {network} endpoints.

Safe retries with idempotency

Set the Idempotency-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.
This is critical for transaction relays where a network blip could otherwise cause your agent to broadcast the same tx twice.

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

Acquire VVV and ETH for gas

Send VVV to the agent’s wallet (or have the agent swap on Aerodrome or Uniswap), plus a small amount of ETH on Base for the two staking transactions.
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.
Minting only requires a non-zero sVVV balance, so 1 staked VVV is enough to receive a key. Spending with the key is a separate question, governed by the funding table above. See Autonomous Agent API Key Creation for the complete walkthrough with code and the full error reference.

x402 wallet auth in 30 seconds

If your agent already has a Base or Solana wallet, skip the API key entirely. The venice-x402-client SDK handles Sign-In-With-X signing, top-ups, and balance tracking.
The same wallet auth works against /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 includes X-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. Use eth_getLogs instead.
  • Key-holding methods (eth_sign, eth_accounts, eth_mining): hosted providers don’t hold user keys. Sign client-side and submit via eth_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