Connect Codex
Connect a locally running Codex CLI, desktop app or official IDE extension to TokensClub. This local configuration does not configure browser-based ChatGPT or cloud tasks.
On this page
1. Prepare your key and model
Install the official Codex client. Create a dedicated TokensClub key for an available GPT group, then check your account balance and key permissions.
Manage API keys · View available models and prices
| Base URL | https://tokensclub.top/v1 |
|---|---|
| API | OpenAI Responses |
| API Key | YOUR_TOKENSCLUB_API_KEY |
| Model | gpt-6.1-sol |
gpt-6.1-sol is an example from the current catalog; your key must have access to its group. End the base URL at /v1, without /responses or a login-page path.
2. Configure the provider
Back up your existing configuration and merge these fields into your user-level config.toml: ~/.codex/config.toml on macOS/Linux or %USERPROFILE%\.codex\config.toml on Windows. Avoid duplicate keys or tables. Provider settings belong in user configuration, not project configuration.
model = "gpt-6.1-sol"
model_provider = "tokensclub"
web_search = "disabled"
[model_providers.tokensclub]
name = "TokensClub"
base_url = "https://tokensclub.top/v1"
wire_api = "responses"
env_key = "TOKENSCLUB_API_KEY"The initial configuration disables built-in web search. A working Responses connection does not establish compatibility with every tool or model feature. Verify the features you need and retain your existing file and command permissions.
3. Set your key and start
Replace YOUR_TOKENSCLUB_API_KEY with your TokensClub key on your own computer. Keep real keys out of public examples, screenshots and repositories.
macOS / Linux
export TOKENSCLUB_API_KEY="YOUR_TOKENSCLUB_API_KEY"
codexWindows PowerShell
$env:TOKENSCLUB_API_KEY = "YOUR_TOKENSCLUB_API_KEY"
codex4. Desktop and IDE
The official desktop app and IDE extension use user-level configuration too. Restart the client and create a new local task. Exporting a key in one terminal does not ensure an app opened from the Dock or Start menu receives it.
Prefer providing TOKENSCLUB_API_KEY to the process that launches your client. If the GUI cannot receive it, the official local-file fallback below can replace env_key in the same provider table; do not use both. This stores the key as local plaintext, so keep the file private and outside projects or shared configuration.
experimental_bearer_token = "YOUR_TOKENSCLUB_API_KEY"5. Verify the connection and usage
Use /status in the CLI to check the active provider and model. Start with a short request to reply only OK, then check the model, group and charge in TokensClub usage logs. This creates actual usage; loading a model list alone does not verify inference.
For 401, check the key and whether the client process received it. For 404, check the model/group and duplicated URL paths. For 429, check balance, key limits and concurrency. If the client does not recognize a model, update it and check the model ID; do not invent a catalog URL or context limit.