Solrouter
API

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.com

Authentication

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

OpenAPI Spec and Discovery

The full OpenAPI 3.1 specification for the Agent Privacy API is available at:

GET /agents/v1/openapi.json

You 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 pricing

Response 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 an error field 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.

On this page