Skip to main content

0G Compute Inference

0G Compute Network provides decentralized AI inference services, supporting various AI models including Large Language Models (LLM), text-to-image generation, and speech-to-text processing.

Prerequisites

  • Node.js >= 22.0.0
  • A wallet with 0G tokens (either testnet or mainnet)
  • EVM compatible wallet (for Web UI)

Supported Service Types

  • Chatbot Services: Conversational AI with models like GPT, DeepSeek, and others
  • Text-to-Image: Generate images from text descriptions using Stable Diffusion and similar models
  • Speech-to-Text: Transcribe audio to text using Whisper and other speech recognition models

Available Services

Testnet Services
View Testnet Services (3 Available)
#ModelTypeProviderURLInput Price (per token)Output Price (per token)
1qwen/qwen-2.5-7b-instructChatbot0xa48f01...compute-network-60.00000005 0G0.0000001 0G
2openai/gpt-oss-20bChatbot0x8e60d4...compute-network-70.00000005 0G0.0000001 0G
3google/gemma-3-27b-itChatbot0x69Eb5a...compute-network-80.00000015 0G0.0000004 0G

Available Models:

  • Qwen 2.5 7B Instruct: Fast and efficient conversational model
  • GPT-OSS-20B: Mid-size open-source GPT alternative
  • Gemma 3 27B IT: Google's instruction-tuned model

All testnet services feature TeeML verifiability and are ideal for development and testing.

Mainnet Services
View Mainnet Services (7 Available)
#ModelTypeProviderInput Price (per token)Output Price (per token)
1deepseek-ai/DeepSeek-V3.1Chatbot0xd9966e...0.00000049 0G0.00000015 0G
2openai/whisper-large-v3Speech-to-Text0x36aCff...0.000000049 0G0.000000114 0G
3openai/gpt-oss-120bChatbot0xBB3f5b...0.0000001 0G0.00000049 0G
4qwen/qwen2.5-vl-72b-instructChatbot0x4415ef...0.00000049 0G0.00000049 0G
5deepseek/deepseek-chat-v3-0324Chatbot0x1B3AAe...0.0000003 0G0.000001 0G
6flux-turboText-to-Image0xE29a72...0.0 0G0.003 0G
7openai/gpt-oss-20bChatbot0x44ba50...0.00000005 0G0.00000011 0G

Available Models by Type:

Chatbots (5 models):

  • DeepSeek V3.1: Latest high-performance reasoning model
  • GPT-OSS-120B: Large-scale open-source GPT model
  • Qwen 2.5 VL 72B: Vision-language multimodal model
  • DeepSeek Chat V3: Optimized conversational model
  • GPT-OSS-20B: Efficient mid-size model

Speech-to-Text (1 model):

  • Whisper Large V3: OpenAI's state-of-the-art transcription model

Text-to-Image (1 model):

  • Flux Turbo: Fast high-quality image generation

All mainnet services feature TeeML verifiability for trusted execution in production environments.

Choose Your Interface

FeatureWeb UICLISDK
Setup time~1 min~2 min~5 min
Interactive chat
Automation
App integration
Direct API access

Best for: Quick testing, experimentation and direct frontend integration.

Installation

pnpm add @0glabs/0g-serving-broker -g

Launch Web UI

0g-compute-cli ui start-web

Open http://localhost:3090 in your browser.

Getting Started

1. Connect & Fund

  1. Connect your wallet (MetaMask recommended)
  2. Deposit some 0G tokens using the account dashboard
  3. Browse available AI models and their pricing

2. Start Using AI Services

Option A: Chat Interface

  • Click "Chat" on any chatbot provider
  • Start conversations immediately
  • Perfect for testing and experimentation

Option B: Get API Integration

  • Click "Build" on any provider
  • Get step-by-step integration guides
  • Copy-paste ready code examples

Troubleshooting

Common Issues

Error: Insufficient balance

Your account doesn't have enough funds. Add more using CLI or SDK:

CLI:

Deposit to Main Account

0g-compute-cli deposit --amount 5

Transfer to Provider Sub-Account

0g-compute-cli transfer-fund --provider <PROVIDER_ADDRESS> --amount 5

SDK:

await broker.ledger.depositFund(1);
Error: Provider not acknowledged

You need to acknowledge the provider before using their service:

CLI:

0g-compute-cli inference acknowledge-provider --provider <PROVIDER_ADDRESS>

SDK:

await broker.inference.acknowledgeProviderSigner(providerAddress);
Error: No funds in provider sub-account

Transfer funds to the specific provider sub-account:

0g-compute-cli transfer-fund --provider <PROVIDER_ADDRESS> --amount 5

Check your account balance:

0g-compute-cli get-account
Web UI not starting

If the web UI fails to start:

  1. Check if another service is using port 3090:
0g-compute-cli ui start-web --port 3091
  1. Ensure the package was installed globally:
pnpm add @0glabs/0g-serving-broker -g

Next Steps


Questions? Join our Discord for support.