SwiftRelay

← All sprint notes

A Week with Claude Code and SwiftRelay: API Relay Setup

First lapsEN

Day one: meeting the API relay behind your tools

Picture a stopwatch on your desk and a week of analysis ahead: cleaning a messy export, summarising a meeting transcript, drafting SQL, explaining a chart to a colleague. SwiftRelay is a pay-per-token API relay that keeps the mechanics simple. You connect in minutes: copy three lines and run. There is no monthly fee and nothing to subscribe to. You top up a balance, and each call deducts only what it used.

For a newcomer, that sentence matters more than it first appears. Many people keep a subscription to a model provider or an official account open, and the bill arrives whether the week was busy or quiet. With SwiftRelay, spending follows usage. A calm Tuesday costs less than a Tuesday spent rewriting the same query five times, and a heavy afternoon is paid for exactly as it happens. You stay in control of the balance instead of guessing what a month might cost.

SwiftRelay sits between the tools you already use and the models that answer them. You send requests through the SwiftRelay API host, https://api.fastapirelay.com, and the response comes back in your terminal, editor or script. Nothing about that needs a background in machine learning. If you can run a command and read a JSON file, you can use SwiftRelay. The rest of this guide walks through a full week, from first connection to Friday's report, in plain language.

Your first pit stop: connecting in minutes

Start by creating your account and topping up a balance. SwiftRelay gives you a key that begins with swft_. That key is your credential, so keep it out of shared screenshots and public notebooks. Once the balance is ready, you point your client at the SwiftRelay API host and paste the key into the environment variable that client expects.

For Claude Code, the setup is three lines and a run command:

01  export ANTHROPIC_BASE_URL=https://api.fastapirelay.com
02  export ANTHROPIC_AUTH_TOKEN=<your swft_ key>

claude

Claude models answer only through the official Claude Code or Claude Desktop client, and Claude Desktop needs version 2.1.285 or later. If your workflow uses the OpenAI-compatible endpoint instead, set the base URL to https://api.fastapirelay.com/v1 and use your swft_ key as the API key. That endpoint pairs with GPT, DeepSeek and the other remaining models. The pattern is the same either way: one host, one key, one command to start.

There is no long onboarding call and no infrastructure to provision. You are not building a deployment; you are changing an address and handing over a key. That is the whole pit stop. Copy the lines, paste them into your shell, run the command, and ask your first question about your data.

A week of analysis, priced per token

Here is what the week can look like. The prices below are per 1M tokens as listed on the SwiftRelay pricing page, and they cover input, output and cache read.

  • GPT-6.1 Sol: input $0.1736, output $0.8542, cache read $0.0347.
  • DeepSeek V4 Flash: input $0.2639, output $1.06, cache read $0.006944.
  • Claude Sonnet 5.5: input $0.9792, output $4.89, cache read $0.0861.
  • Gemini 3.1 Pro: input $1.35, output $7.81, cache read $0.1347.

Example: say you spend a day on one million input tokens and one million output tokens. With GPT-6.1 Sol, that is $0.1736 plus $0.8542, so $1.0278 for the day. With DeepSeek V4 Flash, the same day is $0.2639 plus $1.06, so $1.3239. With Claude Sonnet 5.5, it is $0.9792 plus $4.89, so $5.8692. These are examples, not quotes of your own week, but they show how the arithmetic works before you run a single query.

Monday is for orientation. You paste a column of customer records and ask for a summary of unusual values. Tuesday is for code: you ask for a SQL query that groups sessions by channel, then ask for it again with a different window, because the first answer assumed daily buckets. Wednesday is the heavy day, when you feed in a long document and ask for structured notes. Thursday is for the review meeting, where you turn findings into a short paragraph for a stakeholder. Friday is for cleanup, when you tidy the scripts and the prompts that worked well.

Cache read pricing deserves a glance, because it rewards a habit analysts already have: repeating the same reference material. A cached passage is billed at the cache read rate rather than the full input rate, so a document you reuse across several questions becomes cheaper to work with each time. That is a good reason to keep a stable prompt and a stable context file instead of rebuilding everything from scratch.

Watching every call so the week stays predictable

The dashboard is where SwiftRelay turns into something you can reason about. The usage list shows tokens and cost per call, so when you check the balance on Thursday afternoon you can see which prompts were expensive and which were cheap. For a data analyst, that is the difference between a black box and a working habit: you can tell a long-context question from a short one, and you can see the effect of trimming a request.

You can hold up to 20 live API keys per account. That is useful when you want a separate key for a scheduled script, a notebook and a side project, or when several teammates share one balance without sharing one credential. Rotate a key by creating another and replacing the old value in your environment, and your history stays readable while the setup stays tidy.

When something looks wrong, support is reached through Messages in the dashboard, which requires you to log in. There is no support email to hunt for. Bring the request details, the timestamp and the model you used, and you will usually have a clear place to continue the conversation. Keeping that habit from day one also makes your weekly reviews more accurate.

Top-ups, gift credit and referral rewards

Top-ups are simple and sized for how you actually work. The available amounts are $1.39, $6.94, $13.89, $27.78, $69.44 and $138.89. A small top-up is enough to test a workflow; a larger one covers a busy stretch without a pause. Since each call deducts only what it used, there is nothing to cancel and nothing to renew.

New accounts receive $0.22 in sign-up gift credit, which is enough to make a first call and see the whole loop work: request, response, cost deducted from the balance.

There is also a referral programme. When someone you invited tops up, you receive 14% of that top-up, and 3% from the people they invite in turn. Rewards can be withdrawn once they reach $4.86, or they can be moved straight into your SwiftRelay balance, which is often the simpler option if you are already working through a top-up. Either way, the reward stays visible to you.

If you change your mind, unused credit can be refunded within 11 days of a top-up, minus what was used and the payment fee. That window is short, so treat a top-up as a small test rather than a stockpile, and you will always know where your money stands.

Your first lap: a clean run by Friday

By the end of the week, a newcomer who started with a stopwatch and a blank balance has a working setup, a readable usage history and a clear sense of what each kind of question costs. SwiftRelay rewards that clarity: connect in minutes, top up what you need, and let each call deduct only what it used.

Grab your $0.22 sign-up credit, paste those three lines, and send your first request to your data now — SwiftRelay is ready for your opening lap.

Keep reading

Back for another lap?Log in