Documentation · Live on the Internet Computer

The AI gateway that runs on-chain.

TRP Router is an OpenAI-compatible gateway for both worlds of AI — frontier models with automatic failover, and models that execute entirely inside a blockchain and cannot be deplatformed. Home of Raven Diffusion, the first Stable Diffusion to run fully on-chain.

01 — Overview

What is TRP Router?

One endpoint, two planes of AI. Point any OpenAI-compatible client at TRP Router and reach a menu of models by id — routed intelligently, with on-chain options no other gateway offers.

Off-chain plane — speed & frontier quality

OpenAI, Flux, Gemini and more, behind health-checked automatic failover. One provider degrades, the next serves — your call never notices.

On-chain plane — verifiable & unstoppable

Models that run inside Internet Computer canisters: Raven Diffusion for images and on-chain LLM inference. Deterministic, checkable by module hash, impossible to switch off.

OpenAI-compatible

Drop-in. Change the base URL and keep your existing client code.

Reverse-gas

The canisters pay their own cycles. Users need no wallet and pay no gas to try it.

The gateway is a canister

Routing itself runs on-chain — 5723t-oaaaa-aaaao-bbquq-cai.

02 — Why it's different

Why TRP Router is needed

Conventional AI routers are convenient, but they live entirely on servers someone else controls — the same single point of failure, censorship and lock-in you were trying to avoid by using many providers. TRP Router keeps the convenience and adds something only an on-chain gateway can.

Models that can't be deplatformed

On-chain models run on a public network. There is no server to seize, no account to ban, no off switch. Your app keeps working regardless of any one company's decisions.

Verify, don't trust

On-chain inference is deterministic and auditable. Anyone can reproduce an output and confirm the exact binary that produced it by its hash. A server-based router can only ask you to take its word.

One API across both worlds

Frontier off-chain models and censorship-resistant on-chain models behind a single OpenAI-compatible endpoint, with automatic failover across providers.

No wallet to try

Reverse-gas means a first-time visitor just types a prompt — no sign-up, no keys, no gas. The network covers the compute.

The short version: other routers give you many servers behind one API. TRP Router gives you that plus a class of models that no server owns — verifiable, reproducible, and beyond anyone's power to take down.
03 — The flagship

Raven Diffusion

The first Stable Diffusion that runs entirely inside a blockchain. No GPU in a datacenter, no API server — the Internet Computer's own replicas compute every pixel. The ~1.73 GB model lives in on-chain memory, and the full CLIP → UNet → VAE pipeline runs in slices across update calls, under consensus.

Every generation is a collectible

Each image mints as a transferable ICRC-7 / ICRC-37 NFT, with its full provenance (prompt, seed, source canister, module hash, SHA-256) recorded on-chain and the artwork served from the canister itself. These are the first fully-on-chain-generated images — held, transferred, and traded like any ICP NFT.

NFT collection
Raven Diffusion (RAVEN) · 62oay-tiaaa-aaaao-bbq7a-cai
Standards
ICRC-7 · ICRC-37 · ICRC-10
Token image
https://62oay-tiaaa-aaaao-bbq7a-cai.raw.icp0.io/token/<id>.png
04 — How to use

Quickstart

No wallet, no sign-up to generate. Mint and hold with Internet Identity.

1

Open the Playground. Type a prompt (or pick an example) and hit Generate. The image is computed on-chain in ~30 seconds and rendered with its verifiable provenance.

2

Verify it. Copy the one-line dfx command to confirm the exact model the canister is running, or regenerate with the same seed to prove determinism.

3

Download or mint. Save the PNG, or sign in with Internet Identity and mint it as a transferable NFT to your own wallet.

05 — For developers

Build on TRP Router

It speaks the OpenAI API. Point your client at the Router and pick a model by id.

Generate an image (OpenAI-compatible)

from openai import OpenAI

client = OpenAI(base_url="https://5723t-oaaaa-aaaao-bbquq-cai.icp0.io/v1", api_key="<key>")
img = client.images.generate(
    model="raven-diffusion",          # fully on-chain
    prompt="a raven over a neon city",
    # seed is first-class → deterministic, reproducible output
)

