Sign in with TrustedRouter — Let Your Users Bring Their Own AI
Add a sign-in button and your users bring their own TrustedRouter account, fund it in the consent flow, and choose a per-app spend cap. Access hundreds of models through an attested no-log gateway with the Python, TypeScript, or Swift SDK.
Add a button. Your users bring their own AI.
“Sign in with TrustedRouter” is the “Sign in with Google” of AI. Add one button to your app. Your users authenticate with their TrustedRouter account, add credits if needed, choose your app’s maximum spend, and grant you a scoped key. Your app can call hundreds of models on their credits, not yours.
You ship AI features with no API keys to manage, no inference bill, and no per-user billing to build. Every call runs through the open-source, hardware-attested gateway that provably never logs prompts.
import { BrowserOAuthFlow } from "@lore-hex/trusted-router/oauth";
// 1. sign-in button → open consent
const flow = new BrowserOAuthFlow(`${location.origin}/auth/callback`);
location.assign((await flow.initiate({ keyLabel: "My App" })).url);
// 2. /auth/callback → user-scoped key + who signed in
const { key, identity } = await flow.handleCallback();
// use `key` for /v1/chat/completions — billed to the user
Add the button
One import. Render “Sign in with TrustedRouter.” Python, TypeScript, and Swift SDKs — all PKCE, no client secret, works in SPAs, native, and CLIs.
Your user approves
They authenticate with TrustedRouter, fund $5, $20, or $100 through Stripe if needed, and approve a key scoped to your app. You suggest the cap. They choose the final maximum and reset period.
Use any AI, instantly
Use the returned key for /v1/chat/completions, /responses, or /embeddings across hundreds of models. Usage bills to your user’s credits.
A complete user-funded AI flow.
Your app supplies its name, callback URL, and a conservative suggested limit. The user can change that limit, add credits without leaving the authorization flow, approve an inference-only key, and revoke the app later.
A new account made through this flow starts at exactly $0 and receives only the delegated inference key the user approves. This keeps delegated signups honest while making the first paid model call a short, clear path.
1. Sign in
2. Add $5, $20, or $100
3. Set the app's maximum spend
4. Authorize the inference-only key
Default credit purchase: $20
Suggested app limit: $5 monthly
Prompt and output logs: never
Set a clear markup. Earn when your users build.
A registered app can add a disclosed percentage to model token costs. The user sees the exact markup before approval. You receive 70% of the collected markup in your earnings wallet.
Monetized apps require full identity verification before they can be enabled. Once your available wallet reaches $100, you can request a USD cash-out. You can also move any amount into a TrustedRouter workspace as credits.
App markup chosen by creator
User disclosure required before consent
Creator share 70%
TrustedRouter share 30%
USD cash-out minimum $100
Bank and tax details held by the payout processor
Identity verification required for monetization
Integrate in one prompt.
The SDKs and the whole API are agent-readable. Point Cursor, Claude Code, or Codex at the docs and let it wire the flow — most apps integrate in a single session, not a sprint.
The API is published as llms.txt and llms-full.txt so your agent has the full reference in its context.
Add "Sign in with TrustedRouter" to this app.
SDK: @lore-hex/trusted-router (npm) — use BrowserOAuthFlow.
Full API reference: https://api.trustedrouter.com/docs/llms-full.txt
On the OAuth callback, exchange the PKCE code for the
user-scoped key and call /v1/chat/completions with it.
Persist the key + identity.email per signed-in user.
Zero keys, zero inference cost.
No provider API keys to vault or rotate. No inference bill — tokens bill to the signed-in user. No per-user metering or limits to build; scoped keys carry their own caps. Hundreds of models across every provider, behind one OpenAI-compatible API.
One account. Any model. Privacy with proof.
One TrustedRouter account that works across every app they sign into. Their own credits and per-app spend cap. Any model they want. Prompts run through a hardware-attested gateway with no prompt or output logs, always.
Drop it into any stack.
import { BrowserOAuthFlow } from "@lore-hex/trusted-router/oauth";
const flow = new BrowserOAuthFlow(`${location.origin}/auth/callback`);
location.assign((await flow.initiate({ keyLabel: "My App", limit: "5" })).url);
// /auth/callback:
const { key, user_id, identity } = await flow.handleCallback();
from trustedrouter import create_oauth_authorization, exchange_oauth_key
auth = create_oauth_authorization(callback_url="https://myapp.com/auth/callback",
key_label="My App", limit="5", usage_limit_type="monthly")
redirect_to(auth.url) # keep auth.code_verifier in the session
# in /auth/callback (after verifying state):
token = exchange_oauth_key(code=request.args["code"], code_verifier=saved_verifier)
store_for_user(token.key, token.identity) # identity = {sub, email, ...}
import TrustedRouter
let oauth = TrustedRouterOAuth()
let token = try await oauth.authenticate(
callbackURL: "myapp://auth/callback",
presentationContextProvider: self) // token.key, token.identity
Sign in with TrustedRouter is built into the official Python, TypeScript, and Swift SDKs. PKCE S256 works on every platform with no client secret. Desktop and CLI apps use the loopback flow (http://localhost:3000/callback). Full reference: Sign in with TrustedRouter docs.
Current routes, prices, privacy, and measured performance.
Catalog facts come from the routes currently configured in TrustedRouter. Performance uses the same cached metadata snapshot as the public leaderboard. Prompts and outputs are not part of these measurements.
| Model | Providers | Context | Input | Output | Privacy | Measured route |
|---|---|---|---|---|---|---|
Anthropic: Claude Opus 4.8anthropic/claude-opus-4.8 |
3 routes | 1,000,000 | $5.275/1M | $26.375/1M | varies 5 cited scores | 1380 ms TTFT anthropic · 78 tok/s · 100.00% available · n=5 |
OpenAI: GPT-5.5openai/gpt-5.5 |
4 routes | 1,050,000 | $5.275/1M | $31.65/1M | ZDR 3 cited scores | 1987 ms TTFT openai · 100.00% available · n=1 |
Google: Gemini 3.5 Flashgoogle/gemini-3.5-flash |
7 routes | 1,048,576 | $1.5825/1M | $9.495/1M | ZDR | 1208 ms TTFT google-vertex · 83 tok/s · 100.00% available · n=9 |
MoonshotAI: Kimi K2.7 Codemoonshotai/kimi-k2.7-code |
19 routes | 262,144 | $0.70685/1M to $1.00225/1M | $3.587/1M to $4.22/1M | ZDR 5 cited scores | 2424 ms TTFT azure · 49 tok/s · 100.00% available · n=34 |
Z.ai: GLM 5.2z-ai/glm-5.2 |
48 routes | 1,048,576 | $0.7174/1M to $2.317369/1M | $1.5825/1M to $7.080849/1M | E2EE 4 cited scores | 2887 ms TTFT inceptron · 51 tok/s · 100.00% available · n=73 |
MiniMax: MiniMax M3minimax/minimax-m3 |
22 routes | 524,288 | $0.24265/1M to $2.11/1M | $1.0128/1M to $10.55/1M | ZDR 4 cited scores | measured deepinfra · 19 tok/s · 100.00% available · n=53 |
Browse every modelReview provider policiesOpen the full leaderboardSnapshot 2026-09-08T10:54:56.317Z
Questions
Do users need to copy API keys?
No. Third-party apps use TrustedRouter delegated auth so users sign in, fund their account if needed, choose the app limit, and approve access.
Does delegated auth expose prompt content to the app?
The app sends inference requests through the attested gateway. TrustedRouter never logs prompt or output content. Ordinary synchronous and streaming inference does not retain it. The opt-in Batch API temporarily retains enclave-encrypted artifacts for up to 30 days.