Overview
The Solrouter REST API gives you encrypted chat completions, agent reasoning, TEE key and attestation reads, and private on-chain swaps. Base URL: https://api.solrouter.com
Chat, agent, and TEE endpoints are Live. Agent Privacy API swap execution is Soon.
The Solrouter REST API is the direct HTTP interface to Solrouter's private AI infrastructure. With it you can send encrypted chat completions and run agent reasoning with tool calls. You can also read the TEE (trusted execution environment) key and attestation quote. Private on-chain swaps use the same base URL. All of it sits on one authenticated surface with no KYC.
Raw REST is plaintext unless you send encryptedPrompt. When you use @solrouter/sdk, chat requests are encrypted before they leave your machine, and the Solrouter backend relays the ciphertext to the TEE without reading it. If you call POST /agent with curl and a plain prompt, you are sending plaintext to the backend. POST /tee/process and POST /api/v1/chat/completions reject requests without encryptedPrompt.
Base URL
Every API request is made against the following base URL:
https://api.solrouter.comAuthentication
Requests carry a Bearer token in the Authorization header. You generate your key at solrouter.com/sdk by signing in with an email address or a Solana wallet. No KYC. A sealed call with an API key draws one call from your plan, or $0.02 from your USDC balance when the plan is used up; with neither, the reply is 402 insufficient_funds. See Pricing.
POST /tee/process also accepts guest calls with no Authorization header, capped at 5 a day per network address (429 guest_limit). Every /tee/process reply carries usage.source, which names what paid for the call. Partner keys issued to first-party Solrouter products are not metered.
Authorization: Bearer sk_solrouter_...For agents that do not hold an API key, Solrouter also supports x402 per-call USDC payment on Solana mainnet. The live manifest advertises Coinbase (api.cdp.coinbase.com/x402) as the facilitator. The manifest does not show which facilitator settles payments. See the Authentication page for full details on both methods.
Endpoints
Encrypted Chat
Status: Live. POST /api/v1/chat/completions takes an API key and requires encryptedPrompt and model; it returns 400 bad_request without them. GET /api/v1/models, /api/v1/balance, and /api/v1/usage sit beside it. @solrouter/sdk calls POST /tee/process and encrypts client-side; each call is metered against your plan or balance. Keyless agents pay per call on POST /api/v1/x402/chat/completions.
Agent
Status: Live. POST /agent runs your prompt through the tool-calling agent, with built-in tools for web search, on-chain data, DEX quotes, and Solana wallet inspection. Send reasoning: 'braid' for guided reasoning.
TEE
Status: Live. POST /tee/process relays one sealed prompt to the enclave and reports usage. GET /tee/public-key returns the enclave's live X25519 public key. GET /tee/attestation returns the TDX quote when the CVM can reach the dStack agent; otherwise tdxQuote is null and tdxQuoteError says why. The attestation guide covers the verification flow.
Agent Privacy API
/agents/v1/* is the agent-first surface for private on-chain swaps, managed wallets, and x402-paywalled encrypted inference. Discovery, quote, and anonymity-set reads are Live. Swap execution is Soon. Full OpenAPI spec at /agents/v1/openapi.json.
OpenAPI Spec and Discovery
The full OpenAPI 3.1 specification for the Agent Privacy API is available at:
GET /agents/v1/openapi.jsonYou can import this spec directly into tools like Postman, Insomnia, or any OpenAPI-compatible client to explore all /agents/v1/* endpoints with type-safe request and response schemas.
Two well-known discovery documents are also published for agent and payment interoperability. Both are served by the API host, https://api.solrouter.com.
GET /.well-known/agent-card.json # A2A protocol v1.0 card with the full skill list
GET /.well-known/x402 # x402 paywall manifest with per-call USDC pricingResponse Format
All endpoints return JSON. A top-level success field exists on POST /agent and POST /tee/process only:
success: true: the request succeeded, and the other fields carry the result.success: false: the request failed, and anerrorfield names the failure.
The TEE key and attestation reads, x402 inference, the discovery documents, and /agents/v1 responses have no success field. They return the result object directly, or an error field with a non-2xx status.
For status codes, including 402 insufficient_funds, 429 guest_limit, and 503 billing_unavailable, see Errors.