# Why Crewai always ask OPENAI\_API\_KEY

**URL:** <https://community.crewai.com/t/why-crewai-always-ask-openai-api-key/4698>\
**Category:** CrewAI Community Support\
**Tags:** crewai\
**Created:** [March 15, 2025, 10:06am UTC](https://community.crewai.com/t/why-crewai-always-ask-openai-api-key/4698 "2025-03-15T10:06:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganesh\_giri](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/ganesh_giri/32/3060_2.png) [@ganesh\_giri](https://community.crewai.com/u/ganesh_giri)\
**Post date:** [March 15, 2025, 10:06am UTC](https://community.crewai.com/t/why-crewai-always-ask-openai-api-key/4698/1 "2025-03-15T10:06:40Z")

</div>

Why Crewai always ask KeyError: ‘OPENAI\_API\_KEY’. I have used ollama, but still getting open api key error.

Also tools return wrong info Total Workflow Count, Total Commit Count,

**[2025-03-15 15:38:06][✅ AGENT ‘GITHUB RESEARCHER’ COMPLETED TASK]: 2025-03-15 15:38:06.405346**

**[2025-03-15 15:38:06][✅ TASK COMPLETED: SEARCH GITHUB REPOSITORIES FOR RELEVANT PROJECTS.]: 2025-03-15 15:38:06.405504**

**[2025-03-15 15:38:06][✅ CREW ‘CREW’ COMPLETED, 3768B200-9594-4BD1-8155-001A6711BD36]: 2025-03-15 15:38:06.408029**

GitHub Search Results: Relevant GitHub Repositories:

* * *

### 1. Generative AI Rag Milvus PDF Chatbot

#### Description

A chatbot that uses machine learning to generate conversational dialogue and engage with users in a more human-like manner.

#### Key Insights

- Utilizes natural language processing (NLP) and machine learning algorithms for chatbot functionality.

- Integrates with the Milvus search engine for efficient data storage and retrieval.

- Designed to be highly customizable, allowing developers to tailor the chatbot’s conversational style and tone.

#### Programming Language Used

- Python 3.8

#### Total Commit Count

- 12,456

#### Total Workflow Count

- 230

### 2. SimCard Shelf Space CNN

#### Description

A deep learning-based model for detecting anomalies in large datasets using convolutional neural networks (CNNs).

#### Key Insights

- Develops a novel approach to anomaly detection that utilizes spatial attention mechanisms.

- Employs transfer learning and fine-tuning techniques for improved performance on diverse dataset types.

- Exhibits state-of-the-art accuracy on several benchmarking datasets.

#### Programming Language Used

- Python 3.8

#### Total Commit Count

- 9,124

#### Total Workflow Count

- 141

---

<div class="post-metadata">

**Author:** ![zinyando](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/zinyando/32/4435_2.png) [@zinyando](https://community.crewai.com/u/zinyando)\
**Post date:** [March 16, 2025, 12:04pm UTC](https://community.crewai.com/t/why-crewai-always-ask-openai-api-key/4698/2 "2025-03-16T12:04:18Z")

</div>

CrewAI uses OpenAI models by default so there are builtin checks for an API key usage. If you are using Ollama just put a random string as your `OPENAI_API_KEY` in your `.env` file.

Make sure you are not using anything that needs embeddings and you haven’t defined an embedder because you will get OPENAI api key errors again.
