Multi-Network Support
Inodra supports multiple Sui networks. Each API key is associated with a project that targets a specific network (mainnet or testnet).
Network-Specific Endpoints
For explicit network targeting, use network-specific subdomains:
REST API & JSON-RPC
| Network | Endpoint |
|---|---|
| Mainnet | https://mainnet-api.inodra.com |
| Testnet | https://testnet-api.inodra.com |
gRPC
| Network | Endpoint |
|---|---|
| Mainnet | mainnet-grpc.inodra.com:443 |
| Testnet | testnet-grpc.inodra.com:443 |
Legacy URLs
The legacy URLs (api.inodra.com and grpc.inodra.com) automatically redirect to their mainnet equivalents:
api.inodra.com→mainnet-api.inodra.comgrpc.inodra.com→mainnet-grpc.inodra.com
WARNING
While legacy URLs continue to work via redirect, we recommend updating to network-specific URLs for new projects.
API Key Network Binding
Each API key is bound to the network configured in its project. If you make a request to a network-specific endpoint that doesn't match your API key's network, you'll receive a 403 Forbidden error:
json
{
"error": "Network mismatch",
"message": "API key is configured for testnet but request was made to mainnet-api.inodra.com. Use testnet-api.inodra.com instead.",
"code": "NETWORK_MISMATCH"
}Examples
Mainnet JSON-RPC
bash
curl -X POST https://mainnet-api.inodra.com/v1/jsonrpc \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_MAINNET_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"sui_getChainIdentifier","params":[]}'Testnet JSON-RPC
bash
curl -X POST https://testnet-api.inodra.com/v1/jsonrpc \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_TESTNET_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"sui_getChainIdentifier","params":[]}'Mainnet gRPC
bash
grpcurl -H "x-api-key: YOUR_MAINNET_API_KEY" \
mainnet-grpc.inodra.com:443 \
sui.rpc.v2.LedgerService/GetLatestCheckpointTestnet gRPC
bash
grpcurl -H "x-api-key: YOUR_TESTNET_API_KEY" \
testnet-grpc.inodra.com:443 \
sui.rpc.v2.LedgerService/GetLatestCheckpointSetting Up Projects for Different Networks
- Go to Inodra Dashboard
- Create a new project
- Select the target network (Mainnet or Testnet)
- Generate an API key for that project
- Use the network-specific endpoint with your API key