Claude Code on SwiftRelay: what changes and what stays
Claude Code on SwiftRelay is a clean three-line setup, and the essentials stay straightforward: you point the official Claude Code client at the SwiftRelay API host, add your swft_ key, and start working. There is no subscription to manage and nothing recurring on the bill. You top up a balance, and each call deducts only what it used.
That model is useful when you want to keep costs visible while you build. SwiftRelay lists tokens and the cost of each call in your usage view, so you can see how a session adds up instead of guessing. Sign up at fastapirelay.com, claim the $0.22 sign-up gift credit, and your first clean run is one copy-and-paste lap away.
The stopwatch starts when you paste the configuration. The finish line is a working Claude Code session running through SwiftRelay.
Three lines that connect Claude Code to SwiftRelay
The setup is deliberately short. Open your terminal, paste the three lines below, replace the placeholder with your own swft_ key, and run the client. The API host is https://api.fastapirelay.com.
01 export ANTHROPIC_BASE_URL=https://api.fastapirelay.com 02 export ANTHROPIC_AUTH_TOKEN=<your swft_ key>
claude
That is the whole connection path for Claude models in the official Claude Code or Claude Desktop client. Claude Desktop needs version 2.1.285 or later. These are the clients that work with Claude models through SwiftRelay, so the setup stays inside the tool you already chose rather than moving you to a different workflow.
What changes is the endpoint and the billing arrangement. What stays is your normal Claude Code experience: you still launch the official client and use it as usual. SwiftRelay sits behind the connection as a pay-per-token relay, handling the API request while keeping the charge tied to actual token usage.
Before you start, top up the balance from the available amounts: $1.39, $6.94, $13.89, $27.78, $69.44, or $138.89. A smaller top-up works well for a first run, while a larger balance gives you room for heavier sessions. You can hold up to 20 live API keys per account, which is handy if you want separate keys for different projects or machines.
One small practical note: support is handled through Messages in the SwiftRelay dashboard, so you will need to log in to open it. There is no support email to hunt for. If a key needs attention or a balance needs checking, the dashboard keeps both in one place.
Per-token pricing that keeps every call in view
SwiftRelay publishes its current prices per 1M tokens, and the figures are shown on the SwiftRelay pricing page. For the Claude line-up, the current rates are clear enough to plan around:
- Claude Fable 5.1 (claude-fable-5-1): input $3.44, output $17.18, cache read $0.2222.
- Claude Haiku 4.5 (claude-haiku-4-5-20251001): input $0.3542, output $1.69, cache read $0.0278.
- Claude Opus 5.5 (claude-opus-5-5): input $1.53, output $7.27, cache read $0.0694.
- Claude Sonnet 5 (claude-sonnet-5): input $1.01, output $5.06, cache read $0.0889.
- Claude Sonnet 5.5 (claude-sonnet-5-5): input $0.9792, output $4.89, cache read $0.0861.
These prices make the two sides of a Claude Code session easy to separate. Input tokens cover what you send into the model, while output tokens cover what the model sends back. Cache reads have their own line, so repeated context can be tracked as its own category instead of disappearing into a vague total.
Example: suppose one call uses 1M input tokens and 1M output tokens on Claude Sonnet 5.5. The cost is $0.9792 for input plus $4.89 for output, which is $5.8692 for that call. If the same run also reads 1M cache tokens, add $0.0861, giving $5.9553. This is an example using the listed prices, not a fixed quote for every session.
After the run, the usage view lists the tokens and the cost per call. That transparency is the practical value of pay-per-token billing: you can check a single request, compare it with the next one, and adjust your working habits while the meter is still fresh.
Top-ups, credits, and a balance that stays under control
Because SwiftRelay has no recurring charge, the balance behaves more like fuel in the tank than like a fixed commitment. You choose a top-up amount, you use what you need, and the balance falls by the cost of the calls you actually made. If you are only testing a workflow or trying Claude Code for a short burst of work, that flexibility keeps the decision simple.
The $0.22 sign-up gift credit gives new accounts a small opening nudge. It is not a large cushion, but it is enough to get the configuration running and see your first usage entry appear. From there, you can pick the top-up amount that matches how actively you plan to work.
There is also a referral programme built around the same top-up flow. You receive 14% of each top-up made by someone you invited, and 3% from the people they invite in turn. Rewards can be moved into your SwiftRelay balance or withdrawn once you reach the $4.86 minimum. That makes the referral credit practical rather than decorative: it can go straight toward the next run.
Flexibility has a clear exit too. Unused credit can be refunded within 11 days of a top-up, minus what was used and the payment fee. It is a simple rule to keep in mind when you choose an amount, and it means the top-up decision can stay modest while you are still learning what your sessions consume.
Good practice for a smooth first Claude Code lap
Current good practice starts with a small top-up and a clean environment. Paste the three configuration lines exactly as shown, replace the placeholder with your own swft_ key, and confirm that the client launches through the SwiftRelay API host. If you use Claude Desktop, check that you are on version 2.1.285 or later before you begin.
Next, make one short request first. A brief exchange gives you a fast way to confirm the connection and see the first token and cost entry in the usage view. Once that looks right, you can move into longer sessions without changing the setup.
Then watch the two numbers that move most often: input and output. A long context block pushes input usage up, while a verbose answer pushes output usage up. Keeping an eye on both helps you spot which side is driving the spend, and the per-call listing lets you compare a quick prompt with a heavier task.
Keep your keys organised as well. Up to 20 live API keys per account means you have room to separate a personal experiment from a project key or a machine-specific key. Separate keys are easier to manage when you want to trace a call back to one setup, and you can revoke or replace them without disturbing the rest of your configuration.
Finally, keep the dashboard close. Messages is where support lives, the usage view is where the numbers live, and the balance is where the top-ups live. One login gives you the whole picture, which is a better rhythm than chasing details across separate tools.
What stays the same when you switch the connection
Claude Code on SwiftRelay does not ask you to rebuild your habits. You still open the official client, send your prompts, and read the results in the same place. The client requirement stays specific and simple: Claude models run through the official Claude Code or Claude Desktop client, with Claude Desktop on version 2.1.285 or later.
What you gain is the relay layer and its billing style. A pay-per-token API relay means no recurring subscription to maintain, a balance you control, and a usage list that shows tokens and cost per call. You also get the choice of several top-up sizes, a $0.22 sign-up gift credit, referral rewards that can feed the balance, and an 11-day window for refunds on unused credit within the stated conditions.
That is the whole shape of the change: three lines, one key, one balance, and visible per-call costs. No detour through another workflow, no mystery line item, no commitment before you know how you will use it.
Grab your $0.22 gift credit, top up your balance, paste those three lines, and take SwiftRelay for a first clean run.