# I cant change my .env OPENAI\_API\_KEY after running crewai create crew

**URL:** <https://community.crewai.com/t/i-cant-change-my-env-openai-api-key-after-running-crewai-create-crew/2262>\
**Category:** CrewAI Community Support\
**Created:** [December 26, 2024, 2:52pm UTC](https://community.crewai.com/t/i-cant-change-my-env-openai-api-key-after-running-crewai-create-crew/2262 "2024-12-26T14:52:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiloradGlog](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/miloradglog/32/1646_2.png) [@MiloradGlog](https://community.crewai.com/u/MiloradGlog)\
**Post date:** [December 26, 2024, 2:52pm UTC](https://community.crewai.com/t/i-cant-change-my-env-openai-api-key-after-running-crewai-create-crew/2262/1 "2024-12-26T14:52:38Z")

</div>

After setting my api key and model during the cli process, anything I do to the .env file is not registered, it keeps taking the old api key and model… driving me crazy, any ideas?

---

<div class="post-metadata">

**Author:** ![jklre](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@jklre](https://community.crewai.com/u/jklre)\
**Post date:** [January 7, 2025, 4:36am UTC](https://community.crewai.com/t/i-cant-change-my-env-openai-api-key-after-running-crewai-create-crew/2262/2 "2025-01-07T04:36:33Z")

</div>

Ummm… did you try turning it off and back on again? Sorry, but seriously if the file is in use by some other process the changes might not take hold.
