Aider Free API: Use FreeTheAI Models

Aider uses FreeTheAI through its OpenAI compatible setting: two environment variables and the openai/ model prefix.

WebsiteSource codeAPI reference

Before you start

Settings

OPENAI_API_BASE
https://api.freetheai.org/v1
OPENAI_API_KEY
your FreeTheAI key (ftai_..., 53 characters)
--model
openai/fta/zai/glm-5.3

Steps

  1. Set the environment variables

    On macOS and Linux:

    bash
    export OPENAI_API_BASE=https://api.freetheai.org/v1
    export OPENAI_API_KEY=ftai_your_key_here
  2. On Windows

    Run these, then open a new terminal:

    powershell
    setx OPENAI_API_BASE https://api.freetheai.org/v1
    setx OPENAI_API_KEY ftai_your_key_here
  3. Start Aider

    In your project folder, add openai/ in front of the FreeTheAI model ID:

    bash
    aider --model openai/fta/zai/glm-5.3

How this guide was checked: Checked against Aider's docs (OpenAI compatible APIs) on 2026-09-29.

Tips

  • Aider warns about unknown model settings for fta/ models. It still works; the warning is about context size defaults.

Troubleshooting

Why does Aider need openai/ before the model?

The prefix tells Aider to use the OpenAI compatible client with your OPENAI_API_BASE.

Common errors

  • 401: the key is wrong or incomplete. Paste the whole key.
  • 403: check in for today, or confirm your email.
  • 404: the model ID or URL is wrong.
  • 429: daily limit reached, or too many requests at once.

More guides: Coding tools

All setup guides