Quickstart
Sign in with email or a Solana wallet, create an API key, install @solrouter/sdk, and send your first sealed request in a few lines of TypeScript.
Most AI APIs can read every prompt you send them. Solrouter does not: your message is encrypted on your machine before it leaves, and the backend relays it without seeing the plaintext. The next five steps set that up end to end. You sign in, install the SDK, and send your first sealed request. Using Claude Code, Cursor, or Claude Desktop instead? See Integrations.
Get an API key
Your key is how Solrouter authenticates you and counts your calls.
Go to solrouter.com/sdk, sign in with an email address or a Solana wallet, and generate an API key. Then pick a plan: Pro $9 for 2,000 calls, Builder $49 for 12,500, or Scale $99 for 30,000, each per 30 days. Without a plan, each sealed call costs $0.02 from your USDC balance. The 5 free messages belong to the web chat sign-in, not to API keys. See Pricing.
No KYC. If you sign in with email and have no wallet, one is made for you.
Install the SDK
The SDK handles encryption, routing, and decryption for you, so you write normal TypeScript and get privacy by default.
Add @solrouter/sdk to your project using your preferred package manager.
npm install @solrouter/sdkyarn add @solrouter/sdkpnpm add @solrouter/sdkInitialize the client
One call gets you a configured client. Pass your API key.
The SDK fetches the enclave's published public key from GET /tee/public-key before your first encrypted request. That key is the encryption target for your prompts. The SDK does not fetch or verify the attestation quote. To check the enclave yourself, see Attestation.
import { SolRouter } from '@solrouter/sdk';
const client = new SolRouter({
apiKey: 'sk_solrouter_...',
baseUrl: 'https://api.solrouter.com',
});baseUrl is optional. Without it the SDK uses the production backend host directly, which serves the same API as api.solrouter.com.
Send your first encrypted chat
Here the privacy guarantee pays off. Your prompt travels encrypted through the Solrouter backend. Only the TEE (Trusted Execution Environment: hardware that isolates code and data from the machine's operator) can decrypt it. The enclave then sends the plaintext to an open-weight model on a Nosana GPU node.
Call client.chat() to send a message. The SDK encrypts it client-side with Arcium's RescueCipher. It sends the encrypted blob through the Solrouter backend, which cannot read it. Then it decrypts the response for you.
Use the default model gpt-oss-20b. The other two models pass through with a type cast; see Models.
// Encrypted end to end: the Solrouter backend never sees plaintext
const response = await client.chat('What are the risks of this DeFi protocol?');
console.log(response.message);If the GPU node was idle, the first reply can say "Nosana GPU node is warming up". Wait a moment and send the request again.
Check your credit balance
Calls draw from your plan first, then from USDC credit at $0.02 a call. You can read the credit balance from the SDK:
const { balance, balanceFormatted } = await client.getBalance();
console.log(`Balance: ${balanceFormatted}`);Next steps
You have sent an encrypted request and checked your balance. That is the core loop. Where you go next depends on what you build: the full SDK surface, keyless payments, or direct HTTP access.
Privacy SDK
Full @solrouter/sdk documentation: model selection, plaintext mode (encrypted: false), BRAID reasoning (reasoning: 'braid'), and more.
Authentication
Learn about API key auth, x402 keyless payments, and keeping your credentials safe.
API Reference
Browse the full REST API, including the agent endpoint and x402 paywall spec.
GitHub
Turn on Extended tools in Agent mode at solrouter.com and connect GitHub so the agent can list your repos, read files, and look through issues. Extended tools are not sealed.
Privacy SDK
Add encrypted AI calls to any app. Install @solrouter/sdk, pass your API key, and call client.chat(). The SDK encrypts the prompt on your machine.