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.
SlopNazi lets each writer bring their own AI.
SlopNazi uses Sign in with TrustedRouter for its full, context-aware writing editor. It requests a $5 monthly key limit. The writer can change that limit, add credits without leaving the authorization flow, 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 SlopNazi's maximum spend
4. Authorize the inference-only key
Default credit purchase: $20
SlopNazi requested limit: $5 monthly
Prompt and output logs: never
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. Provable privacy.
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.25/1M | $26.25/1M | varies 5 cited scores | 1598 ms TTFT anthropic · 100.00% available · n=5 |
OpenAI: GPT-5.5openai/gpt-5.5 |
4 routes | 1,050,000 | $5.25/1M | $31.5/1M | ZDR 3 cited scores | Warming up |
Google: Gemini 3.5 Flashgoogle/gemini-3.5-flash |
7 routes | 1,048,576 | $1.575/1M | $9.45/1M | ZDR | measured google-ai-studio · 0.00% available · n=14 |
MoonshotAI: Kimi K2.7 Codemoonshotai/kimi-k2.7-code |
19 routes | 262,144 | $0.735/1M to $0.9975/1M | $3.675/1M to $4.2/1M | ZDR 5 cited scores | measured inceptron · 0.00% available · n=14 |
Z.ai: GLM 5.2z-ai/glm-5.2 |
45 routes | 1,048,576 | $0.714/1M to $1.575/1M | $1.575/1M to $5.5125/1M | E2EE 4 cited scores | measured engy · 0.00% available · n=73 |
MiniMax: MiniMax M3minimax/minimax-m3 |
21 routes | 1,048,576 | $0.2835/1M to $0.63/1M | $1.155/1M to $2.52/1M | ZDR 4 cited scores | 2056 ms TTFT wafer · 100.00% available · n=21 |
Browse every modelReview provider policiesOpen the full leaderboardSnapshot 2026-08-05T02:34:40Z
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, but TrustedRouter's hosted gateway never logs or stores prompt or output content.