Crypto RPC

Proxy a JSON-RPC request to a supported blockchain

Proxy a JSON-RPC request to a supported blockchain node and bill per credit.

Request shapes

  • Single request: a JSON-RPC 2.0 object ({ "jsonrpc":"2.0", "method":"…", "params":[…], "id":1 }).
  • Batch: an array of up to 100 JSON-RPC 2.0 objects. If any item references an unsupported method, the entire batch is rejected with 400 and the offending methods are listed.

Supported methods

Methods are classified into three pricing tiers:

  • Standard (1×): eth_call, eth_getBalance, eth_blockNumber, eth_sendRawTransaction, eth_getLogs, net_version, web3_clientVersion, ERC-4337 bundler methods (eth_sendUserOperation, etc.), chain-family extensions (zks_*, linea_*, bor_*, starknet_*), and Solana methods (getAccountInfo, getBalance, getLatestBlockhash, sendTransaction, etc.).
  • Advanced (2×): trace_*, debug_*, txpool_inspect, txpool_status, arbtrace_*.
  • Large (4×): trace_replayBlockTransactions, trace_replayTransaction, txpool_content, arbtrace_replay*, and Solana getLargestAccounts, getSupply.

Stateful filter methods (eth_newFilter, eth_getFilterChanges, eth_uninstallFilter, etc.) are not supported — they break on a load-balanced HTTP proxy because filter state is pinned to a single upstream backend. Use eth_getLogs instead.

WebSocket-only methods (EVM eth_subscribe/eth_unsubscribe and Solana *Subscribe/*Unsubscribe) return 400 because this proxy is HTTP-only.

Pricing

Credits consumed per call = baseCredits[chain] × methodTier. baseCredits is 20 for most EVM chains (Ethereum, Base, Optimism, Arbitrum, Polygon, Linea, Avalanche, BSC, Blast) and Starknet; 30 for zkSync Era and Solana. The USD price per credit is ~7e-7 — a single standard EVM call costs ≈ $0.000014 and a large trace-replay costs ≈ $0.000056.

Per-request errors at the JSON-RPC layer (HTTP 200 with an error field in a response item) are billed at 5 credits instead of the full method tier — a small concession for methods not supported on a given chain or bad-parameter responses.

Rate limits

Two caps apply per caller:

  • Requests per minute: 100 on the paid tier.
  • Credits per rolling 24 hours: 10,000,000 on the paid tier. When either cap is exceeded, the request returns 429 with a customMessage identifying which cap tripped. The per-minute cap also sets the 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 with Idempotent-Replayed: true. Reusing the same key with a different body returns 400 to prevent silent corruption.

Authentication: This endpoint accepts either a Bearer API key or a SIGN-IN-WITH-X header for x402 wallet-based authentication. The legacy X-Sign-In-With-X header is also accepted during migration. When using x402, a 402 Payment Required response indicates insufficient balance and includes top-up instructions.

post/api/v1/crypto/rpc/{network}

Request

  • Base URL: https://api.venice.ai
  • URL: https://api.venice.ai/api/v1/crypto/rpc/{network}
  • Auth: one of:
    • HTTP bearer
    • API key in header SIGN-IN-WITH-X

Path parameters

networkstring required
Example:ethereum-mainnet

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

Headers

Idempotency-Keystring
Example:a1b2c3d4-e5f6-7890-abcd-ef1234567890

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.

Request body

OR

Example request

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

Response

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

OR

Example response

{
  "jsonrpc": "2.0",
  "error": {
    "code": -32602,
    "message": "invalid params"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.