Developers
Agent console
Three ways for software to use Sovereign: an OpenAI-compatible API, an MCP server, and pay-per-call with no account at all.
1. OpenAI SDK drop-in
Change two settings in any OpenAI-compatible client: the base URL and the key. Model names you already use keep working.
OPENAI_BASE_URL=https://your-host/api/v1
OPENAI_API_KEY=sov_YOUR_KEY
2. MCP server
Streamable HTTP, stateless, JSON-RPC 2.0. Add it to Claude Desktop, Cursor, Windsurf or any MCP client that supports remote servers with headers:
{
"mcpServers": {
"sovereign": {
"url": "https://your-host/mcp",
"headers": { "Authorization": "Bearer sov_YOUR_KEY" }
}
}
}
For clients that only speak stdio, bridge with npx mcp-remote https://your-host/mcp --header "Authorization: Bearer sov_YOUR_KEY".
3. Pay per call (x402)
Agents with a wallet and no account can pay per request in USDC on Base. The endpoint answers 402 Payment Required with the exact requirements; an x402-aware client signs a transfer authorisation and retries with an X-PAYMENT header. The response carries X-PAYMENT-RESPONSE with the settlement. A failed generation is never settled.
// Node, with the x402 fetch wrapper and a private key that holds USDC on Base
import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
const r = await fetchWithPay("https://your-host/x402/chat", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ message: "Give me one blunt sentence about tax." }),
});
console.log((await r.json()).choices[0].message.content);
Prices are set by the operator (defaults: $0.002 per chat call, $0.02 per image). Requirements list the USDC contract, the receiving wallet and the EIP-712 domain the signature must use.
Identity protection applies to agents too
Every reply is scrubbed before it leaves the server. Prompts that try to make the model name its provider get a proprietary-and-not-disclosed answer, and the developer's own system prompt otherwise works unchanged.