Skip to main content
For installation instructions and usage examples, see the Go SDK documentation. To report an issue or request a feature, file an issue on GitHub.

Requirements

The Pinecone Go SDK requires a Go version with modules support.

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 Go SDK versions are as follows: 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 Go SDK, add a dependency to the current module:
To install a specific version of the Go SDK, run the following command:
To check your SDK version, run the following command:

Upgrade

Before upgrading to v3.0.0 or later, update all relevant code to account for the breaking changes explained here.
Each major version carries its version number in the module path, so crossing a major requires updating the import path in every file that uses the SDK. For example, moving from v4 to v6 means changing:
Apart from the module path, v5.0.0 and v6.0.0 are backward compatible with the release lines before them. If you already have the Go SDK, upgrade to the latest version as follows:

Initialize

Once installed, you can import the SDK and then use an API key to initialize a client instance:
To manage organizations, projects, API keys, and role-based access control, initialize an AdminClient with service account credentials instead: