Skip to main content
POST
/
crypto
/
rpc
/
{network}
curl --request POST \
  --url https://api.venice.ai/api/v1/crypto/rpc/{network} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "params": [],
  "id": 1
}
'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1"
}
Forward a JSON-RPC 2.0 request (single or batch) to a supported blockchain node. Supports both API key and x402 wallet authentication. Billing is per credit and denominated in your Venice balance — one credential, one invoice, every chain below.

Authentication

This endpoint supports two authentication methods:
  • API Key: Standard Bearer token authentication via the Authorization: Bearer <key> header.
  • x402 Wallet: Pay-as-you-go with USDC credits from your Ethereum wallet — no Venice account required. See the x402 guide for setup.
Both methods share the same rate limits and billing (Venice credits).

Supported networks

See GET /crypto/rpc/networks for the live, authoritative list. Current coverage:
FamilyMainnetTestnets
Ethereumethereum-mainnetethereum-sepolia, ethereum-holesky
Polygonpolygon-mainnetpolygon-amoy
Arbitrumarbitrum-mainnetarbitrum-sepolia
Optimismoptimism-mainnetoptimism-sepolia
Basebase-mainnetbase-sepolia
Linealinea-mainnetlinea-sepolia
Avalanche C-Chainavalanche-mainnetavalanche-fuji
BNB Smart Chainbsc-mainnetbsc-testnet
Blastblast-mainnetblast-sepolia
zkSync Erazksync-mainnetzksync-sepolia
Starknetstarknet-mainnetstarknet-sepolia

Request shapes

Single request

{
  "jsonrpc": "2.0",
  "method": "eth_chainId",
  "params": [],
  "id": 1
}

Batch request

An array of up to 100 JSON-RPC 2.0 objects. Each item is validated independently; if any method is unsupported, the entire batch is rejected with 400 and every offending method name is listed in the error message.
[
  { "jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1 },
  { "jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 2 }
]

Supported methods and pricing tiers

Methods are classified into three credit tiers. Credits consumed per call = baseCredits[chain] × methodTier.
TierMultiplierExample methods
Standardeth_call, eth_getBalance, eth_blockNumber, eth_sendRawTransaction, eth_getLogs, eth_getTransactionReceipt, eth_estimateGas, net_version, web3_clientVersion, ERC-4337 bundler methods (eth_sendUserOperation, eth_estimateUserOperationGas, etc.), chain-family extensions (zks_*, linea_*, bor_*, starknet_*)
Advancedtrace_block, trace_call, trace_transaction, debug_traceCall, debug_traceTransaction, debug_traceBlockByHash, txpool_inspect, txpool_status, arbtrace_*
Largetrace_replayBlockTransactions, trace_replayTransaction, txpool_content, arbtrace_replayTransaction, arbtrace_replayBlockTransactions

Base credits per chain

baseCreditsChains
20Ethereum + all EVM L2s above (Base, Optimism, Arbitrum, Polygon, Linea, Avalanche, BSC, Blast) and Starknet
30zkSync Era

Cost examples

At Venice’s ~$6.25 × 10⁻⁷ per credit:
CallCreditsUSD cost
eth_call on Ethereum (20 × 1×)20$0.0000125
trace_transaction on Ethereum (20 × 2×)40$0.0000250
trace_replayTransaction on Ethereum (20 × 4×)80$0.0000500
eth_call on zkSync (30 × 1×)30$0.0000188

Not supported

  • WebSocket-only methods (eth_subscribe, eth_unsubscribe) — this proxy is HTTP-only. Poll instead, or upgrade to a direct WebSocket provider.
  • Stateful filter methods (eth_newFilter, eth_getFilterChanges, eth_getFilterLogs, eth_uninstallFilter, eth_newBlockFilter, eth_newPendingTransactionFilter) — filter state is pinned to a single upstream backend and silently breaks on a load-balanced HTTP proxy. Use eth_getLogs (stateless) instead.
  • Miner / key-holding methods (eth_sign, eth_accounts, eth_mining, eth_hashrate, eth_getWork, eth_submitWork) — hosted provider endpoints don’t hold user private keys, so these always error. Sign transactions client-side and submit via eth_sendRawTransaction.
  • Unmapped methods — anything not explicitly allowlisted returns 400. Contact support to request additions.

Per-item batch billing

Even when the HTTP response is 200, individual batch items can come back with a JSON-RPC error field (for example, a bad-params error or a method not supported on the target chain). Venice bills these items at 5 credits each rather than the full method tier — a small concession for normal “exploring the API” mistakes.
// Batch request:
[
  { "jsonrpc": "2.0", "method": "eth_chainId",   "params": [],         "id": 1 },
  { "jsonrpc": "2.0", "method": "eth_getBalance","params": ["bad"],    "id": 2 }
]

// Response (HTTP 200, X-Venice-RPC-Credits: 25):
[
  { "jsonrpc": "2.0", "id": 1, "result": "0x1" },
  { "jsonrpc": "2.0", "id": 2, "error": { "code": -32602, "message": "invalid params" } }
]
The first item (success) bills 20 credits, the second (RPC-level error) bills 5, sum = 25.

Rate limits

Two caps apply per authenticated caller:
TierRequests/minuteCredits per 24h
Standard10010,000,000 (~$6.25 cap)
Staff1,000100,000,000
When either cap is exceeded the endpoint returns 429 with a customMessage identifying which cap tripped. The per-minute cap also sets the standard X-RateLimit-* response headers.

Idempotency

Set the Idempotency-Key request header to any string matching [A-Za-z0-9_-]{1,255} to enable safe retries. The response is cached for 24 hours keyed on (user, idempotency-key):
  • Replaying the same key with the same body returns the cached response and an Idempotent-Replayed: true response header. The upstream is not touched and no new credits are charged.
  • Replaying the same key with a different body returns 400 to prevent silent state corruption. Pick a fresh key for distinct requests.

Response headers

HeaderDescription
X-Venice-RPC-CreditsCredits charged for this request. On batch requests, this is the sum across items.
X-Venice-RPC-Cost-USDDollar cost to 8 decimal places. Equal to X-Venice-RPC-Credits × price per credit.
X-Request-ID32-character correlation ID. Include in any support correspondence.
Idempotent-ReplayedPresent with value "true" when the response came from the idempotency cache.
X-RateLimit-Limit / X-RateLimit-Remaining / X-RateLimit-ResetSet only on 429 responses.

Forensic logging for transaction relays

Every call to eth_sendRawTransaction is logged server-side with the tx hash (keccak256 of the raw bytes), the network slug, the request ID, and the calling user ID. We do not retain the signed payload itself — the hash is recoverable from the on-chain receipt. This audit trail exists so that if a customer’s API key is compromised and used to relay illicit transactions through our infrastructure, we can correlate on-chain activity back to the responsible account.

Example

curl 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" }
Response headers: X-Venice-RPC-Credits: 20, X-Venice-RPC-Cost-USD: 0.00001250, X-Request-ID: <nanoid>.

Postman collection

A ready-to-import Postman collection with 27 example requests (discovery, standard/advanced/large calls, multi-chain, batching, idempotency, error cases) is available in our public workspace: Venice Crypto RPC — Postman Collection Set the apiKey collection variable to your Venice API key and start sending requests immediately.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string

Optional idempotency key for safe retries. Pattern: [A-Za-z0-9_-]{1,255}. Retrying within 24 hours with the same key + same body replays the cached response with Idempotent-Replayed: true. Same key + different body returns 400.

Pattern: ^[A-Za-z0-9_-]{1,255}$
Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Path Parameters

network
string
required

Venice-side network slug. Call GET /api/v1/crypto/rpc/networks for the current list.

Example:

"ethereum-mainnet"

Body

application/json
method
string
required

JSON-RPC method name. See the "Supported methods" section of the endpoint description for the classification into 1×/2×/4× pricing tiers.

Example:

"eth_chainId"

jsonrpc
enum<string>
Available options:
2.0
Example:

"2.0"

params
any[]

Method parameters. Shape depends on the method; see the upstream chain documentation.

Example:
[]
id

Caller-supplied request ID echoed back in the response. Required for batch request correlation.

Example:

1

Response

JSON-RPC response forwarded from the upstream node. Content-Type is forced to application/json regardless of upstream headers.

jsonrpc
string
Example:

"2.0"

id
result
any

Method-dependent result. Present on success.

error
object

JSON-RPC error object. Present on per-request failure (HTTP status is still 200 in that case).