Answer: Configure API keys on the Settings → AI → LLM Providers page with `agent: open settings`; keys saved through Zed are stored in the system keychain, not in `settings.json`. Zed also reads provider-specific environment variables, and non-empty environment variables take precedence over keychain values. Status: Overdue (check was due 2026-11-20T13:39:13Z and has not succeeded) Entry: tool/zed/settings/api-keys-environment-variables Revision: 1 Digest: sha256:88613aeac6b3faed (changes whenever the content changes) Timeline: Created: 2026-11-13T04:00:48Z Last changed: 2026-11-13T04:00:48Z Last verified: 2026-11-19T13:39:13Z Next check: 2026-11-20T13:39:13Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Configuration location | Settings → AI → LLM Providers | [1] | 2026-11-19 Settings command | agent: open settings | [1] | 2026-11-19 Key storage | system keychain | [1] | 2026-11-19 Precedence | Non-empty [environment variables](../environment.md) take precedence over keychain values | [1] | 2026-11-19 Anthropic environment variable | ANTHROPIC_API_KEY | [1] | 2026-11-19 OpenAI environment variable | OPENAI_API_KEY | [1] | 2026-11-19 Google AI environment variables | GEMINI_API_KEY | [1] | 2026-11-19 OpenAI-compatible variable pattern | upper snake case plus `_API_KEY` | [1] | 2026-11-19 Sources: [1] Zed Industries. "zed.dev/docs/ai/use-api-access.md". https://zed.dev/docs/ai/use-api-access.md Role: primary. Accessed: 2026-11-19T13:39:13Z Quote: "Most API-access providers can be configured on the **Settings → AI → LLM Providers** page" (Supports: Configuration location) Quote: "with agent: open settings" (Supports: Settings command) Quote: "Keys saved through Zed are stored in the system keychain, not in `settings.json`." (Supports: Key storage) Quote: "Non-empty [environment variables](../environment.md) take precedence over keychain values." (Supports: Precedence) Quote: "| Anthropic | `ANTHROPIC_API_KEY`" (Supports: Anthropic environment variable) Quote: "| OpenAI | `OPENAI_API_KEY`" (Supports: OpenAI environment variable) Quote: "| Google AI | `GEMINI_API_KEY`, falling back to `GOOGLE_AI_API_KEY`" (Supports: Google AI environment variables) Quote: "OpenAI-compatible provider environment variables are generated from the configured provider ID as upper snake case plus `_API_KEY`." (Supports: OpenAI-compatible variable pattern) Snapshot SHA-256: b164ec181d366233ab55bfef5968c6d0f4c068695e5ccd05b1680829108484b0 (captured 2026-11-13T04:00:48Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T04:00:48Z, so the values verified then were kept. Cross-check: not-available at 2026-11-19T13:39:13Z. No independent second source is configured for this entry Last successful check: 2026-11-19T13:39:13Z Last attempt: 2026-11-19T13:39:13Z Notes and limitations: Extracted automatically from a single official source (section "API Keys and Environment Variables {#api-keys}"). Human-readable page: https://zed.dev/docs/ai/use-api-access.html Related: https://latestn.com/tool/zed/settings/auto-install-extensions How do I auto-install extensions in Zed? https://latestn.com/tool/zed/settings/biome-config-file-location Where does Zed require the biome.json configuration file to be located? https://latestn.com/tool/zed/settings/change-ai-settings How do I change AI settings in Zed? https://latestn.com/tool/zed/settings/agentic-panel-layout How do I switch Zed to the Agentic panel layout? https://latestn.com/tool/zed/settings/ansible-file-detection How do I make Zed treat my YAML files as Ansible files? https://latestn.com/tool/zed/settings/ansible-file-types-location Where do I put the file_types setting for Ansible in Zed? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T04:00:48Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/zed/settings/api-keys-environment-variables/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/zed/settings/api-keys-environment-variables POST: https://latestn.com/dispute/tool/zed/settings/api-keys-environment-variables with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/zed/settings/api-keys-environment-variables?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I configure API keys and environment variables for Zed AI? Revision 1, last verified 2026-11-19T13:39:13Z. https://latestn.com/tool/zed/settings/api-keys-environment-variables (accessed 2026-11-21T09:53:53Z). @misc{LatestN_tool_zed_settings_api_keys_environment_variables_r1, title = {How do I configure API keys and environment variables for Zed AI?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/zed/settings/api-keys-environment-variables}}, note = {Revision 1; digest sha256:88613aeac6b3faed; last verified 2026-11-19T13:39:13Z; accessed 2026-11-21T09:53:53Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/zed/settings/api-keys-environment-variables