Skip to content

Latest commit

 

History

409 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compute Network

Uncensored, private, decentralized AI inference.

Compute Network is an inference network where the GPUs are contributed, not rented. Anyone can plug a machine in and earn for the tokens it serves; anyone can run a model through an OpenAI-compatible API without an account gate, without prompts being stored in the application database. A narrow server-side legal-safety filter blocks CSAM-related requests before dispatch. The network is coordinated by a thin orchestrator and settled on Solana through the $ZERO token.

It is built on three pillars, and every feature is measured against all three:

  • Uncensored — the only hard line is illegal content (CSAM). There is no model-level refusal layer, but the orchestrator does run a narrow CSAM keyword filter before dispatch.
  • Private — prompts and generated images are not stored in the application database. Operational logs and job metadata can still include user/job identifiers for billing and debugging.
  • Decentralized — inference runs on contributor GPUs (browser via WebGPU, or native via Ollama), not on centralized infrastructure. Payouts settle on-chain.

How it works

  user / API client
        │  prompt
        ▼
  ┌───────────────┐      job          ┌──────────────────────┐
  │  web + API    │ ───────────────▶  │  orchestrator (ws)   │
  │  (Next.js)    │                   │  routing, billing,    │
  │  credits,     │ ◀───────────────  │  anti-cheat, payouts  │
  │  auth (Privy) │   streamed tokens └──────────┬───────────┘
  └───────────────┘                              │ dispatch
                                                 ▼
                                    ┌─────────────────────────┐
                                    │  contributor GPU workers │
                                    │  browser (WebGPU) /      │
                                    │  native (Ollama)         │
                                    └─────────────────────────┘

  $ZERO keeper ── claims creator fees ─▶ buyback + burn  +  staker reward distribution
  • Web + API (app/, Next.js) — chat UI, image generation, credits, staking dashboard, and an OpenAI-compatible REST API.
  • Orchestrator (server/, lib/orchestrator/) — a WebSocket server that queues jobs, routes them to the fastest idle worker, deducts credits before dispatch, streams tokens back, and runs the worker anti-cheat (canary probes + coherence + throughput checks).
  • Workers (c0mpute-worker/) — the agent a contributor runs to serve inference. Native workers auto-install their runtime; browser workers run models in-tab over WebGPU.
  • Keeper (scripts/keeper.ts, lib/keeper/) — a scheduled job that claims $ZERO creator fees, buys back and burns $ZERO, and distributes USDC rewards to stakers.
  • On-chain (lib/onchain-staking.ts, lib/payout.ts) — staking, custodial deposit wallets, and USDC payouts on Solana.

API

OpenAI-compatible. Point any OpenAI client at the Compute Network base URL and use a sk-c0mpute-… key.

curl https://c0mpute.ai/api/v1/chat/completions \
  -H "Authorization: Bearer sk-c0mpute-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.8-27b-uncensored",
    "messages": [{"role": "user", "content": "explain entropy in one line"}],
    "stream": true
  }'

GET /api/v1/models lists available models. Image generation is exposed at POST /api/images/generate.

Running it

Requirements: Node 20+, a Solana RPC URL, and a Privy app for auth.

npm install
cp .env.local.example .env.local   # fill in the values below
npm run dev:all                    # Next.js web + orchestrator together
script what it runs
npm run dev Next.js web/API only
npm run dev:server orchestrator (WebSocket) only
npm run dev:all both, concurrently
npm run start:keeper the $ZERO buyback/burn/rewards keeper
npm run build production build (memory-safe wrapper)

Core environment variables (see .env.local.example for the full list):

var purpose
NEXT_PUBLIC_PRIVY_APP_ID / PRIVY_APP_SECRET auth
SOLANA_RPC_URL Solana RPC endpoint
ZERO_TOKEN_MINT the $ZERO mint
TREASURY_WALLET_KEY / DEPOSIT_WALLET_KEY custodial payout + deposit wallets (keep off-repo)
INTERNAL_API_SECRET web↔orchestrator trust
ADMIN_SECRET admin dashboard gate

Secrets live in .env.local (gitignored). Never commit a wallet key.

Tech

Next.js 16 (App Router) · React 19 · TypeScript · socket.io · better-sqlite3 · Solana (@solana/kit, @coral-xyz/anchor, @pump-fun/pump-swap-sdk) · Privy auth · web-llm (WebGPU) · Ollama (native workers).

Repository layout

app/                Next.js routes + API (app/api/v1 is the OpenAI-compatible surface)
server/             orchestrator entrypoint
lib/                core logic: orchestrator, keeper, staking, payouts, db, crypto
lib/orchestrator/   job routing, billing, worker anti-cheat
lib/keeper/         on-chain buyback/burn + reward distribution
c0mpute-worker/     the contributor worker (browser + native)
scripts/            keeper, db backup, seed, state sync
docs-site/          documentation site

License

TBD.

About

Uncensored, private, decentralized AI inference on Solana.

Resources

Stars

74 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages