Documentation

Complete guide to using the pokt.ai RPC Gateway API

Quick Start

Get started with pokt.ai in minutes

1. Get Your Endpoint ID

Sign up at pokt.ai and create an endpoint in your dashboard.

2. Make Your First Request

curl -X POST "https://pokt.ai/api/gateway?endpoint=YOUR_ENDPOINT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": 1
  }'

3. Replace YOUR_ENDPOINT_ID

Use your actual endpoint ID from the dashboard. Example: eth_1760726811471_1760726811479

API Endpoint

The main gateway endpoint for all RPC requests

POST
https://pokt.ai/api/gateway?endpoint=YOUR_ENDPOINT_ID

Request Format

All requests use standard JSON-RPC 2.0 format:

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

Response Format

Successful responses follow JSON-RPC 2.0 specification:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "..."
}

Supported Chains

27+ blockchain networks available

Ethereum
Ethereum
Chain ID: 1
eth
BNB Chain
BNB Chain
Chain ID: 56
bsc
Polygon
Polygon
Chain ID: 137
poly
Arbitrum One
Arbitrum One
Chain ID: 42161
arb-one
Optimism
Optimism
Chain ID: 10
opt
Base
Base
Chain ID: 8453
base
Avalanche
Avalanche
Chain ID: 43114
avax
Fantom
Fantom
Chain ID: 250
fantom
Gnosis
Gnosis
Chain ID: 100
gnosis
OAS
Oasys
Chain ID: 248
oasys
Linea
Linea
Chain ID: 59144
linea
Metis
Metis
Chain ID: 1088
metis
Blast
Blast
Chain ID: 81457
blast
Fraxtal
Fraxtal
Chain ID: 252
fraxtal
Boba
Boba
Chain ID: 288
boba
Kava
Kava
Chain ID: 2222
kava
SON
Sonic
Chain ID: 146
sonic
INK
Ink
Chain ID: 57073
ink
Solana
Solana
solana

All chains support standard Ethereum JSON-RPC methods. Solana uses its own RPC methods (e.g., getSlot).

Code Examples

Common use cases and code samples

Get Latest Block Number

Fetch the latest block number from Ethereum

curl -X POST "https://pokt.ai/api/gateway?endpoint=YOUR_ENDPOINT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": 1
  }'

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1234567"
}

Get Account Balance

Check the balance of an Ethereum address

curl -X POST "https://pokt.ai/api/gateway?endpoint=YOUR_ENDPOINT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getBalance",
    "params": ["0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb", "latest"],
    "id": 1
  }'

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1bc16d674ec80000"
}

Call Smart Contract

Execute a read-only contract call

curl -X POST "https://pokt.ai/api/gateway?endpoint=YOUR_ENDPOINT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [{
      "to": "0x...",
      "data": "0x..."
    }, "latest"],
    "id": 1
  }'

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x..."
}

Supported RPC Methods

Standard Ethereum JSON-RPC methods

Block Methods

  • eth_blockNumber - Get latest block number
  • eth_getBlockByNumber - Get block by number
  • eth_getBlockByHash - Get block by hash

Account Methods

  • eth_getBalance - Get account balance
  • eth_getTransactionCount - Get nonce
  • eth_getCode - Get contract code

Transaction Methods

  • eth_call - Execute contract call
  • eth_sendTransaction - Send transaction
  • eth_getTransactionReceipt - Get receipt

Network Methods

  • eth_gasPrice - Get gas price
  • eth_estimateGas - Estimate gas
  • net_version - Get network ID

All standard Ethereum JSON-RPC methods are supported. For a complete list, see the Ethereum JSON-RPC specification.

Authentication & Security

Secure your endpoints and API access

Endpoint-Based Authentication

Each endpoint has a unique ID that serves as your authentication token. Include it in the query parameter:

?endpoint=YOUR_ENDPOINT_ID

Rate Limiting

Rate limits are configurable per endpoint. Default limits are generous, but can be adjusted in your dashboard.

HTTPS Only

All API requests must use HTTPS. HTTP requests are automatically redirected to HTTPS.

Pricing

Simple, transparent pay-as-you-go pricing

$1 per 1 million requests

That's just $0.000001 per request. No hidden fees, no monthly commitments.

Usage Tracking

All requests are automatically tracked and counted. View your usage in real-time in the dashboard.

View detailed pricing →

Error Handling

Understanding error responses

JSON-RPC Errors

Errors follow the JSON-RPC 2.0 error format:

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32000,
    "message": "Error message here"
  }
}

HTTP Status Codes

  • 200 - Success
  • 400 - Bad Request
  • 401 - Unauthorized
  • 429 - Rate Limit Exceeded
  • 500 - Internal Server Error

Need Help?

We're here to help you succeed

Get Support

Have questions or need assistance? We're here to help.