Tokens On Me

Use an allowance in Gemini CLI

Gemini CLI talks to Tokens On Me as it would to Vertex AI, with your token in place of a Google Cloud key. The lines keep its settings for the allowance apart from yours.

Before you start

  1. Install Gemini CLI using the official instructions. These commands were tested with version 0.64.0.
  2. Open your invitation or claim link, confirm you are 18 or older, and copy your 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 models filled in. They write Gemini CLI’s settings for the allowance, then start it.

mkdir -p "$HOME/.tokens-on-me/gemini/.gemini"
cat > "$HOME/.tokens-on-me/gemini/.gemini/settings.json" <<'EOF'
{
  "security": { "auth": { "selectedType": "vertex-ai" } },
  "tools": { "exclude": ["google_web_search", "web_fetch"] },
  "modelConfigs": {
    "customOverrides": [
      { "match": { "model": "classifier" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "prompt-completion" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "fast-ack-helper" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "edit-corrector" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "summarizer-default" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "summarizer-shell" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "web-search" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "web-fetch" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "web-fetch-fallback" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "loop-detection" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "loop-detection-double-check" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "llm-edit-fixer" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "next-speaker-checker" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "context-snapshotter" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-3-pro" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-3-flash" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-3.1-flash-lite" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-2.5-pro" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-2.5-flash" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-2.5-flash-lite" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-default" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "agent-history-provider-summarizer" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } }
    ]
  }
}
EOF
export GEMINI_CLI_HOME="$HOME/.tokens-on-me/gemini"
export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_VERTEX_BASE_URL=https://tokens-on.me/gemini
export GOOGLE_API_KEY=tom_…
gemini -m gemini-3.8-flash
GEMINI_CLI_HOME
A separate folder for this allowance’s settings and history. Your existing Gemini CLI settings are unchanged.
GOOGLE_GENAI_USE_VERTEXAI and GOOGLE_VERTEX_BASE_URL
Gemini CLI’s Vertex AI mode, sent to Tokens On Me instead of Google.
GOOGLE_API_KEY
Your token. Gemini CLI sends it in place of a Google Cloud API key.
-m
The model your conversation runs on. Not auto: auto asks another model first which one to use.

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.

For later sessions, run the last five lines in a new terminal. The settings are already saved.

What the settings do

{
  "security": { "auth": { "selectedType": "vertex-ai" } },
  "tools": { "exclude": ["google_web_search", "web_fetch"] },
  "modelConfigs": {
    "customOverrides": [
      { "match": { "model": "classifier" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "prompt-completion" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "fast-ack-helper" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "edit-corrector" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "summarizer-default" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "summarizer-shell" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "web-search" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "web-fetch" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "web-fetch-fallback" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "loop-detection" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "loop-detection-double-check" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "llm-edit-fixer" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "next-speaker-checker" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "context-snapshotter" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-3-pro" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-3-flash" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-3.1-flash-lite" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-2.5-pro" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-2.5-flash" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-2.5-flash-lite" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "chat-compression-default" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } },
      { "match": { "model": "agent-history-provider-summarizer" }, "modelConfig": { "model": "gemini-3.5-flash-lite" } }
    ]
  }
}
security.auth.selectedType
Vertex AI, so Gemini CLI does not ask you to sign in with Google.
tools.exclude
Its web search and web fetch tools: Google bills them apart from tokens, and this service refuses them.
modelConfigs.customOverrides
Gemini CLI uses background model calls to fix edits, summarise conversations, compress context and check for loops. These settings route those tasks to the cheapest model included in your allowance.

Check your balance

Gemini CLI does not set an output length limit. Each request therefore reserves the cost of the model’s maximum input and output, 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.

All guides