back

guide to agents

5 minutes3 environment variables

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.

1

Pick the model

For a coding agent you want strong reasoning and good tool handling: deepseek-v4-pro or qwen-3.8-27b are good choices. For light tasks and fast replies, qwen-3.5-9b.

Tools (function calling) are what the agent uses to read and edit your files and run commands, so without them it cannot do its job. The catalogue marks which models have them; pick one that does.

This applies if you are configuring it on your machine, the next step. If you prefer a ready-made Sandbox, the template fixes the model and we cover that there.

2

Configure it on your machine

Claude Code reads the base URL and key from environment variables. Point them at Token Factory with the key you created in the dashboard and pick the model from the previous step.

bash

export ANTHROPIC_BASE_URL="https://api.gpuflow.ai"
export ANTHROPIC_API_KEY="$GPUFLOW_API_KEY"
export ANTHROPIC_MODEL="deepseek-v4-pro"

claude
3

Or boot it ready-made in a Sandbox

If you create a Sandbox with one of the assistant templates, the environment boots already configured against the cluster inference: the API key is injected for you and calls travel over the internal network, never hitting the public internet. You connect over SSH and start working.

Mind the model, because you do not pick it the same way here. The Claude Code template runs on your own Anthropic account or on our tokens with GLM 5.3 NVFP4, its fixed model. The one that lets you choose any model in the catalogue is Open Code.

It is still usually the cleanest path: your code and prompts never leave the European perimeter, and you do not manage keys by hand.

4

Check it works

Run a simple task ("summarise this repo" or "add a test to this function") and verify in the dashboard that token usage shows up under your account. If you see spend, Claude Code is talking to Token Factory.

What to keep in mind

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 it on your repo and adjust the model.

Spin up a Sandbox with your agent

An SSH container with Claude Code or Open Code preinstalled and wired to your European inference over the internal network. Same balance as Token Factory.