API Gateways
Inodra provides multiple ways to access Sui blockchain data. One API key works across all gateways.
Gateway Types Overview
| Gateway | Best For | Infrastructure |
|---|---|---|
| gRPC | Low-latency RPC proxy | Inodra-managed Sui gRPC nodes |
| JSON-RPC | Sui JSON-RPC gateway | Inodra-managed Sui RPC nodes |
| GraphQL | Flexible query proxy | Inodra-managed Sui GraphQL infra |
| REST | Indexed data & analytics | Inodra's indexed blockchain data |
Quick Example
Instead of connecting directly to Sui:
bash
# Instead of calling Sui directly:
curl -X POST https://fullnode.mainnet.sui.io:443 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"sui_getLatestCheckpointSequenceNumber","params":[]}'
# Call through the Inodra gateway with your API key:
curl -X POST https://api.inodra.com/v1/jsonrpc \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"sui_getLatestCheckpointSequenceNumber","params":[]}'Authentication
Include your API key using one of these methods:
x-api-key: YOUR_API_KEYheader (recommended)Authorization: Bearer YOUR_API_KEYheader (alternative)
For gRPC, send the API key as metadata.
javascript
const headers = {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
}bash
# gRPC (using grpcurl)
grpcurl -H "x-api-key: YOUR_API_KEY" grpc.inodra.com:443 listWhy Use Inodra
- No node setup: Start making requests immediately
- One API key: Works across all gateways
- Usage tracking: Monitor your API usage in the dashboard
- Reliable: We handle uptime so you can focus on building
Quick Start Examples
JavaScript/Node.js
javascript
// Using JSON-RPC Gateway
const response = await fetch('https://api.inodra.com/v1/jsonrpc', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
jsonrpc: '2.0',
id: 1,
method: 'sui_getLatestCheckpointSequenceNumber',
params: []
})
})
const data = await response.json()
console.log('Latest checkpoint:', data.result)Python
python
import requests
# Using REST Gateway
response = requests.get(
'https://api.inodra.com/v1/checkpoints?limit=1',
headers={'x-api-key': 'YOUR_API_KEY'}
)
checkpoints = response.json()
print(f"Latest checkpoint: {checkpoints['data'][0]['sequenceNumber']}")curl
bash
# Test any gateway quickly
curl -H "x-api-key: YOUR_API_KEY" \
https://api.inodra.com/v1/checkpoints?limit=1Choose Your Gateway
Select the gateway that best fits your application's needs:
- JSON-RPC Gateway - Drop-in Sui JSON-RPC over HTTP
- GraphQL Gateway - Pass-through to Sui GraphQL (HTTP POST)
- gRPC Gateway - Proxy to Sui gRPC (reflection enabled)
- REST API Gateway - Indexed reads exposed via HTTP
All gateways provide the same underlying Sui data - the choice is about which protocol and interface works best for your use case.
🚀 Ready to start?
Get your free API key - one key works across all gateways.