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)
#ModelTypeProviderInput (per 1M tokens)Output (per 1M tokens)
1qwen-2.5-7b-instructChatbot0xa48f01...0.05 0G0.10 0G
2gpt-oss-20bChatbot0x8e60d4...0.05 0G0.10 0G
3gemma-3-27b-itChatbot0x69Eb5a...0.15 0G0.40 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 (per 1M tokens)Output (per 1M tokens)
1DeepSeek-V3.1Chatbot0xd9966e...0.49 0G1.50 0G
2deepseek-chat-v3-0324Chatbot0x1B3AAe...0.30 0G1.00 0G
3gpt-oss-120bChatbot0xBB3f5b...0.10 0G0.49 0G
4qwen2.5-vl-72b-instructChatbot0x4415ef...0.49 0G0.49 0G
5gpt-oss-20bChatbot0x44ba50...0.05 0G0.11 0G
6whisper-large-v3Speech-to-Text0x36aCff...0.05 0G0.11 0G
7flux-turboText-to-Image0xE29a72...-0.003 0G/image

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.