Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

On this pageOverview

Pinecone Java SDK

Install and use the Pinecone Java SDK to manage indexes and namespaces, upsert vectors, run semantic search, and call the Admin and Inference APIs from Java.

The Pinecone Java SDK requires Java 1.8 or later.

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 version SDK version
2025-04 v5.x
2025-01 v4.x
2024-10 v3.x
2024-07 v2.x
2024-04 v1.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.

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

Java
# Maven
<dependency>
  <groupId>io.pinecone</groupId>
  <artifactId>pinecone-client</artifactId>
  <version>5.0.0</version>
</dependency>

# Gradle
implementation "io.pinecone:pinecone-client:5.0.0"

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.

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

Java
# Maven
<dependency>
  <groupId>io.pinecone</groupId>
  <artifactId>pinecone-client</artifactId>
  <version>5.0.0</version>
</dependency>

# Gradle
implementation "io.pinecone:pinecone-client:5.0.0"

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

Java
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();
    }
}

The Java SDK supports capturing per-operation response metadata for all data plane operations, including client-side latency, server processing time, network overhead, and error details. You can use this metadata with OpenTelemetry, Micrometer, or any other observability system to monitor your Pinecone usage in production.

For setup instructions and examples, see OpenTelemetry support.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu