Venice Crypto RPC (JSON-RPC proxy)
Venice exposes a multi-chain JSON-RPC proxy billed per call. Same request shape as Alchemy / Infura — just change the base URL and pay per credit.
| Endpoint |
Auth |
Notes |
GET /crypto/rpc/networks |
Bearer or SIWE |
Returns { "networks": [...] } (sorted). |
POST /crypto/rpc/{network} |
Bearer or SIWE (x402) |
Forward a JSON-RPC 2.0 request (single or batch). |
Supported networks
Call GET /crypto/rpc/networks for the current list. It currently returns 23 slugs (always verify — the catalog grows):
arbitrum-mainnet arbitrum-sepolia
avalanche-mainnet avalanche-fuji
base-mainnet base-sepolia
blast-mainnet blast-sepolia
bsc-mainnet bsc-testnet
ethereum-mainnet ethereum-sepolia ethereum-holesky
linea-mainnet linea-sepolia
optimism-mainnet optimism-sepolia
polygon-mainnet polygon-amoy
starknet-mainnet starknet-sepolia
zksync-mainnet zksync-sepolia
Use the slug as :network in the proxy path.
Send a JSON-RPC request
Single call
curl -X POST https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet \
-H "Authorization: Bearer $VENICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
{ "jsonrpc": "2.0", "id": 1, "result": "0x1" }
Batch (up to 100 calls)
curl -X POST https://api.venice.ai/api/v1/crypto/rpc/base-mainnet \
-H "Authorization: Bearer $VENICE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1},
{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":2}
]'
A single unsupported method in a batch ⇒ the entire batch fails with 400.
Drop-in with viem / ethers
import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
const client = createPublicClient({
chain: mainnet,
transport: http('https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet', {
fetchOptions: { headers: { Authorization: `Bearer ${process.env.VENICE_API_KEY}` } },
}),
})
Pricing
Credits per call = baseCredits[chain] × methodTier.
| Base credits |
Chains |
20 |
Ethereum, Base, Optimism, Arbitrum, Polygon, Linea, Avalanche, BSC, Blast, Starknet. |
30 |
zkSync Era. |
| Tier |
Multiplier |
Methods |
| Standard |
1× |
eth_call, eth_getBalance, eth_blockNumber, eth_sendRawTransaction, eth_getLogs, net_version, web3_clientVersion, ERC-4337 bundler (eth_sendUserOperation, …), chain-family extensions (zks_*, linea_*, bor_*, starknet_*). |
| Advanced |
2× |
trace_*, debug_*, txpool_inspect, txpool_status, arbtrace_*. |
| Large |
4× |
trace_replayBlockTransactions, trace_replayTransaction, txpool_content, arbtrace_replay*. |
At ~$7e-7 per credit:
- Standard EVM call (20 × 1) ≈ $0.000014
- Advanced trace on Ethereum (20 × 2) ≈ $0.000028
- Large trace replay (20 × 4) ≈ $0.000056
- zkSync standard call (30 × 1) ≈ $0.000021
RPC-level errors (HTTP 200 with error object inside — e.g. method unsupported on that chain, bad params) are billed at a flat 5 credits regardless of tier.
Response headers on 200:
| Header |
Meaning |
X-Venice-RPC-Credits |
Total credits charged (sum over batch). |
X-Venice-RPC-Cost-USD |
Dollar cost to 8 decimal places. |
X-Balance-Remaining |
Remaining x402 USD — set on routes whose middleware refreshes balance headers. The /crypto/rpc/* handler currently emits credits/cost/request headers; treat X-Balance-Remaining here as best-effort (may be absent on RPC). Use GET /x402/balance/{walletAddress} for an authoritative read. |
X-Request-ID |
32-char correlation ID — include in support tickets. |
Idempotent-Replayed |
"true" when served from the idempotency cache. |
Unsupported methods
These always return 400:
- Stateful filter methods —
eth_newFilter, eth_newBlockFilter, eth_getFilterChanges, eth_getFilterLogs, eth_uninstallFilter. Filter state is pinned to a single backend and a load-balanced HTTP proxy can't maintain it. Use eth_getLogs instead.
- WebSocket-only methods —
eth_subscribe, eth_unsubscribe. This proxy is HTTP only. Run your own WS endpoint for subscriptions.
- Cross-family methods — calling
starknet_* on an EVM chain (or vice versa) ⇒ 400.
- Unmapped methods — anything not in the Standard/Advanced/Large lists.
Idempotency
Set the Idempotency-Key header to any [A-Za-z0-9_-]{1,255} string for safe retries:
curl -X POST https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet \
-H "Authorization: Bearer $VENICE_API_KEY" \
-H "Idempotency-Key: send-tx-2026-04-21-nonce-42" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x..."] ,"id":1}'
- Cached for 24 hours keyed on
(user, idempotency-key).
- Replay returns the cached response with
Idempotent-Replayed: true and is not billed again.
- Same key + different body ⇒
400 (prevents silent corruption).
Use this for any state-mutating method (eth_sendRawTransaction, eth_sendUserOperation) to survive flaky networks without double-broadcasting.
Rate limits
Two caps per caller, both enforced independently:
| Tier |
Per-minute requests |
Credits / rolling 24h |
| Paid |
100 |
10,000,000 |
| Staff |
1,000 |
100,000,000 |
429 response customMessage identifies which cap tripped. Per-minute cap also sets X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset headers.
Concurrent-call collisions on the per-user mutex also return 429. Retry with jitter.
Errors
| Status |
Typical cause |
400 |
Unsupported network slug, empty body, batch > 100, unsupported/WebSocket/filter method, cross-family call, idempotency-key reuse with a different body. |
401 |
Missing or invalid Bearer / SIWE. The /networks listing is public but the proxy endpoint requires auth. |
402 |
Insufficient balance. x402 wallet users get a PAYMENT-REQUIRED header with structured top-up instructions (see venice-x402). |
429 |
Per-minute, 24-hour credit, or concurrency cap tripped. |
500 |
Upstream fetch failed / timeout. Safe to retry with the same Idempotency-Key. |
Patterns
- Multi-chain dashboards — Single API key unlocks all networks. No per-chain keys to rotate.
- High-throughput indexing — Batch up to 100 calls per request; each sub-call is still billed individually, but the network round-trip is amortized.
- Wallet-based (x402) RPC — Pay per RPC call with USDC on Base. Use the SIWE header; a
402 indicates low credit and carries structured top-up instructions.
- Cost tracking — Log
X-Venice-RPC-Credits and X-Venice-RPC-Cost-USD per request; aggregate by method to see where credits go.
- Safe transaction submission — Always include an
Idempotency-Key on eth_sendRawTransaction. The proxy then guarantees exactly-once semantics within 24 hours.
1---2name: venice-crypto-rpc3description: Use Venice as a pay-per-call JSON-RPC proxy to 20+ EVM and Starknet networks. Covers GET /crypto/rpc/networks, POST /crypto/rpc/{network}, the 1×/2×/4× method-tier pricing model, per-minute + 24-hour credit rate limits, idempotency keys for safe retries, single vs batch requests, and the unsupported stateful/WebSocket methods (eth_subscribe, eth_newFilter, etc.).4---5
6# Venice Crypto RPC (JSON-RPC proxy)
7
8Venice exposes a **multi-chain JSON-RPC proxy** billed per call. Same request shape as Alchemy / Infura — just change the base URL and pay per credit.
9
10| Endpoint | Auth | Notes |
11|---|---|---|
12| `GET /crypto/rpc/networks` | Bearer or SIWE | Returns `{ "networks": [...] }` (sorted). |
13| `POST /crypto/rpc/{network}` | Bearer or SIWE (x402) | Forward a JSON-RPC 2.0 request (single or batch). |
14
15## Supported networks
16
17Call `GET /crypto/rpc/networks` for the current list. It currently returns 23 slugs (always verify — the catalog grows):
18
19```
20arbitrum-mainnet arbitrum-sepolia
21avalanche-mainnet avalanche-fuji
22base-mainnet base-sepolia
23blast-mainnet blast-sepolia
24bsc-mainnet bsc-testnet
25ethereum-mainnet ethereum-sepolia ethereum-holesky
26linea-mainnet linea-sepolia
27optimism-mainnet optimism-sepolia
28polygon-mainnet polygon-amoy
29starknet-mainnet starknet-sepolia
30zksync-mainnet zksync-sepolia
31```
32
33Use the slug as `:network` in the proxy path.
34
35## Send a JSON-RPC request
36
37### Single call
38
39```bash
40curl -X POST https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet \
41 -H "Authorization: Bearer $VENICE_API_KEY" \
42 -H "Content-Type: application/json" \
43 -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
44```
45
46```json
47{ "jsonrpc": "2.0", "id": 1, "result": "0x1" }
48```
49
50### Batch (up to 100 calls)
51
52```bash
53curl -X POST https://api.venice.ai/api/v1/crypto/rpc/base-mainnet \
54 -H "Authorization: Bearer $VENICE_API_KEY" \
55 -H "Content-Type: application/json" \
56 -d '[
57 {"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1},
58 {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":2}
59 ]'
60```
61
62A single unsupported method in a batch ⇒ the **entire batch** fails with `400`.
63
64### Drop-in with `viem` / `ethers`
65
66```ts
67import { createPublicClient, http } from 'viem'
68import { mainnet } from 'viem/chains'
69
70const client = createPublicClient({
71 chain: mainnet,
72 transport: http('https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet', {
73 fetchOptions: { headers: { Authorization: `Bearer ${process.env.VENICE_API_KEY}` } },
74 }),
75})
76```
77
78## Pricing
79
80Credits per call = `baseCredits[chain] × methodTier`.
81
82| Base credits | Chains |
83|---|---|
84| `20` | Ethereum, Base, Optimism, Arbitrum, Polygon, Linea, Avalanche, BSC, Blast, Starknet. |
85| `30` | zkSync Era. |
86
87| Tier | Multiplier | Methods |
88|---|---|---|
89| **Standard** | `1×` | `eth_call`, `eth_getBalance`, `eth_blockNumber`, `eth_sendRawTransaction`, `eth_getLogs`, `net_version`, `web3_clientVersion`, ERC-4337 bundler (`eth_sendUserOperation`, …), chain-family extensions (`zks_*`, `linea_*`, `bor_*`, `starknet_*`). |
90| **Advanced** | `2×` | `trace_*`, `debug_*`, `txpool_inspect`, `txpool_status`, `arbtrace_*`. |
91| **Large** | `4×` | `trace_replayBlockTransactions`, `trace_replayTransaction`, `txpool_content`, `arbtrace_replay*`. |
92
93At `~$7e-7` per credit:
94
95- Standard EVM call (20 × 1) ≈ **$0.000014**
96- Advanced trace on Ethereum (20 × 2) ≈ **$0.000028**
97- Large trace replay (20 × 4) ≈ **$0.000056**
98- zkSync standard call (30 × 1) ≈ **$0.000021**
99
100RPC-level errors (HTTP 200 with `error` object inside — e.g. method unsupported on that chain, bad params) are billed at a flat **5 credits** regardless of tier.
101
102Response headers on `200`:
103
104| Header | Meaning |
105|---|---|
106| `X-Venice-RPC-Credits` | Total credits charged (sum over batch). |
107| `X-Venice-RPC-Cost-USD` | Dollar cost to 8 decimal places. |
108| `X-Balance-Remaining` | Remaining x402 USD — set on routes whose middleware refreshes balance headers. The `/crypto/rpc/*` handler currently emits credits/cost/request headers; treat `X-Balance-Remaining` here as best-effort (may be absent on RPC). Use `GET /x402/balance/{walletAddress}` for an authoritative read. |
109| `X-Request-ID` | 32-char correlation ID — include in support tickets. |
110| `Idempotent-Replayed` | `"true"` when served from the idempotency cache. |
111
112## Unsupported methods
113
114These always return `400`:
115
116- **Stateful filter methods** — `eth_newFilter`, `eth_newBlockFilter`, `eth_getFilterChanges`, `eth_getFilterLogs`, `eth_uninstallFilter`. Filter state is pinned to a single backend and a load-balanced HTTP proxy can't maintain it. Use `eth_getLogs` instead.
117- **WebSocket-only methods** — `eth_subscribe`, `eth_unsubscribe`. This proxy is HTTP only. Run your own WS endpoint for subscriptions.
118- **Cross-family methods** — calling `starknet_*` on an EVM chain (or vice versa) ⇒ `400`.
119- **Unmapped methods** — anything not in the Standard/Advanced/Large lists.
120
121## Idempotency
122
123Set the `Idempotency-Key` header to any `[A-Za-z0-9_-]{1,255}` string for safe retries:
124
125```bash
126curl -X POST https://api.venice.ai/api/v1/crypto/rpc/ethereum-mainnet \
127 -H "Authorization: Bearer $VENICE_API_KEY" \
128 -H "Idempotency-Key: send-tx-2026-04-21-nonce-42" \
129 -H "Content-Type: application/json" \
130 -d '{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0x..."] ,"id":1}'
131```
132
133- Cached for **24 hours** keyed on `(user, idempotency-key)`.
134- Replay returns the cached response with `Idempotent-Replayed: true` and is **not billed again**.
135- Same key + **different body** ⇒ `400` (prevents silent corruption).
136
137Use this for any state-mutating method (`eth_sendRawTransaction`, `eth_sendUserOperation`) to survive flaky networks without double-broadcasting.
138
139## Rate limits
140
141Two caps per caller, both enforced independently:
142
143| Tier | Per-minute requests | Credits / rolling 24h |
144|---|---|---|
145| Paid | 100 | 10,000,000 |
146| Staff | 1,000 | 100,000,000 |
147
148`429` response `customMessage` identifies which cap tripped. Per-minute cap also sets `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` headers.
149
150Concurrent-call collisions on the per-user mutex also return `429`. Retry with jitter.
151
152## Errors
153
154| Status | Typical cause |
155|---|---|
156| `400` | Unsupported network slug, empty body, batch > 100, unsupported/WebSocket/filter method, cross-family call, idempotency-key reuse with a different body. |
157| `401` | Missing or invalid Bearer / SIWE. The `/networks` listing is public but the proxy endpoint requires auth. |
158| `402` | Insufficient balance. x402 wallet users get a `PAYMENT-REQUIRED` header with structured top-up instructions (see [`venice-x402`](../venice-x402/SKILL.md)). |
159| `429` | Per-minute, 24-hour credit, or concurrency cap tripped. |
160| `500` | Upstream fetch failed / timeout. Safe to retry with the same `Idempotency-Key`. |
161
162## Patterns
163
164- **Multi-chain dashboards** — Single API key unlocks all networks. No per-chain keys to rotate.
165- **High-throughput indexing** — Batch up to 100 calls per request; each sub-call is still billed individually, but the network round-trip is amortized.
166- **Wallet-based (x402) RPC** — Pay per RPC call with USDC on Base. Use the SIWE header; a `402` indicates low credit and carries structured top-up instructions.
167- **Cost tracking** — Log `X-Venice-RPC-Credits` and `X-Venice-RPC-Cost-USD` per request; aggregate by `method` to see where credits go.
168- **Safe transaction submission** — Always include an `Idempotency-Key` on `eth_sendRawTransaction`. The proxy then guarantees exactly-once semantics within 24 hours.