Claude Code
Last updated:
Run Claude Code, the Anthropic Python SDK, and other Anthropic-compatible tools
directly against staik — Swedish GPU infrastructure with full data residency.
Under the hood this uses POST /v1/messages.
Quickstart
Point Claude Code at staik with two environment variables:
export ANTHROPIC_BASE_URL=https://api.staik.se
export ANTHROPIC_API_KEY=sk-st-your-key
# Launch Claude Code
claudeClaude Code now uses staik's Swedish GPUs instead of Anthropic's cloud. All tools work — file reading, searching, code editing, and more.
Make it permanent
Add the variables to your .bashrc, .zshrc, or .env file so they are set
automatically every time you open a terminal.
Important about token usage
Claude Code is token-intensive: each request sends the system prompt, tool definitions, CLAUDE.md files, and the full conversation history — often 20,000–30,000 prompt tokens per call. For serious usage we recommend one of the Agent or Coder plans (rolling hourly window) — see Plans and quotas. Prompt caching on /v1/messages makes recurring context cheaper automatically.
Anthropic SDK
Works the same way — set base_url:
import anthropic
client = anthropic.Anthropic(
base_url="https://api.staik.se",
api_key="sk-st-your-key",
)
message = client.messages.create(
model="qwen3.6:35b-a3b",
max_tokens=1024,
messages=[{"role": "user", "content": "Explain how a transformer works."}],
)
print(message.content[0].text)Models and features
- Send staik model names or Claude model names — Claude names are mapped automatically
- Streaming, tool calling, system prompt, and prompt caching are fully supported
- Same quotas, queues, and circuit breaker as the OpenAI endpoint
Limitations
See the Messages reference: extended thinking is ignored, images and PDF blocks are not supported via this endpoint — use chat completions for vision.