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.

Install

To install the latest version of the Java SDK:

  • Make sure you have at least Java 1.8 installed.

  • Add a dependency to the current module:

    Java
    // Maven
    <dependency>
      <groupId>io.pinecone</groupId>
      <artifactId>pinecone-client</artifactId>
      <version>3.0.1</version>
    </dependency>
    
    // Gradle
    implementation "io.pinecone:pinecone-client:3.0.1"
    

    Alternatively, you can download the standalone uberjar pinecone-client-2.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.

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?