Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pinecone.io/llms.txt

Use this file to discover all available pages before exploring further.

The Rust SDK is in alpha and under active development. It should be considered unstable and not used in production. Before a 1.0 release, there are no guarantees of backward compatibility between minor versions.
For installation instructions and usage examples, see the Rust SDK README. To report an issue or request a feature, file an issue on GitHub.

Install

To install the latest version of the Rust SDK, add a dependency to the current project:
cargo add pinecone-sdk

Initialize

Once installed, you can import the SDK and then use an API key to initialize a client instance:
Rust
use pinecone_sdk::pinecone::PineconeClientConfig;   
use pinecone_sdk::utils::errors::PineconeError;
	
#[tokio::main]
async fn main() -> Result<(), PineconeError> {
    let config = PineconeClientConfig {
        api_key: Some("YOUR_API_KEY".to_string()),
        ..Default::default()
    };

    let pinecone = config.client()?;
    let indexes = pinecone.list_indexes().await?;

    println!("Indexes: {:?}", indexes);

    Ok(())
}