# OpenAI API Key Issue in CrewAI Setup

**URL:** <https://community.crewai.com/t/openai-api-key-issue-in-crewai-setup/3941>\
**Category:** CrewAI Community Support\
**Created:** [February 18, 2025, 8:06am UTC](https://community.crewai.com/t/openai-api-key-issue-in-crewai-setup/3941 "2025-02-18T08:06:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![EMMA](https://avatars.discourse-cdn.com/v4/letter/e/57b2e6/32.png) [@EMMA](https://community.crewai.com/u/EMMA)\
**Post date:** [February 18, 2025, 8:06am UTC](https://community.crewai.com/t/openai-api-key-issue-in-crewai-setup/3941/1 "2025-02-18T08:06:25Z")

</div>

I am currently working with CrewAI and have encountered an issue when configuring the embedder in my setup. Specifically, the system keeps looking for the OpenAI API key despite my attempt to use Hugging Face as the embedder provider. Here are the relevant details of my configuration:

python

CopyEdit

```auto
crew = Crew(
    agents=[
        agent_1,
        agent_2,
        agent_3,
        agent_4,
        agent_5,
    ],
    tasks=[
        task_1,
        task_2,
        task_3,
        task_4,
        task_5
    ],
   verbose=True,
   embedder={  
        "provider": "huggingface",  
        "config": {
            "api_url": "https://api-inference.huggingface.co/models/sentence-transformers/all-MiniLM-L6-v2",
            "token": "MY_API_KEYi"
        }
    }
)

```

Even though I have specified Hugging Face in the configuration, the system continues to throw the following error:

javascript

CopyEdit

```auto
RateLimitError: litellm.RateLimitError: RateLimitError: OpenAIException - Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}}

```

It appears that the system is still trying to use the OpenAI API, which is resulting in a rate limit issue due to quota exhaustion. Could you kindly verify how to fix this problem and ensure that the Hugging Face embedder is used correctly without attempting to call OpenAI?

Thank you
