Get an API key
Sign in at solrouter.com/sdk with email or a Solana wallet and generate an API key. No KYC. Send the key as a bearer token, or pay per call with x402.
Solrouter skips the identity check most AI APIs start with. You authenticate with an API key sent as a bearer token. You get that key by signing in with an email address or a Solana wallet. There is no KYC (Know Your Customer identity check).
A plan covers your calls. Without one, each sealed call costs $0.02 from your USDC balance. The 5 free messages come with a web chat sign-in and do not apply to calls made with an API key. See Pricing.
Getting your API key
Here is the full path from zero to your first authenticated request. It has four steps, all in the browser.
Go to solrouter.com/sdk
Open solrouter.com/sdk in your browser.
Sign in
Sign in with an email address, or connect Phantom, Solflare, or another Wallet Standard wallet. If you sign in with email and have no wallet, an embedded Solana wallet is made for you.
Generate an API key
Click Generate API Key. Your key is issued at once and starts with sk_solrouter_.... Copy it and store it somewhere safe. It is not shown again.
Pick a plan
Pro is $9 for 2,000 calls, Builder $49 for 12,500, and Scale $99 for 30,000, each per 30 days in USDC on Solana. No crypto? Pay by card through MoonPay. See Pricing.
Using your API key
Once you have a key, you attach it to requests in one of two ways: through the SDK, which handles it for you, or directly over HTTP.
With the SDK
Pass your API key when you create the SolRouter client. From then on, the SDK attaches it to every request. You never touch the header yourself.
import { SolRouter } from '@solrouter/sdk';
const client = new SolRouter({
apiKey: 'sk_solrouter_...',
baseUrl: 'https://api.solrouter.com',
});Direct HTTP (REST API)
If you are not using the SDK, send the key yourself as a bearer token in the Authorization header.
curl -X POST "https://api.solrouter.com/agent" \
-H "Authorization: Bearer sk_solrouter_..." \
-H "Content-Type: application/json" \
-d '{"prompt": "Hello", "model": "gpt-oss:20b"}'Authentication tiers
External callers have two ways to authenticate. Pick the row that matches how your code runs.
| Tier | How it works | Best for |
|---|---|---|
| API key | Authorization: Bearer sk_solrouter_.... Sealed calls draw from your plan, then from USDC balance at $0.02; priced agent routes debit their price from the balance | Most applications and development workflows |
| x402 (keyless) | Per-call USDC settlement on Solana mainnet | Autonomous agents that do not hold API keys |
x402 settles through a facilitator. The live manifest advertises Coinbase (api.cdp.coinbase.com/x402). Service discovery is at /.well-known/x402. The manifest shows X402_FACILITATOR_URL when it is set, or a built-in default when it is not. The manifest does not show which facilitator settles payments. Wire-level facilitator: not determined.
The x402 tier is worth a closer look if you build agents. Instead of storing a long-lived key, an agent pays for each call on the spot in USDC. x402 removes the API key, not the wallet key. The agent still holds a wallet private key to sign payments, so protect that key the same way.
Keeping your API key safe
Your key can spend real money, so treat it with the same care as a password. The practices below keep it out of the wrong hands.
-
Never commit your API key to source control. Treat
sk_solrouter_...like a password. Keep it out of Git history, checked-in.envfiles, and any public repository. -
Use environment variables. Store your key in
SOLROUTER_API_KEYand read it at runtime, so the secret never lives in your code:const client = new SolRouter({ apiKey: process.env.SOLROUTER_API_KEY, baseUrl: 'https://api.solrouter.com', }); -
Rotate compromised keys at once. If a key is exposed, go to solrouter.com/sdk, delete the affected key, and generate a new one.
Never expose your API key in client-side code or public repositories. Anyone with your key can spend your plan. If you suspect a key has leaked, rotate it at once at solrouter.com/sdk.