Use an allowance in Codex
Codex talks to Tokens On Me as a custom provider, with your token in place of a key. Your other Codex settings stay as they are.
Before you start
- Install Codex using the official instructions.
- Accept your invitation and copy the token. It is shown only once. If you lose it, open the allowance in Allowances and replace the token.
Start using your allowance
The token’s page gives these lines with your token and your allowance’s model filled in. They configure this session without changing your saved Codex settings.
export TOKENS_ON_ME_TOKEN=tom_…
codex -c model_provider=tokens_on_me \
-c 'model_providers.tokens_on_me={ name = "Tokens On Me", base_url = "https://tokens-on.me/openai/v1", env_key = "TOKENS_ON_ME_TOKEN" }' \
-c web_search=disabled \
--model gpt-6-astra
TOKENS_ON_ME_TOKEN- Your token. Codex reads it from this variable, and sends it in place of an API key.
model_provider and model_providers.tokens_on_me- A provider named Tokens On Me, at this service’s address, used for this run.
web_search=disabled- Codex’s web search is billed per search, not per token: this service refuses it.
--model- A model your allowance includes.
Anyone with your token can spend your allowance. Keep it out of shared files and version control. If it leaks, replace it from the allowance’s page to stop the old token immediately.
Or keep it in Codex’s settings
To start a plain codex on the allowance, put these lines in ~/.codex/config.toml, and set TOKENS_ON_ME_TOKEN in your terminal before you run it. The token stays out of the file.
model = "gpt-6-astra"
model_provider = "tokens_on_me"
web_search = "disabled"
[model_providers.tokens_on_me]
name = "Tokens On Me"
base_url = "https://tokens-on.me/openai/v1"
env_key = "TOKENS_ON_ME_TOKEN"Check your balance
Codex does not set an output length limit. Each request therefore reserves enough for the model’s maximum answer length, then releases any unused amount. Open your allowance in Allowances to see its balance or check your token without spending any of the budget; requests stop when the available balance cannot cover the reservation for another request.