guide · agents
Connect Claude Code to Token Factory
Claude Code is a terminal coding agent that speaks the Anthropic protocol. Since Token Factory exposes /v1/messages, you can point it at GPU Flow and have it use open-source models (DeepSeek, Qwen, GLM…) served on European B200 GPUs, instead of leaving the perimeter.
There are two paths: configure it on your machine with three environment variables, or spin it up already wired inside a GPU Flow Sandbox. We cover both.
Option A, Claude Code on your machine
Claude Code reads the base URL and key from environment variables. Point them at Token Factory and pick one of the catalogue models as the main model.
export ANTHROPIC_BASE_URL="https://api.gpuflow.ai" export ANTHROPIC_API_KEY="gpf-..." export ANTHROPIC_MODEL="deepseek-v4-pro" claude
Pick the right model
For a coding agent you want strong reasoning and tool calling: deepseek-v4-pro or qwen-3.6-27b are good choices. For light tasks and fast replies, qwen-3.5-9b. All support function calling, which is what the agent uses to edit files and run commands.
Honest note: Claude Code is tuned for Anthropic models. With open-source models it works at the protocol level (messages, tools, streaming) and performs well in most flows, but some very specific behaviour may vary. Test on your repo and adjust the model.
Option B, from a pre-wired Sandbox
If you spin up a GPU Flow Sandbox with the Claude Code or OpenCode template, the environment boots already configured against the cluster inference: an API key is injected and calls travel over the internal RDMA network, never hitting the public internet. You connect over SSH and start working.
It is the cleanest path for agents: your code and prompts never leave the European perimeter, and you do not manage keys by hand.
Check it works
Run a simple task ("summarise this repo" or "add a test to this function") and verify in the GPU Flow dashboard that token usage shows up under your account. If you see spend, Claude Code is talking to Token Factory.
Spin up a Sandbox with your agent
An SSH container with Claude Code or OpenCode preinstalled and wired to your European inference over the internal network. Same balance as Token Factory.
see Sandbox