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

Setup guide - From GLM and Aider docs

Use GLM in Aider

Aider documents connecting to any OpenAI-compatible endpoint via OPENAI_API_BASE and OPENAI_API_KEY with an openai/ model prefix; combined with Z.ai's documented standard API endpoint https://api.z.ai/api/paas/v4 and model id glm-5.3.

Last verified 4 steps5 official sources

Steps

  1. Step 1.

    Install aider.

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

    Create a Standard API Key on Z.ai's API Keys page (https://z.ai/manage-apikey/apikey-list).

  3. Step 3.

    Set the endpoint and key (Aider's documented variables, Z.ai's documented general endpoint).

    Terminal
    # Mac/Linux:
    export OPENAI_API_BASE=https://api.z.ai/api/paas/v4
    export OPENAI_API_KEY=<key>
    
    # Windows:
    setx OPENAI_API_BASE https://api.z.ai/api/paas/v4
    setx OPENAI_API_KEY <key>
    # ... restart shell after setx commands
  4. Step 4.

    Run aider in your codebase with the model name prefixed by openai/.

    Terminal
    cd /to/your/project
    aider --model openai/glm-5.3

Caveats

  • Combined setup: Aider documents the OpenAI-compatible mechanism; Z.ai documents the endpoint https://api.z.ai/api/paas/v4/ and model id glm-5.3. Neither page names the other.
  • Aider is not on Z.ai's list of supported GLM Coding Plan tools, so use a Standard API key on the general endpoint (pay-as-you-go), not the Coding Plan endpoint.
  • Aider warns about models it does not know (see its model warnings page); context window and pricing metadata will not be populated for openai/glm-5.3.

FAQ

How do I use GLM in Aider?

Aider documents connecting to any OpenAI-compatible endpoint via OPENAI_API_BASE and OPENAI_API_KEY with an openai/ model prefix; combined with Z.ai's documented standard API endpoint https://api.z.ai/api/paas/v4 and model id glm-5.3.

Which GLM model ids work in Aider?

The official docs read for this guide list glm-5.3 and glm-5.3-flash. Requests go to https://api.z.ai/api/paas/v4.

Is this an official GLM and Aider setup?

The steps draw on both GLM's and Aider's docs. It was last checked against 5 official pages on October 17, 2026.

Sources

Last verified against 5 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.