Raw HTTP

POST /v1/images/generations
# body:
{ "model": "raven-diffusion", "prompt": "...", "seed": 4242 }

# response carries OpenAI's shape + trust fields:
"sha256", "canister", "module_hash", "deterministic": true

Verify any output yourself

# confirm the exact model the canister is running
dfx canister info 7chv3-5iaaa-aaaao-bbq3a-cai --network ic
# expect module hash 0xd89a560af45e5a39b5e2ef1572152215b0c78c7690e3af997cb2ff780694c513

Image model

raven-diffusion — on-chain, deterministic, 64×64 (beta).

On-chain chat

/v1/chat/completions with an on-chain LLM running via @onicai's runtime.

NFT API

ICRC-7 / ICRC-37 on 62oay… — mint, metadata, transfer, approvals.

Built on open foundations. Raven Diffusion is our own engineering, built on the ggml-on-IC foundation @onicai pioneered for on-chain LLMs (llama_cpp_canister), generalized to the far harder diffusion pipeline.
06 — Token

$TRP — utility & governance

$TRP is the utility and governance token of The Raven Project. It is for using and steering the network — generation credits and a vote — not a promise of return.

Pay for generations — at a discount

Generations can be paid in ICP, or in $TRP for a meaningful discount. Using the token is cheaper, which creates steady, usage-driven demand.

Govern the network

Vote on which models the Router adds, pricing and free-tier parameters, treasury allocation, featured collections and the roadmap.

Stake for perks

Stake $TRP for governance weight, a monthly free-generation allotment, higher-resolution access, priority, and fee rebates.

Deflationary by use

A share of every $TRP spent on generations is burned, and treasury revenue funds buy-back-and-burn — so real usage tightens supply.

The flywheel

gen-erate ICPrev. trea-sury burn+dev
1

People generate images; payments come in (ICP now, $TRP at a discount after launch).

2

A slice converts to cycles that power the on-chain compute; the remainder flows to the treasury.

3

Treasury funds development and buy-back-and-burn of $TRP, tightening supply.

4

More models and utility arrive → more generations → more token demand. Repeat.

Launch. $TRP will launch and integrate through LGE SONS on the OHSHII Launcher, an ICP-native launchpad. Early supporters — including holders of the first fully-on-chain-generated NFTs — are first in line for the community allocation. Supply, allocation and launch mechanics are finalized with the launcher; this page describes utility and governance, not price.
07 — Roadmap

Where we are & what’s next

Beta limits are deliberate: the breakthrough is fully on-chain, verifiable inference — not competing on resolution with off-chain GPUs yet.

Now (beta)

Raven Diffusion at 64×64, single denoise step, deterministic PNG + SHA-256 trust fields. On-chain chat via Qwen 0.5B. OpenAI-compatible HTTP on raw.icp0.io; Playground uses IC-native calls where HTTP would time out.

Near-term engineering

Higher resolution and multi-step denoise on-chain (resumable step() engine). Async image jobs + honest /v1/models catalog. Off-chain chat/images via owner-deployed relay and blob storage when enabled.

Platform hardening

Per-integrator API keys, rate limits, and $TRP utility hooks (ledger-gated until token launch) — staking perks and fee rebates described in product docs, utility-only.

Integrators

See ROUTER-ENABLEMENT.md for relay setup, async image polling, and what each deployment advertises.

08 — Resources

Canisters & links

Playground
6pjrv-saaaa-aaaao-bbq4q-cai.icp0.io
Router (gateway)
5723t-oaaaa-aaaao-bbquq-cai
Raven Diffusion
7chv3-5iaaa-aaaao-bbq3a-cai · module d89a560…
NFT collection
62oay-tiaaa-aaaao-bbq7a-cai · ICRC-7 / ICRC-37
On-chain LLM
via @onicai runtime (llama_cpp_canister)
GitHub
github.com/NDKONG-ICP/TRP_Router