See the Pinecone Java SDK documentation for full installation instructions and usage examples.

To make a feature request or report an issue, please file an issue.

Requirements

The Pinecone Java SDK Java 1.8 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 Java SDK versions are as follows:

API versionSDK version
2025-04 (release candidate)Not yet released
2025-01 (latest)v4.x
2024-10v3.x
2024-07v2.x
2024-04v1.x

When a new stable API version is released, you should upgrade your SDK to the latest version to ensure compatibility with the latest API changes.

Install

To install the latest version of the Java SDK, add a dependency to the current module:

<dependency>
  <groupId>io.pinecone</groupId>
  <artifactId>pinecone-client</artifactId>
  <version>4.0.0</version>
</dependency>

Alternatively, you can download the standalone uberjar pinecone-client-4.0.0-all.jar, which bundles the Pinecone SDK and all dependencies together. You can include this in your classpath like you do with any third-party JAR without having to obtain the pinecone-client dependencies separately.

Upgrade

Before upgrading to v4.0.0, update all relevant code to account for the breaking changes explained here.

If you are already using the Java SDK, upgrade the dependency in the current module to the latest version:

<dependency>
  <groupId>io.pinecone</groupId>
  <artifactId>pinecone-client</artifactId>
  <version>4.0.0</version>
</dependency>

Initialize

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

import io.pinecone.clients.Pinecone;
import org.openapitools.db_control.client.model.*;

public class InitializeClientExample {
    public static void main(String[] args) {
        Pinecone pc = new Pinecone.Builder("YOUR_API_KEY").build();
    }
}

Was this page helpful?