See the Pinecone Java client documentation for full installation instructions and usage examples. If you’re migrating from version 0.8.x or below, see the Java v1.0.0 migration guide.


To install the newest version of the Java client:

  • Make sure you have at least Java 1.8 installed.

  • Add a dependency to the current module:

    // Maven
    // Gradle
    implementation "io.pinecone:pinecone-client:1.2.2"

    Alternatively, you can download the standalone uberjar pinecone-client-1.2.2-all.jar, which bundles the Pinecone client 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.


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

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

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

Was this page helpful?