SwiftRelay

← All sprint notes

Claude Sonnet 5 API Proxy Setup in Minutes on SwiftRelay

Cost per lapEN

Why a Claude Sonnet 5 bill on SwiftRelay is easy to read

SwiftRelay is a pay-per-token API relay, and that single idea is the whole pricing story: there is no monthly fee, nothing to subscribe to, and no plan to buy. You top up a balance, and each call deducts only what it used. When you point the official Claude Code or Claude Desktop client at SwiftRelay, the usage view lists tokens and cost per call, so the number on your bill is not a mystery you have to guess at.

Claude models answer only through the official Claude Code or Claude Desktop client, version 2.1.285 or later. Once you are inside a supported client, the setup is three lines and a first run. Copy the lines, paste your key, start the client, and watch the first call land on your dashboard.

Here is the good news for anyone who prefers to keep their own existing subscription or official account elsewhere: you do not have to change how you are used to paying. On SwiftRelay, the cost follows the work you actually do. A quiet day costs a quiet amount, and a heavy day is visible line by line instead of disappearing into a flat monthly charge.

This article walks through a worked monthly bill for Claude Sonnet 5, with the arithmetic built from the prices shown on the SwiftRelay pricing page. We will also use the error messages you are most likely to hit, because troubleshooting goes faster when you know which message points at which layer.

The three Claude Sonnet 5 prices behind every call

On the SwiftRelay pricing page, Claude Sonnet 5 is listed at $1.01 per 1M input tokens, $5.06 per 1M output tokens and $0.0889 per 1M cache read tokens. Those three figures are the only inputs you need to reconstruct a bill, and they are the figures used in every example below.

Worked example, one call: say you send 12,000 input tokens, receive 4,000 output tokens, and read 8,000 cache tokens. The input cost is 0.012 × $1.01, which is $0.01212. The output cost is 0.004 × $5.06, which is $0.02024. The cache read cost is 0.008 × $0.0889, which is $0.0007112. Added together, that single call costs $0.0330712, and the usage list will show you the tokens and the cost per call so you can check it against your own dashboard.

Notice how the output side carries the weight. Output tokens are priced well above input tokens on Claude Sonnet 5, so the length of the answers you request has a direct effect on the total. That is exactly the kind of detail a per-token bill is meant to make visible, and it is the detail that lets you decide what to ask for in a sensible way.

Error: “invalid x-api-key” or an authentication rejection

This is usually the first message a new user meets, and it almost always means the key was not passed the way the client expects. Copy these lines into your terminal, replacing the placeholder with your own swft_ key:

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

claude

Then check three things. First, the key should be the one generated in your SwiftRelay dashboard, copied without a missing character or an extra space. Second, the base URL should be exactly https://api.fastapirelay.com, because a typo there sends the request somewhere else entirely. Third, the shell session you exported the variables in should be the same session you launch the client from, since a fresh terminal window will not inherit variables you set in an old one.

If the message changes after you fix the key, you are moving in the right direction. SwiftRelay support lives in Messages in the dashboard and requires a login, so if you are still stuck, open the dashboard, go to Messages, and describe the exact error text you received. There is no support email to hunt for, and that keeps the conversation in one place next to your usage and balance.

Error: “model not found” or a model that never answers

A model error in Claude Code or Claude Desktop is often a pairing problem rather than a pricing problem. Claude models answer only through the official Claude Code or Claude Desktop client, version 2.1.285 or later, so check your client version before you change anything else. An older client will not reach Claude Sonnet 5 properly, and the message can look far more dramatic than the real cause.

Next, confirm that the model identifier you selected matches the one listed on the SwiftRelay pricing page. Claude Sonnet 5 is claude-sonnet-5. If you typed a shorthand label or picked a model from memory, the request will not find what it expects. Select the identifier exactly as it appears, restart the client, and run the same prompt again.

One more habit saves time: change one thing at a time. If you swap the key and the model and the client version all at once, you will not know which edit fixed it. Fix the version, test, fix the model name, test, then check the key. That lap-by-lap approach turns a vague error into a short checklist, and it is the fastest route back to a working call.

Error: “insufficient balance” or a call that stops before it starts

SwiftRelay deducts what each call used from the balance you topped up, so a call cannot run when the balance cannot cover it. The fix is simple: top up and try again. The available top-up amounts are $1.39, $6.94, $13.89, $27.78, $69.44 and $138.89, so you can choose a size that matches the month you are planning rather than committing to a subscription you do not need.

There is also a small head start for a new account. The sign-up gift credit is $0.22, which is enough to cover a first light call and confirm that the pipeline works end to end. If you want the balance to stretch further, the referral rewards are worth knowing: you receive 14% of each top-up made by someone you invited, and 3% from the people they invite. Rewards can be withdrawn once they reach the $4.86 minimum, or moved straight into your balance, where they keep working for you on the next call.

One more reassurance for cautious testers. If you top up and change your mind, unused credit can be refunded within 11 days of the top-up, minus what was used and the payment fee. That means testing SwiftRelay with a small top-up is a low-drama decision, and the worst case is a small number rather than a wasted month.

The worked monthly bill, from first call to final total

Now let us put a month on the board. The following is an example, and every sum uses the SwiftRelay pricing page prices for Claude Sonnet 5: $1.01 per 1M input tokens, $5.06 per 1M output tokens and $0.0889 per 1M cache read tokens.

  • Worked example, a typical weekday: 120 calls at 12,000 input tokens, 4,000 output tokens and 8,000 cache read tokens each. Each call costs $0.0330712, so 120 calls cost $3.968544.
  • Worked example, a heavier day once a week: 260 calls with the same token mix, costing $8.598512 for that day.
  • Worked example, a quieter Friday: 60 calls with the same token mix, costing $1.984272.
  • Worked example, the monthly total: 120 calls on each of 20 weekdays, 260 calls on each of 4 heavier days and 60 calls on each of 4 quieter days. That is 2,400 calls, 1,040 calls and 240 calls, giving 3,680 calls in total, and 3,680 × $0.0330712 = $121.702016.

Read that last line again: $121.702016 for the example month, built from 3,680 calls at $0.0330712 each. No rounding was applied, and no figure came from anywhere except the SwiftRelay pricing page and the token counts in this example. The usage list in your dashboard shows tokens and cost per call for every request, so you can rebuild the same total from your own activity and see exactly which days carried the cost.

That visibility is the real value on offer. If the output side is running hot, you can trim it. If a heavy day was one unusual task rather than your normal rhythm, you know what the month will look like. And because SwiftRelay sells no plans, there is no monthly fee and nothing to subscribe to: the balance you top up is the balance you spend from, and each call takes only what it used.

One practical tip before you start: you can keep up to 20 live API keys per account, which makes it easy to separate a working project key from a scratch key without juggling extra accounts. Connect in minutes, copy the three lines, run the client, and let the first call tell you where you stand.

Sign up for SwiftRelay, top up a balance, and put Claude Sonnet 5 on the road today: one clean first run, a bill you can actually read, and a stopwatch instead of a subscription.

Keep reading

Back for another lap?Log in