SwiftRelay

← All sprint notes

Gemini 3.1 Pro API Relay Pricing on SwiftRelay Explained

Cost per lapEN

What a Gemini 3.1 Pro coding day actually costs through SwiftRelay

Advanced coding sessions rarely consist of one tidy prompt. A real day can involve reading a repository, planning a change, writing tests, debugging a failing build, reviewing generated code and asking for a second pass on the tricky parts. Each of those steps can consume input tokens, output tokens or cached context. With SwiftRelay, the question of what that day costs has a direct answer: every call deducts only the tokens it used from your balance.

That is the appeal of a pay-per-token API relay. There is no monthly fee, nothing to subscribe to and no need to keep a separate coding subscription just to route Gemini traffic. You top up the balance, make the calls and watch the usage list show tokens and cost per call. SwiftRelay is built for readers who already know how to drive a coding model and now want sharper control over the meter.

For Gemini 3.1 Pro, the current SwiftRelay pricing page lists $1.35 per 1M input tokens, $7.81 per 1M output tokens and $0.1347 per 1M cache read tokens. Those three numbers are enough to model a day before you start. They are also enough to see why token discipline matters once you are past the basics.

Reading the Gemini 3.1 Pro meter like an advanced operator

The first move is to separate the three cost streams. Input tokens carry your instructions, repository excerpts and conversation context. Output tokens cover the model’s response. Cache read tokens apply when material can be reused from a cached context instead of being processed again. A coding workflow that repeatedly sends the same large project context can therefore have a very different profile from a short, focused exchange.

Consider this example only: a day with 1M input tokens, 200,000 output tokens and 500,000 cache read tokens. Using the listed prices, the input portion is $1.35, the output portion is $1.562 and the cache read portion is $0.06735. The example total is $2.97935. This is not a forecast of your work; it is a worked example showing how the figures combine.

Now try a heavier example: 2M input tokens, 400,000 output tokens and 1M cache read tokens. The input portion is $2.70, the output portion is $3.124 and the cache read portion is $0.1347, for an example total of $5.9587. The difference between the two examples is not a hidden plan or a fixed daily charge. It is the result of different token volumes passing through the same per-token pricing.

Advanced users can use this arithmetic to shape their workflow. Keep prompts precise, pass only the files that matter, split large tasks into reviewable stages and reuse cached context where the tool supports it. SwiftRelay does not hide the meter behind a flat allowance. The usage list gives you tokens and cost per call, so optimisation becomes an operating habit rather than guesswork.

Connecting Gemini through its native CLI in minutes

Gemini models use their native protocol through Gemini CLI. SwiftRelay is designed to fit that route directly: copy three lines, paste them into your shell and run. The setup is deliberately small, which matters when you want to move from evaluating a model to actually coding with it.

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

gemini

Once the key is in place, Gemini CLI sends requests through the SwiftRelay API host. You can then use Gemini 3.1 Pro in the client that matches its native protocol, with each call charged against your topped-up balance. This is a clean setup for an advanced loop: run a build, capture the error, feed the relevant output back into Gemini CLI and inspect the cost of that iteration in the dashboard.

Your account can hold up to 20 live API keys, which gives you room to separate a workstation from a script, a test environment or another project. The important operational point is that a key is not a bundle. It is access to the same transparent per-token billing model.

Why per-token billing suits long and irregular coding sprints

Some days are spent reading code. Others are spent generating a large refactor. Some are quiet because a focused fix lands early. A fixed recurring charge can make that variation harder to reflect, while per-token billing lets the balance follow actual use. SwiftRelay gives you a top-up balance, and each call deducts only what it used.

The available top-up amounts are $1.39, $6.94, $13.89, $27.78, $69.44 and $138.89. That range supports a light trial, a working day of experimentation or a larger sprint, depending on how much you actually run. There is no subscription to maintain and no monthly fee. If you are comparing this approach with keeping your own subscription or official account, the practical difference is control: you decide when to add funds and can see the cost of individual calls.

New accounts also receive $0.22 in sign-up gift credit. That is enough to make an initial request and start learning how the meter behaves. It is not a large windfall; it is a small launch pad for checking your configuration and inspecting your first usage entry.

For advanced users, the real value is repeatability. Run a representative prompt, note the tokens and cost, then compare it with a tighter prompt or a better cache strategy. Because SwiftRelay lists usage by call, you can turn model routing into an engineering practice rather than a vague feeling that one setup is “more economical”.

Balancing Gemini 3.1 Pro against other SwiftRelay model prices

A serious coding workflow does not always need the same model for every step. SwiftRelay also lists Gemini 2.5 Flash, Gemini 3.8 Flash, Gemini 4 Argon, DeepSeek V4 Flash, Claude Sonnet 5.5 and GPT-6.1 Sol, each with its own input, output and cache read prices. Advanced operators can reserve Gemini 3.1 Pro for the calls that need deeper reasoning and use another listed model for lighter tasks.

For comparison, Gemini 2.5 Flash is listed at $0.1875 per 1M input tokens, $1.50 per 1M output tokens and $0.0194 per 1M cache read tokens. Gemini 3.8 Flash is listed at $0.9931, $4.46 and $0.0986 respectively. Gemini 4 Argon is listed at $1.31, $6.28 and $0.0653. These figures make it easier to build a routing rule around the work in front of you.

One example only: route 1M input tokens, 200,000 output tokens and 500,000 cache read tokens to Gemini 2.5 Flash, and the example cost is $0.1875 plus $0.30 plus $0.0097, or $0.4972. The same volumes on Gemini 3.1 Pro produce the earlier example total of $2.97935. That is not a ranking; it is simply the visible arithmetic of two different price points.

You can apply the same comparison to GPT-6.1 Sol at $0.1736 input, $0.8542 output and $0.0347 cache read per 1M tokens, or DeepSeek V4 Flash at $0.2639, $1.06 and $0.006944. The point is not to pick one model for every prompt. It is to match each stage of the sprint to a sensible price and keep the total legible.

Refunds, referral rewards and a dashboard you can work from

Flexibility also matters when you are testing unfamiliar workflows. SwiftRelay provides a refund for unused credit within 11 days of a top-up, minus what was used and the payment fee. That gives you room to evaluate the setup without treating the first balance as a permanent commitment.

There is also a referral programme with a two-level reward structure: 14% of each top-up by someone you invited, and 3% from the people they invite. Rewards can be moved into your balance or withdrawn once they reach the $4.86 minimum. If you enjoy showing a clean, fast setup to other developers, the programme adds a practical reason to bring them along.

Support is handled through Messages in the dashboard, where login is required. There is no support email to hunt for. For an advanced user, keeping configuration questions, cost questions and usage questions in one place is useful because the same dashboard contains the call history and cost information.

SwiftRelay also keeps the operational surface small: pay per token, top up a balance, connect the native client and inspect each call. Gemini 3.1 Pro costs $1.35 per 1M input tokens, $7.81 per 1M output tokens and $0.1347 per 1M cache read tokens, and SwiftRelay shows exactly what each call uses. Stopwatch ready, pit lane open, first run clean: sign up for SwiftRelay and put your next coding day on a meter you can actually read.

Keep reading

Back for another lap?Log in