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

Setup guide - From GLM and Zed docs

Use GLM in Zed

Zed documents custom OpenAI-compatible providers under language_models.openai_compatible (with a key read from <PROVIDER_ID>_API_KEY); combined with Z.ai's documented standard endpoint https://api.z.ai/api/paas/v4 and GLM-5.3 (1M context, 128K max output).

Last verified 3 steps4 official sources

Steps

  1. Step 1.

    Create a Standard API Key on Z.ai's API Keys page.

  2. Step 2.

    In Zed, run agent: open settings, find Add Provider in the LLM Providers section, and fill in provider name, API URL, model ID and context window. Or add it to settings.json (Zed's documented shape, with Z.ai's URL and model).

    JSON
    {
      "language_models": {
        "openai_compatible": {
          "zai": {
            "api_url": "https://api.z.ai/api/paas/v4",
            "available_models": [
              {
                "name": "glm-5.3",
                "display_name": "GLM-5.3",
                "max_tokens": 1000000
              }
            ]
          }
        }
      }
    }
  3. Step 3.

    Enter the API key in the provider settings UI, or set the generated env var (provider ID in upper snake case plus _API_KEY). Do not put API keys in settings.json.

    Terminal
    export ZAI_API_KEY=<your Z.ai Standard API key>

Caveats

  • Combined setup: Zed documents the openai_compatible mechanism and env var naming rule; Z.ai documents the endpoint and model. The provider ID zai and env var ZAI_API_KEY follow Zed's naming rule and are not printed on either page.
  • max_tokens 1000000 reflects Z.ai's stated 1M-token context for GLM-5.3. Optional reasoning settings (reasoning_effort, capabilities.interleaved_reasoning) are documented by Zed but not verified against Z.ai.
  • Zed is not on Z.ai's supported Coding Plan tools list, so use a Standard API key on the general endpoint (pay-as-you-go).
  • This config applies to Zed Agent and other Zed-owned AI features, not external agents.

FAQ

How do I use GLM in Zed?

Zed documents custom OpenAI-compatible providers under language_models.openai_compatible (with a key read from <PROVIDER_ID>_API_KEY); combined with Z.ai's documented standard endpoint https://api.z.ai/api/paas/v4 and GLM-5.3 (1M context, 128K max output).

Which GLM model ids work in Zed?

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 Zed setup?

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

Sources

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