Build on the dark layer.
Everything you need to integrate with PAI — from protocol fundamentals to running your first validator node.
Protocol Overview
What PAI is
PAI is a privacy-preserving decentralized AI network. It combines zero-knowledge cryptography with a Proof of Useful Work consensus mechanism — replacing arbitrary hash puzzles with real AI compute tasks, while keeping all inputs, outputs, and identities cryptographically shielded.
The network is permissionless. Any developer can submit encrypted workloads. Any machine with sufficient GPU/TPU capacity can become a validator node. No KYC, no whitelists, no centralized routing.
Why it exists
Frontier AI models — GPT-4, Claude, Gemini, DeepSeek R1, Llama 3 — are controlled by a handful of hyperscalers. Running inference or fine-tuning on these systems means handing your data, prompts, and model weights to a third party. For enterprise, research, or sensitive applications, that's a non-starter.
PAI solves this by routing AI workloads through a decentralized network of validators who prove they executed the task correctly — without ever seeing the task itself. The cryptographic proof is the receipt. The network is the cloud.
Core components
ZK Privacy Layer: Shielded transactions and data pipelines using zk-SNARKs. Sender, receiver, prompt content, and model weights are blinded before commitment to the distributed state machine.
PoUW Consensus: Validators compete to execute real AI tasks — matrix multiplications, gradient descents, inference passes — rather than SHA-256 hash loops. Work is useful by definition.
Decentralized Marketplace: Consumers lock PAI tokens into escrow alongside a task payload. Validators claim tasks, execute them, and submit a Proof of Execution (PoE) to unlock rewards.
Burn-and-Mint Equilibrium: A percentage of every task fee is burned, reducing supply. The remainder funds block rewards and the open-source model development treasury.
ZK Architecture
zk-SNARKs: the foundation
A zk-SNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) is a cryptographic proof that lets one party prove they know or computed something, without revealing what that something is. The proof is tiny — typically under 1KB — and verifies in constant time regardless of the complexity of the underlying computation.
Zcash pioneered the use of zk-SNARKs in a live blockchain in 2016, using the Groth16 proving system to shield transaction amounts and addresses. PAI extends this model to AI compute: instead of proving 'I know the preimage of this hash', validators prove 'I correctly executed this neural network forward pass on this encrypted input'.
The PAI proving system is built on a modified Groth16 circuit with custom gates for tensor operations — matrix multiply, ReLU, softmax, and attention. This allows the prover to generate a validity witness for a full transformer inference pass in a single proof.
Zcash's Groth16 proof system requires a one-time trusted setup ceremony. PAI uses a universal setup (PLONK-based) that eliminates this requirement — no ceremony, no trusted parameters.
Shielded data pipelines
When a consumer submits a task, the payload is encrypted using the network's shared public key before it leaves the client. The encrypted blob is committed to the chain. No validator — including the one that executes the task — ever sees the plaintext prompt, dataset, or model weights.
Execution happens inside a Trusted Execution Environment (TEE) on the validator's hardware. The TEE decrypts the payload in an isolated enclave, runs the computation, re-encrypts the output, and generates the PoE proof — all without the host machine's OS or operator having access to the plaintext.
The consumer decrypts the result using their private key. The validator receives their reward. The chain records only: task hash, proof hash, block height, fee burned. Nothing else is public.
Proof of Execution (PoE)
The PoE is a sub-1KB zk-SNARK statement that certifies: (1) the validator received the correct encrypted payload, (2) the computation was executed faithfully according to the circuit definition, and (3) the output was correctly re-encrypted for the consumer.
Verification is O(1) — under 5ms on any modern CPU, completely invariant to model size. A proof for a 70B parameter inference pass verifies in the same time as a proof for a 7B pass. This is the core scalability property of the system.
Invalid proofs are rejected at the consensus layer before block inclusion. A validator that submits a fraudulent proof loses their staked PAI. There is no slashing committee — the math is the judge.
Proof of Useful Work
Why PoW is broken
Bitcoin's SHA-256 Proof of Work is a masterpiece of incentive design — but the work itself is thermodynamically wasteful. Miners burn electricity to compute hashes that have no value outside the consensus game. The Cambridge Bitcoin Electricity Consumption Index estimates Bitcoin mining consumes more electricity annually than many mid-sized countries.
Ethereum's move to Proof of Stake in 2022 (The Merge) reduced its energy consumption by ~99.95%, but PoS introduces a different problem: capital concentration. Validators with more stake earn more rewards, compounding wealth inequality over time. Neither system produces anything useful as a byproduct of consensus.
Bitcoin's SHA-256 difficulty adjusts every 2,016 blocks (~2 weeks) to target a 10-minute block time. The computation is intentionally useless — its only purpose is to make blocks expensive to produce. PAI replaces this with AI compute that has independent economic value.
Useful work as consensus
PAI's PoUW replaces hash puzzles with AI compute tasks. Validators compete to execute real workloads — matrix multiplications, stochastic gradient descent steps, transformer inference passes. The 'work' in Proof of Work is now the work the network was hired to do.
This is not a new idea in theory. Primecoin (2013) used prime number searches. Gridcoin used BOINC scientific compute. But these systems lacked a way to verify that the work was done correctly without re-executing it — which defeats the purpose. zk-SNARKs solve this: the PoE proof is the verification, and it's cheap.
Dynamic difficulty: The network adjusts task complexity continuously based on the backlog of pending compute requests. High demand raises difficulty (and rewards). Low demand lowers it. The system is self-regulating.
Hardware requirements
Minimum: NVIDIA RTX 3090 or equivalent (24GB VRAM), 64GB system RAM, 2TB NVMe SSD, 1Gbps symmetric internet connection.
Recommended: NVIDIA A100 80GB or H100 80GB, 256GB system RAM, 4TB NVMe RAID, 10Gbps connection. Multi-GPU setups are supported and increase task throughput proportionally.
TEE support: Intel SGX or AMD SEV is required for shielded task execution. Most server-grade CPUs from 2020 onward support one of these. Consumer CPUs with SGX (Intel 10th gen+) are sufficient for testnet participation.
Validator Setup
Prerequisites
Before running a validator node, ensure your machine meets the hardware requirements above and has a supported OS: Ubuntu 22.04 LTS or Debian 12. Docker 24+ and NVIDIA Container Toolkit are required for GPU passthrough.
You will need a PAI wallet address with sufficient staked PAI to participate in consensus. Minimum stake requirements will be published at mainnet launch. Testnet participation requires no stake.
Testnet quickstart
The PAI testnet is currently in closed alpha. Validator access is granted to waitlist applicants in order of signup. Once approved, you will receive a validator key and testnet PAI allocation via the email you registered with.
Full CLI documentation, Docker Compose configs, and monitoring dashboards will be published alongside the public testnet launch. Join the waitlist to be notified.
Testnet is in closed alpha. The commands below reflect the planned setup flow — exact flags may change before public launch.
# Testnet validator quickstart (Ubuntu 22.04) # Full docs published at testnet launch # 1. Install Docker + NVIDIA Container Toolkit curl -fsSL https://get.docker.com | sh distribution=$(. /etc/os-release; echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - sudo apt-get install -y nvidia-container-toolkit # 2. Pull the PAI validator image docker pull ghcr.io/pai-protocol/validator:testnet # 3. Run with your validator key docker run -d \ --gpus all \ -e PAI_VALIDATOR_KEY=<your-key> \ -e PAI_NETWORK=testnet \ -p 9000:9000 \ ghcr.io/pai-protocol/validator:testnet
Reward structure
Validators earn two revenue streams: block subsidies (fixed PAI per block, halving schedule) and task execution fees (dynamic, proportional to Compute Units consumed). Task fees scale with VRAM usage, compute clock time, and RAM bandwidth — a high-end H100 node earns significantly more per task than a minimum-spec node.
Routing priority is proportional to hardware performance metrics. The network preferentially routes high-value tasks to high-performance validators. There is no manual bidding — the protocol handles allocation automatically.
API Reference
Status
The PAI developer API is in closed alpha. Endpoints, authentication, and SDK documentation will be published at public testnet launch. The API will be REST + WebSocket, with official SDKs for Python, TypeScript, and Rust.
Core endpoints planned: POST /v1/tasks (submit encrypted workload), GET /v1/tasks/:id (poll task status and retrieve encrypted result), GET /v1/network/stats (live network metrics), POST /v1/proofs/verify (verify a PoE proof against a task hash).
// Install the PAI SDK (available at testnet launch)
// npm install @pai-protocol/sdk
import { PAIClient } from '@pai-protocol/sdk';
const client = new PAIClient({
privateKey: process.env.PAI_PRIVATE_KEY,
network: 'testnet',
});
// Submit an encrypted inference task
const task = await client.tasks.submit({
model: 'meta-llama/Llama-3-70b-instruct',
prompt: 'Explain zk-SNARKs to a 10-year-old.',
maxTokens: 512,
});
// Poll for result (or use WebSocket subscription)
const result = await task.wait();
console.log(result.output); // decrypted locally — validator never saw thisTask submission flow
1. Encrypt your payload (prompt, dataset, model config) using the network public key. The PAI SDK handles this automatically.
2. Submit the encrypted blob to POST /v1/tasks with your PAI wallet signature and fee authorization. The task is committed to the mempool.
3. A validator claims the task, executes it inside a TEE, and submits the PoE proof. The task status transitions to PROVEN.
4. Retrieve the encrypted result from GET /v1/tasks/:id. Decrypt locally using your private key. The validator never saw your data.
# Task submission
POST /v1/tasks
Authorization: Bearer <pai-wallet-signature>
Content-Type: application/json
{
"payload_encrypted": "<base64-encrypted-blob>",
"fee_authorization": "<signed-fee-vector>",
"model_circuit": "llama3-70b-v1",
"compute_units": 1200
}
# Response
{
"task_id": "0x4a3f...",
"status": "PENDING",
"estimated_proof_time_ms": 4200
}Context & Comparisons
The frontier model problem
DeepSeek R1 (2025) demonstrated that a Chinese lab could train a frontier reasoning model for under $6M — a fraction of what OpenAI or Google spend. Llama 3 (Meta, 2024) proved that open weights at 70B+ parameters are competitive with closed models. HuggingFace hosts over 900,000 public models as of 2026.
The model layer is commoditizing. The bottleneck is now compute access and data privacy. Running a 70B model requires 140GB of VRAM — four A100s or two H100s. Most organizations can't afford that infrastructure, and those that can are forced to use hyperscaler APIs that log every query.
PAI's decentralized compute layer solves both problems simultaneously: access (anyone can submit a task, any GPU owner can earn by serving it) and privacy (zk-SNARKs ensure the compute provider never sees the data).
DeepSeek R1 was trained on 2,048 H800 GPUs over ~55 days at an estimated cost of $5.6M. GPT-4 is estimated to have cost over $100M. The gap is closing fast — the compute access problem is the next frontier.
ZK lineage: from Zcash to PAI
Zcash (2016) was the first production deployment of zk-SNARKs in a blockchain. Its Sapling upgrade (2018) reduced proof generation time from 40 seconds to under 2 seconds and memory requirements from 3GB to 40MB — making shielded transactions practical on consumer hardware.
Ethereum's zkEVM projects (Polygon zkEVM, zkSync Era, Scroll) extended zk-proofs to general smart contract execution. StarkWare's STARK-based systems removed the trusted setup requirement. The proving infrastructure has matured dramatically since Zcash's launch.
PAI inherits this lineage and extends it to AI compute circuits. The key innovation is custom circuit gates for tensor operations — the mathematical primitives that underlie all modern neural networks. This makes it possible to generate a validity proof for a full model inference pass, not just a simple arithmetic statement.
Decentralized AI landscape
Bittensor (TAO) operates a transparent incentive marketplace across subnets. Validators score miners on output quality. The system works well for open tasks but has no privacy layer — all payloads and outputs are public. Enterprise and research use cases requiring confidentiality are out of scope.
Prime Intellect's INTELLECT-1 (2024) demonstrated distributed training of a 10B parameter model across 112 nodes in 35 countries — the first open, globally distributed frontier model training run. PAI's architecture is designed to serve as the private execution layer for exactly this kind of distributed training pipeline.
Nous Research's Hermes and other open agent frameworks represent the demand side of the PAI marketplace: autonomous agents that need to run inference privately, at scale, without routing sensitive context through a centralized API. PAI is the infrastructure layer these systems have been missing.
Ready to build?
API access opens with the public testnet. Join the waitlist for early developer slots.