Getting started
What is 0G Private Computer Cookbook
Section titled “What is 0G Private Computer Cookbook”0G Private Computer is an AI inference API. You call one endpoint, and requests are served by independent providers running models on the 0G network inside hardware-isolated enclaves. It speaks the OpenAI API, so most existing client code works after changing one base URL.
This Cookbook is the task-oriented guide to using that API. Every page is a task: fund an account, send a request, seal a prompt inside an enclave, prove a response came from the model you asked for, cap what a call may cost, harden a deployment. Concepts are here too, but only the four that explain something you will actually hit on the API surface.
Three names for three things
Section titled “Three names for three things”The same system is described with different words depending on which layer you are looking at. They are not alternatives to each other:
| Name | What it refers to |
|---|---|
| 0G Compute Network | The network underneath: independent operators running GPUs, registering on-chain, and settling payments. |
| 0G Private Computer | The product you use — the Console at pc.0g.ai plus the inference API on top of that network. |
| the Router | The API gateway itself, at https://router-api.0g.ai/v1. This documentation says “the Router” when it means the thing your code talks to. |
The Cookbook and 0G Documentation
Section titled “The Cookbook and 0G Documentation”0G Documentation is the reference for the network and its APIs. The Cookbook is where you come to get something built. They answer different questions, and neither repeats the other.
| 0G Documentation | This Cookbook | |
|---|---|---|
| Covers | Why the network exists, how the decentralized marketplace and on-chain settlement work, how providers register and earn, and the Router API reference | Tasks: fund an account, send a request, seal a prompt, verify a response, cap a cost, survive a provider outage, ship |
| Shape | Reference — read a page, look something up | Recipes — copy something that runs, then adapt it |
| Typical question | “How does this system work?” | “How do I do this, and what breaks when I do?” |
Practically: when you need the definitive statement about the network or a protocol-level detail, go there. When you need working code and the failure modes around it, stay here. Cookbook pages link out rather than restate.
What this section solves
Section titled “What this section solves”Getting to a first successful call takes one step that has no equivalent at a hosted AI provider: billing runs on an on-chain balance, so you fund the account before you write any code. No card, no invoice, no free tier to lean on. That is the step people get stuck on, so it has a page of its own and comes before the code.

The first two stages are one-time setup. The last two are what you do every day after that.
| Page | When you need it | What it solves |
|---|---|---|
| Why 0G Private Computer | You are deciding whether a workload belongs here, or explaining that decision to someone else | Sovereignty, privacy, verifiable execution, and zero data retention — each with the check that confirms it |
| Get 0G and fund your account | You have no balance yet, which is everyone at first | Acquiring 0G, connecting a wallet, depositing, and what a deposit does and does not let you do later |
| Quickstart | The account is funded and you want a response back | Creating an API key and making the first call, including how to read the trace block that comes with it |
| Migrate your client | You already have working OpenAI or Anthropic code | What changes (a base URL and a key), and what the 0G extensions add without breaking your parser |
| Stream responses | The first call worked and you want tokens as they arrive | Streaming in three languages, and what to do when a stream breaks halfway |
Where to start
Section titled “Where to start”If you have never held 0G, go to Get 0G and fund your account — nothing else works until a balance exists, and it is the longest step. If you are funded already, Quickstart is five minutes. If you are porting an existing integration, read Migrate your client first and treat Quickstart as the thing you run to confirm the key works.
If you are here to evaluate rather than to build, Why 0G Private Computer is the page to read and to forward, and Trust modes is where the guarantees become concrete.
Related
Section titled “Related”- Concepts — why the API behaves the way it does
- Best practices — the gap between a working request and a deployment you can leave running
- Troubleshooting — when a call fails and you want the cause, not the code table