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 email, credit card, or 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
All requests require a Bearer token in the Authorization header. You generate your key at solrouter.com/sdk by connecting a Solana wallet. No email or credit card is required. Balance is prepaid in USDC or $ROUTER.
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. 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 Attestation
Status: Live. 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. See the attestation guide for 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 error codes on authentication, see the Authentication page, which covers 401, 402, and 403 responses.
Models
Solrouter runs only self-hosted open-weight models on Nosana GPU nodes. No prompt reaches OpenAI, Anthropic, or any other proprietary model API.
POST /agent
The /agent endpoint runs your prompt through a tool loop with web search, on-chain data, DEX quotes, and Solana tools. Optional guided reasoning (BRAID) and encrypted mode.