First fully on-chain Stable Diffusion

AI that runs on-chain.

An OpenAI-compatible gateway on the Internet Computer — and home of Raven Diffusion, the first Stable Diffusion to run entirely inside a canister: deterministic, verifiable, impossible to deplatform. Built by The Raven Project.

Raven Diffusion live on mainnet  7chv3…bbq3a  ·  same seed → same image

Raven Diffusion is our own engineering — the first Stable Diffusion running fully on-chain. We built it on the ggml-on-IC foundation @onicai pioneered for on-chain LLMs (llama_cpp_canister), and generalized it to the far harder diffusion pipeline: CLIP, UNet and VAE, chunked across update calls to run deterministically inside one canister.

—
Images generated fully on-chain
—
Cycles burned (network est.)
1
On-chain model live
100%
Outputs stored on-chain
Live playground

Generate an image. Talk to a canister.

The left panel is Raven Diffusion — the first fully on-chain Stable Diffusion, engineered by The Raven Project. Weights, CLIP, UNet and VAE all execute inside the canister. The right panel streams from a language model running on-chain via @onicai’s runtime.

POST /v1/images/generationson-chain · raven-diffusion
✦ Why does it look abstract — not photographic?

You're looking at the first Stable Diffusion that runs entirely on-chain — at 64×64 in a single step. At that tiny resolution the output is impressionistic: it pulls color, mood and composition from your prompt, not sharp detail. The breakthrough isn't the picture — it's that no server, GPU or cloud touches it; every pixel is computed and verifiable on the blockchain itself. Higher resolution and multi-step detail are on the roadmap.

Ready · model raven-diffusion
Generated on-chain PNG
awaiting generate· —

You are responsible for prompts you submit and images you mint. Do not generate infringing or unlawful content. AI outputs are deterministic on-chain. Copyright & takedowns · Acceptable use.


        
POST /v1/chat/completionslive router

Loading models…


Model catalog

Two planes, one endpoint.

Pick any model by id. Off-chain models give you speed and frontier quality; on-chain models give you something no other router can — inference that cannot be deplatformed and can be verified.


Wallet

Fund usage with ICP and Chain-Key tokens.

Sign in with Internet Identity to see balances, send tokens, and buy generation credits. Credit packs accept ICP, ckBTC, ckETH, and ckUSDC (priced live from on-chain ICPSwap quotes), or deposit cycles into the TRP meter canister so diffusion jobs draw from your credits instead of draining shared beta quota.

Receive (all tokens)—
Meter credits (legacy T-cycle meter)—

Buy generation credits

Utility credits only — one credit = one on-chain Raven Diffusion image. Pay with ICP or enabled ICRC tokens (live ICPSwap quote on mainnet).

Paid credits—

One-time purchase — no subscription, no auto-renewal, no recurring charge.

Send tokens

ICRC-1 transfer to any principal (same address you use to receive).

Available —

Deposit cycles to meter

Attach trillion-cycle (T) bundles to 6gk2j-eiaaa-aaaao-bbq5a-cai via deposit_cycles.

Your NFTs

ICRC-7 Raven Diffusion tokens tied to your Internet Identity.


Admin

Usage & health

On-chain generation counters, meter budget, and router status. Sign in with an allowlisted Internet Identity principal.

Admin view is hidden until you sign in.

Client-side allowlist is for UX only — not a security boundary.


Resilience

It doesn't go down when one provider does.

Every provider is health-checked with a circuit breaker. When a route fails, the router reroutes automatically. Try it.

cloudflare
99.9%
gemini
98.4%
pollinations
97.1%
onicai · on-chain
100%
All routes healthy · circuit breakers closed

How it works

The control plane is a canister.

Credits, gating, routing and storage live on-chain. The router picks a plane per request: on-chain for verifiable models, off-chain for frontier speed. Outputs are written to on-chain blob storage and served from the Internet Computer.

Your app OpenAI SDK router_canister credits · gating · routing pricing · policy onicai canister on-chain LLM providers openai · flux · gemini blob_store on-chain outputs on-chain plane off-chain plane

Developer quickstart

Point your SDK at the Raven.

If it speaks OpenAI, it speaks TRP Router. Change one line. The free tier is open now; TRP credits arrive at token launch.

# one line changes — the rest is the OpenAI SDK you already use
from openai import OpenAI
client = OpenAI(base_url="https://trp-router.icp0.io/v1", api_key="trp_free")

# off-chain image, stored on-chain
img = client.images.generate(model="trp/image-standard", prompt="a raven over gold")

# chat with a model running inside a canister
chat = client.chat.completions.create(
    model="trp/onchain-qwen-0.5b",
    messages=[{"role":"user", "content":"hello from the Internet Computer"}])

For holders & builders

Hold a Raven. Build for free.

PepperHead, Bonsai and Raven NFT holders get a standing free tier, verified against your own wallet. Paid credits in TRP arrive when the token launches.

NFT holders

Free daily generations, gated to the token you actually hold — PepperHead, Bonsai or Raven. No new registry, no trust in a dashboard.

Builders

Bring your own provider key and pay zero router fee, or use the open free tier. Presets, teams and usage analytics, all on-chain.

At token launch coming

Top up credits with TRP (and ckBTC/ckSOL/ICP), or stake TRP to earn credits over time. Utility only — details with the relaunch.


Proof of on-chain

Don't trust it. Check it.

The on-chain model is a published, pinned binary you can verify yourself against onicai's official release.

Model canisterlm4fb-uh777-77777-aaacq-cai
Runtime wasmonicai llama_cpp · release v0.22.0
Wasm sha-256acb02b81a91b281f6514704b9acb0c4a6cfe0d992ca12381dbc11140e1dbc7ee
ModelQwen2.5-0.5B-Instruct q8_0 · 675,710,816 B
Model sha-256ca59ca7f13d0e15a8cfa77bd17e65d24f6844b554a7b6c12e07a5f89ff76844e

Verifiable by design

The weights sit in on-chain stable memory. The wasm hash matches onicai's published v0.22.0 release byte for byte. Every completion is produced by the replica — not fetched from a server we ask you to believe in.

↳ matches onicai official release