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 v7.0.0, update all relevant code to account for the following breaking changes. See the v7 migration guide for before-and-after examples.
  • Pod-based index creation is removed. CreatePodIndex and CreatePodIndexRequest no longer exist, but existing pod-based indexes keep working.
  • Enum constants are prefixed with their type name. For example, Aws is now CloudAWS, and Cosine is now IndexMetricCosine.
  • ListImports takes a *ListImportsRequest, and QueryByVectorIdRequest.SparseValues is removed.
  • SourceCollection and Schema on the legacy create requests now return an error. ConfigureIndexParams.Embed is replaced by ConfigureIndexParams.Schema.
  • Backup field types changed, and some invalid requests now fail client-side.
If you are upgrading from v2 or earlier, also account for the v3.0.0 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 v6 to v7 means changing:
Apart from the module path, v5.0.0 and v6.0.0 are backward compatible with the release lines before them. v7.0.0 targets API version 2026-07 and includes the breaking changes listed above. To stay on API version 2026-04, keep using v6. 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: