The 0G mainnet is the production network. Pass network="mainnet" to create_broker() (it’s also the SDK’s default if you don’t specify a network).
Mainnet operations consume real 0G tokens. Test thoroughly on Galileo testnet before deploying to mainnet.

Network parameters

ParameterValue
Network name0G Mainnet
Chain ID16661
Token symbol0G
Block explorerchainscan.0g.ai
Ecosystem explorerexplorer.0g.ai
RPC endpointhttps://evmrpc.0g.ai
Use a third-party RPC provider for production workloads (QuickNode, ThirdWeb, Ankr). The public endpoint is rate-limited.

Compute contract addresses

The SDK resolves these automatically from the chain ID — only needed if you call contracts directly.
ContractAddress
Ledger0x2dE54c845Cd948B72D2e32e39586fe89607074E3
Inference Serving0x47340d900bdFec2BD393c626E12ea0656F938d84
Fine-tuning Serving0x4e3474095518883744ddf135b7E0A23301c7F9c0

Connect from Python

from zerog_py_sdk import create_broker

broker = create_broker(
    private_key = "0xYOUR_PRIVATE_KEY",
    network     = "mainnet",            # or omit — mainnet is the default
)
print(f"Chain ID: {broker.web3.eth.chain_id}")   # 16661

Add to MetaMask

FieldValue
Network name0G Mainnet
New RPC URLhttps://evmrpc.0g.ai
Chain ID16661
Currency symbol0G
Block explorer URLhttps://chainscan.0g.ai

Production checklist

Before sending real workloads to mainnet:
  • ✅ Run the same code paths on testnet successfully
  • ✅ Switch to a paid RPC provider for higher throughput and reliability
  • ✅ Set up monitoring on broker.ledger.get_ledger() so you don’t run out of funds mid-flight
  • ✅ Consider auto-funding for unattended services
  • ✅ Verify provider attestations with verify_service before sending sensitive prompts
  • ✅ Use persistent API keys instead of ephemeral session tokens for long-lived servers

Next steps

Testnet

Develop and test against the Galileo testnet first.

Account Management

Fund and manage your mainnet ledger.