Answer: On Mac/Linux, run `export OPENAI_API_KEY=`; on Windows, run `setx OPENAI_API_KEY ` and restart the shell after setx. Status: Confirmed Entry: tool/aider/install-and-setup/set-openai-api-key Revision: 1 Digest: sha256:66071f22e82c4120 (changes whenever the content changes) Timeline: Created: 2026-11-13T02:56:43Z Last changed: 2026-11-13T02:56:43Z Last verified: 2026-11-20T11:43:56Z Next check: 2026-11-21T11:43:56Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Mac/Linux command | export OPENAI_API_KEY= | [1] | 2026-11-20 Windows command | setx OPENAI_API_KEY | [1] | 2026-11-20 Sources: [1] Aider. "aider.chat/docs/usage/browser.html". https://aider.chat/docs/usage/browser.html Role: primary. Accessed: 2026-11-20T11:43:56Z Quote: "export OPENAI_API_KEY= # Mac/Linux" (Supports: Mac/Linux command) Quote: "setx OPENAI_API_KEY # Windows, restart shell after setx" (Supports: Windows command) Published: 2026-04-25T16:45:23Z Snapshot SHA-256: 9dd43ecf83bcf91235ac2d4588d87cbd84e915defc15c7795b241d6dd31e36b1 (captured 2026-11-13T02:56:43Z) 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-13T02:56:43Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T11:43:56Z. No independent second source is configured for this entry Last successful check: 2026-11-20T11:43:56Z Last attempt: 2026-11-20T11:43:56Z Notes and limitations: Extracted automatically from a single official source (section "Aider in your browser"). Related: https://latestn.com/tool/aider/install-and-setup/setup-api-key How do I set up an API key for Aider? https://latestn.com/tool/aider/install-and-setup/setup-gemini How do I set up Aider to use Gemini models? https://latestn.com/tool/aider/install-and-setup/setup-xai-api-key How do I set up Aider to use xAI models like Grok 3? https://latestn.com/tool/aider/install-and-setup/install-with-pipx-uv How do I install Aider using pipx or uv? https://latestn.com/tool/aider/install-and-setup/run-aider-with-docker How do I install and run Aider with Docker? https://latestn.com/tool/aider/install-and-setup/set-deepseek-api-key How do I set the DEEPSEEK_API_KEY environment variable for Aider? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T02:56:43Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/aider/install-and-setup/set-openai-api-key/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/aider/install-and-setup/set-openai-api-key POST: https://latestn.com/dispute/tool/aider/install-and-setup/set-openai-api-key with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/aider/install-and-setup/set-openai-api-key?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I set the OPENAI_API_KEY before running Aider in the browser? Revision 1, last verified 2026-11-20T11:43:56Z. https://latestn.com/tool/aider/install-and-setup/set-openai-api-key (accessed 2026-11-21T09:58:05Z). @misc{LatestN_tool_aider_install_and_setup_set_openai_api_key_r1, title = {How do I set the OPENAI_API_KEY before running Aider in the browser?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/aider/install-and-setup/set-openai-api-key}}, note = {Revision 1; digest sha256:66071f22e82c4120; last verified 2026-11-20T11:43:56Z; accessed 2026-11-21T09:58:05Z} } 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/aider/install-and-setup/set-openai-api-key