# Failed to init knowledge: Please provide an OpenAI API key

**URL:** https://community.crewai.com/t/failed-to-init-knowledge-please-provide-an-openai-api-key/5387
**Category:** CrewAI Community Support
**Tags:** crewai
**Created:** [April 17, 2025, 12:27pm UTC](https://community.crewai.com/t/failed-to-init-knowledge-please-provide-an-openai-api-key/5387 "2025-04-17T12:27:20Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![maxmoura](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/maxmoura/32/4206_2.png) [@maxmoura](https://community.crewai.com/u/maxmoura)
#### Post date: [April 17, 2025, 3:41pm UTC](https://community.crewai.com/t/failed-to-init-knowledge-please-provide-an-openai-api-key/5387/2 "2025-04-17T15:41:30Z")

</div>

It looks like you need to set the embedder model. As a starting point, I’d suggest following the code found [in this other thread about it](https://community.crewai.com/t/agent-does-not-recognize-the-knowledge-sources-file/3824/3). Specifically, check the `embedder_config` setup.

If the problem still persists after you adapt the example to your use case, feel free to come back here and provide more details – preferably with some code.

---

_[View the full topic](https://community.crewai.com/t/failed-to-init-knowledge-please-provide-an-openai-api-key/5387)._
