See the Pinecone Node.JS client documentation for full installation instructions, usage examples, and reference information.

Install

To install the newest version of the Node.js client, written in TypeScript, run the following command:

npm install @pinecone-database/pinecone

If you already have the Node.js client, run the following command:

npm install @pinecone-database/pinecone@latest

To check your client version, run the following command:

npm list | grep @pinecone-database/pinecone

Initialize

Once installed, you can import the library and then use an API key to initialize a client instance:

import { Pinecone } from '@pinecone-database/pinecone';

const pc = new Pinecone({
    apiKey: 'YOUR_API_KEY'
});

Was this page helpful?