Aider logo
Coding agents

Use TokenRex with Aider

Use TokenRex as a custom OpenAI-compatible provider in Aider.

Before you start

  • A TokenRex API key
  • A version of the app that accepts a custom OpenAI-compatible base URL

Step-by-step setup

  1. 1

    Install Aider using its official installer.

  2. 2

    Set OPENAI_API_BASE and OPENAI_API_KEY in your terminal as shown below.

  3. 3

    Run Aider with an openai/ prefix followed by the full TokenRex model ID.

Configuration

bash
export OPENAI_API_BASE=https://tokenrex.ai/api/public/v1
export OPENAI_API_KEY=tb_sk_...
aider --model openai/openai/gpt-6-astra

Verify the connection

Start a short chat, then confirm the request appears in your TokenRex Dashboard with the model ID you selected.