Codex, the API host and the OpenAI-compatible route
Codex is one of the clients that connects cleanly to SwiftRelay through the OpenAI-compatible endpoint. The setup is designed to feel more like a quick-start lap than a complicated integration project: point Codex at the SwiftRelay API host, provide a swft_ key, and run the Codex command. There is no monthly fee and nothing to subscribe to. You top up a balance, and each call deducts only what it used.
That approach makes SwiftRelay a practical relay service for developers who want flexible model access without committing to a fixed subscription. It also keeps the billing picture close to the work. Instead of buying a broad package in advance, you pay according to the tokens your requests actually consume. New accounts receive $0.22 in sign-up credit, which gives you a small starting balance to test the connection.
For Codex specifically, the important detail is the endpoint. The OpenAI-compatible base URL is https://api.fastapirelay.com/v1, and the API key is your swft_ key. That is the route used by Codex, along with other OpenAI-compatible clients such as Cursor, Cline, Roo Code, Cherry Studio, OpenCode, SDKs and cURL. Those clients pair with GPT, DeepSeek and the other remaining models available through SwiftRelay.
Three lines to a working Codex setup
Good practice starts with keeping the configuration small and repeatable. Copy the three lines below into the environment used by your Codex session, replace the key placeholder with your own swft_ key, and then run Codex. The exact configuration lines are:
01 export OPENAI_BASE_URL=https://api.fastapirelay.com/v1 02 export OPENAI_API_KEY=<your swft_ key>
codex
This is the part of the process that SwiftRelay describes as connected in minutes: copy three lines and run. There is no separate contract to negotiate, no monthly charge to remember and no subscription to activate. Once the balance is topped up, calls draw from that balance according to their token usage.
A sensible routine is to configure one environment first, confirm that a small request works, and only then move the same settings into your wider development workflow. Keep the swft_ key out of shared repositories and committed files. If you use several OpenAI-compatible clients, the same base URL and key structure can serve as the common starting point, provided each client is pointed at the OpenAI-compatible endpoint.
Top-up options are $1.39, $6.94, $13.89, $27.78, $69.44 and $138.89. Smaller top-ups are useful for a first test, while the larger amounts reduce the need to interrupt a busy coding session with another balance adjustment. Whatever you choose, the account supports up to 20 live API keys, which is enough to keep separate keys for separate tools or working contexts.
Choosing a Codex model by task and token profile
SwiftRelay currently lists four models that fit the OpenAI-compatible route used by Codex: DeepSeek V4 Flash, DeepSeek V4 Pro, GPT-6 Astra and GPT-6.1 Sol. A good roundup of current practice is to treat them as different cost-and-capability choices rather than reach for the same one every time.
- DeepSeek V4 Flash is the entry point for everyday requests where token efficiency matters. Its listed prices are $0.2639 per 1M input tokens, $1.06 per 1M output tokens and $0.006944 per 1M cache-read tokens.
- DeepSeek V4 Pro is the larger-priced option in the DeepSeek range. Its listed prices are $1.17 per 1M input tokens, $3.51 per 1M output tokens and $0.0389 per 1M cache-read tokens.
- GPT-6 Astra is listed at $0.6597 per 1M input tokens, $3.28 per 1M output tokens and $0.0653 per 1M cache-read tokens.
- GPT-6.1 Sol is listed at $0.1736 per 1M input tokens, $0.8542 per 1M output tokens and $0.0347 per 1M cache-read tokens.
For repeated coding work, compare both sides of the exchange: input tokens and output tokens. A request that sends a large codebase context but produces a short edit has a different profile from one that generates a long answer. Cache-read pricing can also matter in workflows that reuse context across calls.
Here is an example, not a prediction. Say a GPT-6.1 Sol request uses 100,000 input tokens and 20,000 output tokens. At the listed rates, the input portion is $0.01736 and the output portion is $0.017084, for a total of $0.034444. The same example using 1M cache-read tokens on DeepSeek V4 Flash would deduct $0.006944. These examples show how the per-token figures combine into a per-call charge.
Reading usage as a working habit
One of the most useful good-practice habits is to review usage after each meaningful session rather than waiting for a balance surprise. SwiftRelay’s usage view lists tokens and cost per call. That makes it straightforward to see which model is producing the largest share of your spend and whether long outputs or repeated context are driving the total.
Start with a small top-up, run a representative Codex task, and check the resulting token counts. Then compare the cost with the output you received. If a session is expensive, test a lower-priced listed model on a similar task. If a task depends on long context, note the input and cache-read entries separately. The numbers give you a clearer basis for switching than a vague impression does.
This per-call visibility is also why the top-up structure works well for a relay service. There is no monthly fee, so there is no need to use every included unit before a renewal date. Instead, you can top up when it suits your workflow and let actual usage determine the deduction. The listed refund policy adds another layer of flexibility: unused credit can be refunded within 11 days of a top-up, minus what was used and the payment fee.
Support is available through Messages in the dashboard after you log in. There is no support email, so keep questions, configuration details and observed costs together in that Messages thread. A short message with the model name, endpoint and usage figures is usually the most useful way to describe an issue.
A practical client roundup for Codex workflows
Codex is not the only OpenAI-compatible client in a typical toolchain, and good practice means avoiding unnecessary configuration drift. Cursor, Cline, Roo Code, Cherry Studio and OpenCode all use the OpenAI-compatible endpoint with a swft_ key. Direct SDK work and cURL calls follow the same base URL. The shared principle is simple: use https://api.fastapirelay.com/v1 as the base URL and your swft_ key as the API key.
For a clean setup, document three things in your own notes: the model identifier, the base URL and the key name. That record makes it easier to move between clients without creating a new configuration from scratch. It also helps you keep Codex sessions and other OpenAI-compatible tools aligned with the same balance and usage view.
Model identifiers should be copied carefully from the pricing page. The four current choices are deepseek-v4-flash, deepseek-v4-pro, gpt-6-astra and gpt-6.1-sol. Keeping the identifier, client and model name in one small table is a practical way to avoid pointing a client at an unintended model.
You can also separate keys by purpose. With up to 20 live API keys available, one key can serve Codex while another is reserved for another client or a separate working context. The dashboard usage list remains the place to review tokens and cost per call across that activity.
Referrals, withdrawals and a straightforward finish
SwiftRelay also includes a referral programme. You receive 14% of each top-up made by someone you invited, plus 3% from the people they invite. Rewards can be moved into your balance or withdrawn once they reach the $4.86 minimum. That creates two practical options: use a reward to fund more calls, or withdraw it when it reaches the threshold.
Across the whole flow, the design stays refreshingly direct. Copy three lines, run Codex, choose from the listed GPT and DeepSeek models, and watch each call deduct its own cost from the topped-up balance. There is no monthly fee, no subscription to maintain and no separate support inbox to hunt for. If you are ready for a clean first run, sign up for SwiftRelay, top up your balance and take Codex for a lap.