Requirements
The Pinecone Node SDK requires TypeScript 4.1 or later and Node 18.x or later.SDK versions
SDK versions are pinned to specific API versions. When a new API version is released, a new version of the SDK is also released. The mappings between API versions and Node.js SDK versions are as follows:| API version | SDK version |
|---|---|
2025-04 (latest) | v6.x |
2025-01 | v5.x |
2024-10 | v4.x |
2024-07 | v3.x |
2024-04 | v2.x |
Install
To install the latest version of the Node.js SDK, written in TypeScript, run the following command:Upgrade
If you already have the Node.js SDK, upgrade to the latest version as follows:Initialize
Once installed, you can import the library and then use an API key to initialize a client instance:Proxy configuration
If your network setup requires you to interact with Pinecone through a proxy, you can pass a customProxyAgent from the undici library. Below is an example of how to construct an undici ProxyAgent that routes network traffic through a mitm proxy server while hitting Pinecone’s /indexes endpoint.
The following strategy relies on Node’s native
fetch implementation, released in Node v16 and stabilized in Node v21. If you are running Node versions 18-21, you may experience issues stemming from the instability of the feature. There are currently no known issues related to proxying in Node v18+.JavaScript