---
url: https://docs.freetheai.org/guides/aider.md
description: >-
  Run the Aider AI pair programmer on free models with FreeTheAI:
  OPENAI_API_BASE, OPENAI_API_KEY, and the openai/ model prefix.
---

# Aider

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

Category: [Coding tools](/guides/#coding-tools). Before you start, you need a FreeTheAI account, an API key, and today's [check-in](/getting-started/check-in).

## Settings

| Setting | Value |
| --- | --- |
| 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

### 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
```

### 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
```

### Start Aider

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

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

## Tips

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

## Common questions

### Why does Aider need openai/ before the model?

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

## More help

* [Every API error and its fix](/errors)
* [Limits and the daily reset](/concepts/limits)
* [Aider website](https://aider.chat) and [source code](https://github.com/Aider-AI/aider)

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