Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Setup guide - Documented by Aider

Use OpenAI in Aider

Aider works with OpenAI's models via OPENAI_API_KEY (or --api-key openai=<key>) and aider --model <model-name> for any OpenAI model.

Last verified 4 steps2 official sources

Steps

  1. Step 1.

    Install aider.

    Terminal
    python -m pip install aider-install
    aider-install
  2. Step 2.

    Configure your API key.

    Terminal
    export OPENAI_API_KEY=<key> # Mac/Linux
    setx   OPENAI_API_KEY <key> # Windows, restart shell after setx
  3. Step 3.

    Start aider in your codebase with an OpenAI model. Aider documents that aider --model <model-name> works for any other OpenAI model.

    Terminal
    # Change directory into your codebase
    cd /to/your/project
    
    aider --model <model-name>
  4. Step 4.

    List models available from OpenAI.

    Terminal
    aider --list-models openai/

Caveats

  • Aider's OpenAI page examples are older models (o3-mini, o1-mini, gpt-4o); the GPT-6 ids come from OpenAI's model catalog. Confirm with aider --list-models openai/.
  • Reasoning models may need aider's reasoning model settings (and --reasoning-effort) if you see temperature or system prompt errors.

FAQ

How do I use OpenAI in Aider?

Aider works with OpenAI's models via OPENAI_API_KEY (or --api-key openai=<key>) and aider --model <model-name> for any OpenAI model.

Which OpenAI model ids work in Aider?

The official docs read for this guide list gpt-6.1-sol, gpt-6-astra and gpt-6-luna.

Is this an official OpenAI and Aider setup?

Aider documents this setup in its own docs. It was last checked against 2 official pages on October 17, 2026.

Sources

Last verified against 2 official pages.

Newsletter

New models, set up the day they ship

One email per week. New model releases, the coding tools that support them and how to wire them up.