# TypeError: Pinecone.\_\_init\_\_() got an unexpected keyword argument 'api\_key'

**URL:** https://community.pinecone.io/t/typeerror-pinecone-init-got-an-unexpected-keyword-argument-api-key/4373
**Category:** Support
**Created:** [January 31, 2024, 6:43pm UTC](https://community.pinecone.io/t/typeerror-pinecone-init-got-an-unexpected-keyword-argument-api-key/4373 "2024-01-31T18:43:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![chan.nguyen](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@chan.nguyen](https://community.pinecone.io/u/chan.nguyen)
#### Post date: [January 31, 2024, 6:43pm UTC](https://community.pinecone.io/t/typeerror-pinecone-init-got-an-unexpected-keyword-argument-api-key/4373/1 "2024-01-31T18:43:56Z")

</div>

Not sure if anyone else is getting this error when initializing with this:

from pinecone import Pinecone

pc = Pinecone(api\_key=‘XXX’)

---

<div class="post-metadata">

### Author: ![chan.nguyen](https://avatars.discourse-cdn.com/v4/letter/c/a9adbd/32.png) [@chan.nguyen](https://community.pinecone.io/u/chan.nguyen)
#### Post date: [January 31, 2024, 8:47pm UTC](https://community.pinecone.io/t/typeerror-pinecone-init-got-an-unexpected-keyword-argument-api-key/4373/2 "2024-01-31T20:47:16Z")

</div>

Nevermind, figured it out. I saw that I had this import from the old langchain doc.

from langchain\_community.vectorstores import Pinecone

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex020/uploads/pinecone/original/1X/d16664eba369eeee623700cf12feab5562b37eaf.jpeg) [@system](https://community.pinecone.io/u/system)
#### Post date: [February 1, 2024, 8:47pm UTC](https://community.pinecone.io/t/typeerror-pinecone-init-got-an-unexpected-keyword-argument-api-key/4373/3 "2024-02-01T20:47:41Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
