Skip to content

API Gateways

Inodra provides multiple ways to access Sui blockchain data. One API key works across all gateways.

🔑 New to Inodra?

Create your free API key to start making requests right away.

Gateway Types Overview

GatewayBest ForInfrastructure
gRPCLow latency, streaming, full history (native gRPC & gRPC-Web)Inodra-managed Sui nodes + archival storage
GraphQLFlexible queries, full historyInodra-hosted Sui GraphQL + archival storage
JSON-RPC (deprecated)Sui JSON-RPC gatewayInodra-managed Sui RPC nodes

Quick Example

Instead of connecting directly to Sui:

bash
# Instead of calling Sui directly:
curl -X POST https://graphql.mainnet.sui.io/graphql \
  -H "Content-Type: application/json" \
  -d '{"query": "{ chainIdentifier }"}'

# Call through the Inodra gateway with your API key:
curl -X POST https://mainnet-api.inodra.com/v1/graphql \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"query": "{ chainIdentifier }"}'

Authentication

Include your API key using one of these methods:

  • x-api-key: YOUR_API_KEY header (recommended)
  • Authorization: Bearer YOUR_API_KEY header (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" mainnet-grpc.inodra.com:443 list

Why 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 GraphQL Gateway
const response = await fetch('https://mainnet-api.inodra.com/v1/graphql', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query: '{ checkpoint { sequenceNumber } }'
  })
})

const data = await response.json()
console.log('Latest checkpoint:', data.data.checkpoint.sequenceNumber)

Python

python
import requests

# Using GraphQL Gateway
response = requests.post(
    'https://mainnet-api.inodra.com/v1/graphql',
    headers={'x-api-key': 'YOUR_API_KEY'},
    json={'query': '{ checkpoint { sequenceNumber } }'}
)

result = response.json()
print(f"Latest checkpoint: {result['data']['checkpoint']['sequenceNumber']}")

curl

bash
# Test any gateway quickly
curl -X POST https://mainnet-api.inodra.com/v1/graphql \
     -H "x-api-key: YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"query": "{ chainIdentifier }"}'

Choose Your Gateway

Select the gateway that best fits your application's needs:

  • gRPC Gateway - Proxy to Sui gRPC - native gRPC for servers and gRPC-Web for browsers on the same endpoint (reflection enabled)
  • GraphQL Gateway - Pass-through to Sui GraphQL (HTTP POST)
  • JSON-RPC Gateway (deprecated) - Drop-in Sui JSON-RPC over 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.

Released under the MIT License.