Crypto RPC
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.), and 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*.
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 (eth_subscribe, eth_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. The USD price per credit is ~7e-7 — a single standard EVM call 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, 1000 on the staff tier.
- Credits per rolling 24 hours: 10,000,000 on the paid tier, 100,000,000 on the staff tier.
When either cap is exceeded, the request returns 429 with a
customMessageidentifying which cap tripped. The per-minute cap also sets theX-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.
Autenticação
Este endpoint suporta dois métodos de autenticação:- Chave de API: Autenticação padrão via Bearer token no cabeçalho
Authorization: Bearer <key>. - Carteira x402: Pague à medida que usa com créditos em USDC de uma carteira na Base ou Solana. Não é necessária conta Venice. Veja o guia do x402 para configuração.
Redes suportadas
VejaGET /crypto/rpc/networks para a lista autoritativa em tempo real. Cobertura atual:
| Família | Mainnet | Testnets |
|---|---|---|
| Ethereum | ethereum-mainnet | ethereum-sepolia, ethereum-holesky |
| Polygon | polygon-mainnet | polygon-amoy |
| Arbitrum | arbitrum-mainnet | arbitrum-sepolia |
| Optimism | optimism-mainnet | optimism-sepolia |
| Base | base-mainnet | base-sepolia |
| Linea | linea-mainnet | linea-sepolia |
| Avalanche C-Chain | avalanche-mainnet | avalanche-fuji |
| BNB Smart Chain | bsc-mainnet | bsc-testnet |
| Blast | blast-mainnet | blast-sepolia |
| zkSync Era | zksync-mainnet | zksync-sepolia |
| Starknet | starknet-mainnet | starknet-sepolia |
Formatos de requisição
Requisição única
Requisição em lote
Um array de até 100 objetos JSON-RPC 2.0. Cada item é validado independentemente; se algum método não for suportado, o lote inteiro é rejeitado com400 e cada nome de método infrator é listado na mensagem de erro.
Métodos suportados e níveis de preço
Os métodos são classificados em três níveis de créditos. Créditos consumidos por chamada =baseCredits[chain] × methodTier.
| Nível | Multiplicador | Exemplos de métodos |
|---|---|---|
| Standard | 1× | eth_call, eth_getBalance, eth_blockNumber, eth_sendRawTransaction, eth_getLogs, eth_getTransactionReceipt, eth_estimateGas, net_version, web3_clientVersion, métodos de bundler ERC-4337 (eth_sendUserOperation, eth_estimateUserOperationGas, etc.), extensões da família da chain (zks_*, linea_*, bor_*, starknet_*) |
| Advanced | 2× | trace_block, trace_call, trace_transaction, debug_traceCall, debug_traceTransaction, debug_traceBlockByHash, txpool_inspect, txpool_status, arbtrace_* |
| Large | 4× | trace_replayBlockTransactions, trace_replayTransaction, txpool_content, arbtrace_replayTransaction, arbtrace_replayBlockTransactions |
Créditos base por chain
| baseCredits | Chains |
|---|---|
| 20 | Ethereum + todas as L2s EVM acima (Base, Optimism, Arbitrum, Polygon, Linea, Avalanche, BSC, Blast) e Starknet |
| 30 | zkSync Era |
Exemplos de custo
Ao preço da Venice de~$6,25 × 10⁻⁷ por crédito:
| Chamada | Créditos | Custo em USD |
|---|---|---|
eth_call em Ethereum (20 × 1×) | 20 | $0,0000125 |
trace_transaction em Ethereum (20 × 2×) | 40 | $0,0000250 |
trace_replayTransaction em Ethereum (20 × 4×) | 80 | $0,0000500 |
eth_call em zkSync (30 × 1×) | 30 | $0,0000188 |
Não suportado
- Métodos exclusivos de WebSocket (
eth_subscribe,eth_unsubscribe) — este proxy é somente HTTP. Use polling ou utilize um provedor WebSocket direto. - Métodos de filtro com estado (
eth_newFilter,eth_getFilterChanges,eth_getFilterLogs,eth_uninstallFilter,eth_newBlockFilter,eth_newPendingTransactionFilter) — o estado do filtro fica preso a um único backend upstream e quebra silenciosamente em um proxy HTTP com balanceamento de carga. Useeth_getLogs(sem estado) em vez disso. - Métodos de mineração / chave (
eth_sign,eth_accounts,eth_mining,eth_hashrate,eth_getWork,eth_submitWork) — endpoints de provedores hospedados não armazenam chaves privadas de usuários, então esses sempre retornam erro. Assine transações no lado do cliente e envie viaeth_sendRawTransaction. - Métodos não mapeados — qualquer coisa não explicitamente permitida retorna
400. Entre em contato com o suporte para solicitar adições.
Cobrança por item em lote
Mesmo quando a resposta HTTP é200, itens individuais do lote podem retornar com um campo JSON-RPC error (por exemplo, um erro de parâmetros inválidos ou um método não suportado na chain alvo). A Venice cobra esses itens em 5 créditos cada em vez do nível completo do método — uma pequena concessão para erros normais de “explorando a API”.
= 25.
Limites de taxa
Limite de requisições por minuto por chamador autenticado:| Nível | Requisições/minuto |
|---|---|
| Standard | 100 |
| Staff | 1.000 |
429 com uma customMessage e cabeçalhos de resposta padrão X-RateLimit-*.
Idempotência
Defina o cabeçalho de requisiçãoIdempotency-Key como qualquer string que corresponda a [A-Za-z0-9_-]{1,255} para permitir reenvios seguros. A resposta é armazenada em cache por 24 horas com chave (user, idempotency-key):
- Reenviar a mesma chave com o mesmo corpo retorna a resposta em cache e um cabeçalho de resposta
Idempotent-Replayed: true. O upstream não é acessado e nenhum novo crédito é cobrado. - Reenviar a mesma chave com um corpo diferente retorna
400para evitar corrupção silenciosa de estado. Escolha uma chave nova para requisições distintas.
Cabeçalhos de resposta
| Cabeçalho | Descrição |
|---|---|
X-Venice-RPC-Credits | Créditos cobrados por esta requisição. Em requisições em lote, é a soma de todos os itens. |
X-Venice-RPC-Cost-USD | Custo em dólares com 8 casas decimais. Igual a X-Venice-RPC-Credits × preço por crédito. |
X-Request-ID | ID de correlação de 32 caracteres. Inclua em qualquer correspondência de suporte. |
Idempotent-Replayed | Presente com valor "true" quando a resposta veio do cache de idempotência. |
X-RateLimit-Limit / X-RateLimit-Remaining / X-RateLimit-Reset | Definidos apenas em respostas 429. |
Logging forense para repasses de transações
Cada chamada paraeth_sendRawTransaction é registrada no lado do servidor com o hash da tx (keccak256 dos bytes brutos), o slug da rede, o ID da requisição e o ID do usuário chamador. Não retemos o payload assinado em si — o hash é recuperável a partir do recibo on-chain. Esse rastro de auditoria existe para que, se a chave de API de um cliente for comprometida e usada para repassar transações ilícitas por nossa infraestrutura, possamos correlacionar a atividade on-chain à conta responsável.
Exemplo
X-Venice-RPC-Credits: 20, X-Venice-RPC-Cost-USD: 0.00001250, X-Request-ID: <nanoid>.
Coleção do Postman
Uma coleção do Postman pronta para importar, com 27 requisições de exemplo (descoberta, chamadas padrão/avançadas/grandes, multi-chain, batching, idempotência, casos de erro), está disponível em nosso workspace público: Venice Crypto RPC — Coleção do Postman Defina a variável de coleçãoapiKey como sua chave de API Venice e comece a enviar requisições imediatamente.Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Cabeçalhos
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.
^[A-Za-z0-9_-]{1,255}$"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Parâmetros de caminho
Venice-side network slug. Call GET /api/v1/crypto/rpc/networks for the current list.
"ethereum-mainnet"
Corpo
- object
- object[]
JSON-RPC method name. See the "Supported methods" section of the endpoint description for the classification into 1×/2×/4× pricing tiers.
"eth_chainId"
2.0 "2.0"
Method parameters. Shape depends on the method; see the upstream chain documentation.
[]Caller-supplied request ID echoed back in the response. Required for batch request correlation.
1
Resposta
JSON-RPC response forwarded from the upstream node. Content-Type is forced to application/json regardless of upstream headers.