Skip to content
Launching on Montra, ElysiumHow the token works →
TALOS
Get a key
Docs:API reference

Docs

API reference

One base URL for every model on OpenRouter. Talos speaks the OpenAI and Anthropic formats, so existing clients work once you change the base URL and the key.

Base URL

Use the base URL for your client's format. Both reach the same models and spend the same balance. The paths below include /v1.

Anthropic formatClaude Code, Anthropic SDK
https://api.gettalos.xyz
OpenAI formatCursor, Codex, Cline, Roo Code, OpenAI SDK
https://api.gettalos.xyz/v1

Authentication

Send your key with every request, in whichever header your client uses. Keys start with sk-talos-.

Authorization: Bearer sk-talos-…
OpenAI SDKs, Cursor, Codex, Cline, Roo Code and Claude Code
x-api-key: sk-talos-…
The Anthropic SDK

Endpoints

  • POST/v1/chat/completionsOpenAI Chat Completions, as JSON or a stream.
  • POST/v1/responsesOpenAI Responses, the format Codex uses.
  • POST/v1/messagesAnthropic Messages, with tools, images, prompt caching and streaming.
  • POST/v1/messages/count_tokensCounts the input tokens of a Messages request. Not charged.
  • GET/v1/modelsEvery model and its price, refreshed from OpenRouter every 5 minutes.
  • POST/v1/keysMakes or replaces a wallet's key, or sets its privacy, from a wallet signature. The dashboard calls it for you.
  • GET/v1/credits/{address}A wallet's balance, its key's privacy setting and whether it has a key. Never the key itself.
  • GET/v1/reserveThe USDC in the reserve, the ICHOR it backs, and the OpenRouter credit left.

Models

Use the model's OpenRouter id, like anthropic/claude-sonnet-5 or openai/gpt-6-astra. Every model works in both formats: Claude through the OpenAI format, GPT through the Anthropic one. See every model and its price.

Example requests

POST /v1/chat/completions
curl https://api.gettalos.xyz/v1/chat/completions \  -H "Authorization: Bearer $TALOS_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "anthropic/claude-sonnet-5",    "stream": true,    "messages": [{ "role": "user", "content": "Hello from Talos" }]  }'
POST /v1/messages
curl https://api.gettalos.xyz/v1/messages \  -H "x-api-key: $TALOS_API_KEY" \  -H "anthropic-version: 2023-06-01" \  -H "Content-Type: application/json" \  -d '{    "model": "openai/gpt-6-astra",    "max_tokens": 1024,    "messages": [{ "role": "user", "content": "Hello from Talos" }]  }'

Streaming

Set "stream": true. Replies arrive as server-sent events in the shape OpenAI or Anthropic would send, so your SDK's streaming helpers work unchanged. The charge is made when the stream ends.

How a request is charged

  1. Hold. Before the request runs, Talos holds the most it could cost. If your balance can't cover the max_tokens you asked for, max_tokens is lowered to what it can.
  2. Run. The request goes to a provider your key's privacy setting allows. By default, that's one that keeps no data.
  3. Charge. When it finishes, you pay the exact cost at the lab's list price, with no markup, and the rest of the hold is released. Every charge shows in your dashboard.

For each request, Talos keeps the model, the cost and the time for 30 days. After that, only daily totals remain. Prompts and replies are never stored.

Keys

Each wallet has one key, and it spends that wallet's balance. You make it in the dashboard by signing a message with the wallet. The message names the Talos domain, carries a single-use nonce and expires after 5 minutes, so an old signature can't be replayed.

Talos stores only a hash of your key, so it's shown once, when it's made, and can't be shown again. If you lose it, replace it: you get a new key, and the old one stops working at once. Your balance stays with the wallet.

Each key also has a privacy setting. Private, the default, only reaches providers that keep no data. Lethe only reaches only models sealed in an enclave. All models also allows the models labelled Keeps data, whose providers may keep prompts. It's off unless you turn it on. A key refuses models outside its setting. Lethe over the API.

Errors

Errors come back in the format you called, so SDKs raise their usual exceptions. The status code tells you what went wrong.

400Bad request
The body doesn't match the format, or the model id is unknown.
401Unauthorized
The key is missing, mistyped or replaced.
402Balance too low
The balance can't pay for even a short reply. Top up and retry.
429Too many requests
Wait a moment and retry.
502Provider error
The model's provider failed. Retry, or pick another model.
503Unavailable
No provider can serve this model right now. Try again shortly.
Setup guidesClaude Code, Cursor, Codex, Cline, Roo Code and the SDKs.