Integrate in minutes, save from the first request
No new SDK and no rewrite. Your app keeps calling the Anthropic, OpenAI or Gemini API it already uses, through one endpoint that reaches every vendor and the open network.
- Get a key. Sign in to the console and create an API key (
ds_live_…). - Connect your vendor keys (optional). In Console → Providers, add your Anthropic, OpenAI or Gemini keys. They are stored encrypted, used only to call that vendor for you, and carry no routing fee. This is how hard requests reach frontier models.
- Change one line: the base URL.
- Turn on routing. By default you get exactly the model you ask for. To save, send
X-Decentralise-Mode: optimise(or usemodel: "auto"), or set optimise once as your account's default in the console. Your code can keep its usual model name: when the router answers with another model, the response says so.
from anthropic import Anthropic
client = Anthropic(
api_key="ds_live_...", # your Decentralised.si key
base_url="https://api.decentralised.si/anthropic", # the only change
)
# Your code stays the same. Add a header to let the router find a cheaper
# model that is good enough, or leave it out to get exactly the model you name.
msg = client.messages.create(
model="claude-sonnet-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Summarise this support ticket: ..."}],
extra_headers={"X-Decentralise-Mode": "optimise", "X-Decentralise-Reasoning": "1"},
)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.DSI_API_KEY,
baseURL: "https://api.decentralised.si/openai/v1", // the only change
});
// Everyday request: the cheapest model that clears the bar.
const quick = await client.chat.completions.create(
{ model: "auto", messages: [{ role: "user", content: "Classify this email: ..." }] },
{ headers: { "X-Decentralise-Mode": "cheapest", "X-Decentralise-Reasoning": "0" } },
);
// Hard request: frontier-grade reasoning, with a quality floor.
const deep = await client.chat.completions.create(
{ model: "auto", messages: [{ role: "user", content: "Find the risks in this contract: ..." }] },
{ headers: { "X-Decentralise-Mode": "quality", "X-Decentralise-Reasoning": "3", "X-Decentralise-Min-Quality": "0.9" } },
);
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({
apiKey: process.env.DSI_API_KEY,
httpOptions: {
baseUrl: "https://api.decentralised.si/gemini", // the only change
headers: { "X-Decentralise-Mode": "optimise" }, // for every request
},
});
const res = await ai.models.generateContent({ model: "gemini-2.5-pro", contents: "Explain this stack trace: ..." });
curl https://api.decentralised.si/openai/v1/chat/completions \
-H "Authorization: Bearer $DSI_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Decentralise-Mode: optimise" \
-H "X-Decentralise-Reasoning: 2" \
-d '{"model": "auto", "messages": [{"role": "user", "content": "Plan a three-step data migration."}]}'
# The response tells you what answered and what it cost:
# x-decentralise-requested-model: auto
# x-decentralise-actual-model: @cf/meta/llama-3.3-70b-instruct-fp8-fast
# x-decentralise-estimated-cost-usd: 0.000138
# x-decentralise-receipt: rcpt_...
Choose the reasoning level per request
Send a hint and the router sets its quality target to match. It never reads your prompt to decide.
| X-Decentralise-Reasoning | Use it for | Quality target | Typically answered by |
|---|---|---|---|
0 · recall | lookup, rewriting, classification, extraction | 0.68 | small open models, community nodes |
1 · general | everyday Q&A, summaries, code help | 0.80 | community nodes (8B-class and up, or a specialist in the topic); Llama 3.3 70B on Cloudflare as fallback |
2 · reasoning | multi-step analysis, agents, planning | 0.87 | large open or mid-tier frontier models |
3 · frontier | research, hard reasoning, high-stakes answers | 0.93 | the strongest model you have connected (your vendor key) |
Without a hint, the router estimates difficulty from the request's shape (size, tools, turns, reasoning settings). Combine the hint with a mode: cheapest, fastest, optimise (best value), quality, private (providers that don't train on or keep your data), decentralised_only, or passthrough (exactly the model you name). Hard limits: X-Decentralise-Min-Quality, X-Decentralise-Max-Cost, X-Decentralise-Max-Latency-Ms. See the API docs. On the open network, reasoning levels 2 and 3 are reserved for accounts that stake PAI; with your own vendor keys, frontier models are used directly.
More connectivity from the same integration
x-decentralise-failovers says how often). An answer cut off mid-stream continues on another provider instead of failing.List prices, side by side
Standard API prices in US dollars per million tokens, as published by each vendor on 28 September 2026 (no batch, cache or volume discounts). The cost column is for one million requests of 1,500 input and 500 output tokens, a typical chat or agent step. With Decentralised.si is the same million requests routed as in the calculator below: 70% to community nodes, 20% to Llama 3.3 70B (hosted fallback), and the hardest 10% still to that model, with your own key and no routing fee. Where a model is already cheaper than routing, the router sends everything to it at its own price.
| Model | Input / 1M | Output / 1M | Direct 1M requests | With Decentralised.siWith DSI 1M requests | You save |
|---|---|---|---|---|---|
| Claude Fable 5.1Anthropic | $10.00 | $50.00 | $40,000 | $4,523 | $35,47789% less |
| GPT-6 AstraOpenAI | $10.00 | $50.00 | $40,000 | $4,523 | $35,47789% less |
| GPT-5.5 ProOpenAI | $30.00 | $180.00 | $135,000 | $14,023 | $120,97790% less |
| GPT-5.5OpenAI | $5.00 | $30.00 | $22,500 | $2,773 | $19,72788% less |
| Claude Opus 5.5Anthropic | $4.00 | $20.00 | $16,000 | $2,123 | $13,87787% less |
| Gemini 3.1 Pro (preview)Google | $2.00 | $12.00 | $9,000 | $1,423 | $7,57784% less |
| Claude Sonnet 5Anthropic | $2.00 | $10.00 | $8,000 | $1,323 | $6,67783% less |
| GPT-6 SolOpenAI | $2.00 | $10.00 | $8,000 | $1,323 | $6,67783% less |
| Claude Haiku 4.5Anthropic | $1.00 | $5.00 | $4,000 | $923 | $3,07777% less |
| GPT-6 LunaOpenAI | $0.10 | $0.50 | $400 | $400 | same price, $0 fee |
| Gemini 2.5 Flash-LiteGoogle | $0.10 | $0.40 | $350 | $350 | same price, $0 fee |
| Llama 3.3 70B (open model, Cloudflare Workers AI)Hosted fallback, used when no community node fits | $0.29 | $2.25 | $1,566 | $1,566 | fallback price |
| Llama 3.1 8B (open model, Cloudflare Workers AI)Hosted fallback, used when no community node fits | $0.045 | $0.38 | $260 | $260 | fallback price |
| Community node (open model on a member's computer)Decentralised.si network | $0.10 | $0.30 | $300 | $300 | network price |
Sources: Anthropic pricing · OpenAI pricing · Gemini API pricing · Cloudflare Workers AI pricing · community node price: the default a node declares in network.ts (operators can set their own). Cost = (1,500 × input price + 500 × output price) ÷ 1,000,000 per request.
Read the table fairly: the vendors' smallest models (GPT-6 Luna, Gemini 2.5 Flash-Lite) cost about the same as the network's open models. The large gap is with flagship and mid-tier models, which is where most AI app spend goes. Claude 4.7 and later models also count about 30% more tokens for the same text (Anthropic's note), which raises their real cost further.
Estimate your bill
Pick the model you would otherwise send everything to, then your traffic. The routed estimate sends easy requests to community nodes, medium ones to Llama 3.3 70B (the hosted fallback, until enough community nodes cover them), and hard ones to your chosen model through your own key, at the vendor's price.
The first slider sets easy requests, the second hard ones; the rest are medium.
Estimates at list prices for the token counts you enter. Your real bill depends on your prompts, caching and the vendors' discounts. Which requests count as easy is decided per request by the router's difficulty estimate and quality floor (see how routing decides).
Where the savings come from, and their limits
What makes it cheaper
- Most requests in real apps are routine: summaries, extraction, classification, short answers. They don't need a flagship model.
- Open models on the network cost a fraction of flagship prices, and community nodes run on hardware members already own.
- Routing is per request, so hard questions still reach the strongest model you have access to.
- With your own keys, the router adds no fee to vendor prices.
What to keep in mind
- Open and small models are not frontier models. The router sets a quality floor per request, but check results for your own use case.
- Community nodes run on members' machines, so speed and capacity vary with who is online.
- Vendors offer batch (50% off) and caching discounts that this table leaves out on both sides.
- Buying network credit is not open yet. Today you can bring your own vendor keys (no routing fee), or run a node for free network chat.
More than price
Privacy by design
- The router chooses providers from a request's structure and your hints, never by reading your prompt.
- Network nodes never receive your account identity, and conversations are spread across providers.
- Usage records hold token counts and costs, not your text. Chat history stays in your browser.
- Private mode sends requests only to providers that don't train on or keep your data. DSI Synapse can pseudonymise details on your device first.
A node or vendor still sees the text it answers. Privacy policy
Open, with no lock-in
- Drop-in Anthropic, OpenAI and Gemini APIs, plus MCP: keep your SDK and change the base URL.
- Your own vendor keys work alongside the network, and you can switch back at any time.
- The source code is public: DSI Axon, DSI Synapse and this website and app.
- Open-weight models on the network, and a public directory of every node's models and expertise.
Scale and resilience
- Capacity grows as people add machines: a laptop, a gaming PC or a GPU server can join with one command.
- The router is stateless and runs at Cloudflare's edge, close to your users.
- If a provider fails, the request moves to another one, and an answer interrupted mid-stream continues on the next provider.
- Nodes are checked continuously with test prompts, and traffic follows reputation.
Today one operator, the project's founders, runs the router. How it fits together
Inclusion
- Anyone can supply intelligence: everyone gets 5,000 free network tokens a day, and running a node raises that to 20,000 a day plus every token your node serves.
- Nodes earn PAI reward points for verified work (an off-chain unit with no market value today).
- Open models at open-model prices put capable AI within reach of small teams, students and regions that frontier prices shut out.
- Sign in with email, Google, Apple, GitHub or a wallet.
Transparency
- Every response says which model and provider answered (
x-decentralise-actual-model) and carries a receipt. - The live map shows every node, its models and its traffic by city.
- Routing decisions can be explained: DSI Synapse shows each candidate's score and why it won.
Smarter than one model
- Specialist nodes (for example law or accounting) declare their expertise, and questions in their field go to them.
- With DSI Synapse on your device, a hard question can escalate to a stronger model, or get a second opinion, only when the first answer looks uncertain.