client.ListIndexesAsync() -> IndexList
-
-
-
List all indexes in a project.
-
-
-
await client.ListIndexesAsync();
-
-
client.CreateIndexAsync(CreateIndexRequest { ... }) -> Index
-
-
-
Create a Pinecone index. This is where you specify the measure of similarity, the dimension of vectors to be stored in the index, which cloud provider you would like to deploy with, and more.
For guidance and examples, see Create an index.
-
-
-
await client.CreateIndexAsync( new CreateIndexRequest { Name = "movie-recommendations", Dimension = 1536, Metric = MetricType.Cosine, DeletionProtection = DeletionProtection.Enabled, Spec = new ServerlessIndexSpec { Serverless = new ServerlessSpec { Cloud = ServerlessSpecCloud.Gcp, Region = "us-east1", }, }, } );
-
-
-
request:
CreateIndexRequest
-
-
client.DescribeIndexAsync(indexName) -> Index
-
-
-
Get a description of an index.
-
-
-
await client.DescribeIndexAsync("test-index");
-
-
-
indexName:
string— The name of the index to be described.
-
-
client.DeleteIndexAsync(indexName)
-
-
-
Delete an existing index.
-
-
-
await client.DeleteIndexAsync("test-index");
-
-
-
indexName:
string— The name of the index to delete.
-
-
client.ConfigureIndexAsync(indexName, ConfigureIndexRequest { ... }) -> Index
-
-
-
Configure an existing index. For serverless indexes, you can configure index deletion protection, tags, and integrated inference embedding settings for the index. For pod-based indexes, you can configure the pod size, number of replicas, tags, and index deletion protection.
It is not possible to change the pod type of a pod-based index. However, you can create a collection from a pod-based index and then create a new pod-based index with a different pod type from the collection. For guidance and examples, see Configure an index.
-
-
-
await client.ConfigureIndexAsync( "test-index", new ConfigureIndexRequest { Spec = new ConfigureIndexRequestSpec { Pod = new ConfigureIndexRequestSpecPod { PodType = "p1.x2" }, }, } );
-
-
-
indexName:
string— The name of the index to configure.
-
request:
ConfigureIndexRequest
-
-
client.ListCollectionsAsync() -> CollectionList
-
-
-
List all collections in a project. Serverless indexes do not support collections.
-
-
-
await client.ListCollectionsAsync();
-
-
client.CreateCollectionAsync(CreateCollectionRequest { ... }) -> CollectionModel
-
-
-
Create a Pinecone collection.
Serverless indexes do not support collections.
-
-
-
await client.CreateCollectionAsync( new CreateCollectionRequest { Name = "example-collection", Source = "example-source-index" } );
-
-
-
request:
CreateCollectionRequest
-
-
client.CreateIndexForModelAsync(CreateIndexForModelRequest { ... }) -> Index
-
-
-
Create an index with integrated embedding.
With this type of index, you provide source text, and Pinecone uses a hosted embedding model to convert the text automatically during upsert and search.
For guidance and examples, see Create an index.
-
-
-
await client.CreateIndexForModelAsync( new CreateIndexForModelRequest { Name = "multilingual-e5-large-index", Cloud = CreateIndexForModelRequestCloud.Gcp, Region = "us-east1", DeletionProtection = DeletionProtection.Enabled, Embed = new CreateIndexForModelRequestEmbed { Model = "multilingual-e5-large", Metric = MetricType.Cosine, FieldMap = new Dictionary<string, object>() { { "text", "your-text-field" } }, }, } );
-
-
-
request:
CreateIndexForModelRequest
-
-
client.DescribeCollectionAsync(collectionName) -> CollectionModel
-
-
-
Get a description of a collection. Serverless indexes do not support collections.
-
-
-
await client.DescribeCollectionAsync("tiny-collection");
-
-
-
collectionName:
string— The name of the collection to be described.
-
-
client.DeleteCollectionAsync(collectionName)
-
-
-
Delete an existing collection. Serverless indexes do not support collections.
-
-
-
await client.DeleteCollectionAsync("test-collection");
-
-
-
collectionName:
string— The name of the collection.
-
-
client.Backups.ListByIndexAsync(indexName, ListBackupsByIndexRequest { ... }) -> BackupList
-
-
-
List all backups for an index.
-
-
-
await client.Backups.ListByIndexAsync("index_name", new ListBackupsByIndexRequest());
-
-
-
indexName:
string— Name of the backed up index
-
request:
ListBackupsByIndexRequest
-
-
client.Backups.BackupIndexAsync(indexName, BackupIndexRequest { ... }) -> BackupModel
-
-
-
Create a backup of an index.
-
-
-
await client.Backups.BackupIndexAsync("index_name", new BackupIndexRequest());
-
-
-
indexName:
string— Name of the index to backup
-
request:
BackupIndexRequest
-
-
client.Backups.ListAsync() -> BackupList
-
-
-
List all backups for a project.
-
-
-
await client.Backups.ListAsync();
-
-
client.Backups.GetAsync(backupId) -> BackupModel
-
-
-
Get a description of a backup.
-
-
-
await client.Backups.GetAsync("670e8400-e29b-41d4-a716-446655440000");
-
-
-
backupId:
string— The ID of the backup to describe.
-
-
client.Backups.DeleteAsync(backupId)
-
-
-
Delete a backup.
-
-
-
await client.Backups.DeleteAsync("670e8400-e29b-41d4-a716-446655440000");
-
-
-
backupId:
string— The ID of the backup to delete.
-
-
client.Backups.CreateIndexFromBackupAsync(backupId, CreateIndexFromBackupRequest { ... }) -> CreateIndexFromBackupResponse
-
-
-
Create an index from a backup.
-
-
-
await client.Backups.CreateIndexFromBackupAsync( "670e8400-e29b-41d4-a716-446655440000", new CreateIndexFromBackupRequest { Name = "example-index" } );
-
-
-
backupId:
string— The ID of the backup to create an index from.
-
request:
CreateIndexFromBackupRequest
-
-
client.RestoreJobs.ListAsync(ListRestoreJobsRequest { ... }) -> RestoreJobList
-
-
-
List all restore jobs for a project.
-
-
-
await client.RestoreJobs.ListAsync(new ListRestoreJobsRequest());
-
-
-
request:
ListRestoreJobsRequest
-
-
client.RestoreJobs.GetAsync(jobId) -> RestoreJobModel
-
-
-
Get a description of a restore job.
-
-
-
await client.RestoreJobs.GetAsync("670e8400-e29b-41d4-a716-446655440000");
-
-
-
jobId:
string— The ID of the restore job to describe.
-
-
client.Index.ListBulkImportsAsync(ListBulkImportsRequest { ... }) -> ListImportsResponse
-
-
-
List all recent and ongoing import operations.
By default,
list_importsreturns up to 100 imports per page. If thelimitparameter is set,listreturns up to that number of imports instead. Whenever there are additional IDs to return, the response also includes apagination_tokenthat you can use to get the next batch of imports. When the response does not include apagination_token, there are no more imports to return.For guidance and examples, see Import data.
-
-
-
await client.Index.ListBulkImportsAsync(new ListBulkImportsRequest());
-
-
-
request:
ListBulkImportsRequest
-
-
client.Index.StartBulkImportAsync(StartImportRequest { ... }) -> StartImportResponse
-
-
-
Start an asynchronous import of vectors from object storage into an index.
For guidance and examples, see Import data.
-
-
-
await client.Index.StartBulkImportAsync(new StartImportRequest { Uri = "uri" });
-
-
-
request:
StartImportRequest
-
-
client.Index.DescribeBulkImportAsync(id) -> ImportModel
-
-
-
Return details of a specific import operation.
For guidance and examples, see Import data.
-
-
-
await client.Index.DescribeBulkImportAsync("101");
-
-
-
id:
string— Unique identifier for the import operation.
-
-
client.Index.CancelBulkImportAsync(id) -> CancelImportResponse
-
-
-
Cancel an import operation if it is not yet finished. It has no effect if the operation is already finished.
For guidance and examples, see Import data.
-
-
-
await client.Index.CancelBulkImportAsync("101");
-
-
-
id:
string— Unique identifier for the import operation.
-
-
client.Index.SearchRecordsAsync(namespace_, SearchRecordsRequest { ... }) -> SearchRecordsResponse
-
-
-
Search a namespace with a query text, query vector, or record ID and return the most similar records, along with their similarity scores. Optionally, rerank the initial results based on their relevance to the query.
Searching with text is supported only for indexes with integrated embedding. Searching with a query vector or record ID is supported for all indexes.
For guidance and examples, see Search.
-
-
-
await client.Index.SearchRecordsAsync( "namespace", new SearchRecordsRequest { Query = new SearchRecordsRequestQuery { TopK = 10, Inputs = new Dictionary<string, object>() { { "text", "your query text" } }, }, Fields = new List<string>() { "chunk_text" }, } );
-
-
-
namespace_:
string— The namespace to search.
-
request:
SearchRecordsRequest
-
-
client.Index.DescribeIndexStatsAsync(DescribeIndexStatsRequest { ... }) -> DescribeIndexStatsResponse
-
-
-
Get index stats
Return statistics about the contents of an index, including the vector count per namespace, the number of dimensions, and the index fullness.
Serverless indexes scale automatically as needed, so index fullness is relevant only for pod-based indexes.
-
-
-
await client.Index.DescribeIndexStatsAsync(new DescribeIndexStatsRequest());
-
-
-
request:
DescribeIndexStatsRequest
-
-
client.Index.ListNamespacesAsync(ListNamespacesRequest { ... }) -> ListNamespacesResponse
-
-
-
Get list of all namespaces
Get a list of all namespaces within an index.
-
-
-
await client.Index.ListNamespacesAsync(new ListNamespacesRequest());
-
-
-
request:
ListNamespacesRequest
-
-
client.Index.QueryAsync(QueryRequest { ... }) -> QueryResponse
-
-
-
Search with a vector
Search a namespace with a query vector or record ID and return the IDs of the most similar records, along with their similarity scores.
For guidance and examples, see Search.
-
-
-
await client.Index.QueryAsync( new QueryRequest { TopK = 3, Namespace = "example", IncludeValues = true, IncludeMetadata = true, } );
-
-
-
request:
QueryRequest
-
-
client.Index.DeleteAsync(DeleteRequest { ... }) -> DeleteResponse
-
-
-
Delete vectors
Delete vectors by id from a single namespace.
For guidance and examples, see Delete data.
-
-
-
await client.Index.DeleteAsync( new DeleteRequest { Ids = new List<string>() { "v1", "v2", "v3" }, Namespace = "example", } );
-
-
-
request:
DeleteRequest
-
-
client.Index.FetchAsync(FetchRequest { ... }) -> FetchResponse
-
-
-
Fetch vectors
Look up and return vectors by ID from a single namespace. The returned vectors include the vector data and/or metadata.
For guidance and examples, see Fetch data.
-
-
-
await client.Index.FetchAsync(new FetchRequest { Ids = ["v1"], Namespace = "example" });
-
-
-
request:
FetchRequest
-
-
client.Index.ListAsync(ListRequest { ... }) -> ListResponse
-
-
-
List vector IDs
List the IDs of vectors in a single namespace of a serverless index. An optional prefix can be passed to limit the results to IDs with a common prefix.
This returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If the
limitparameter is set,listreturns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes apagination_tokenthat you can use to get the next batch of IDs. When the response does not include apagination_token, there are no more IDs to return.For guidance and examples, see List record IDs.
Note:
listis supported only for serverless indexes.
-
-
-
await client.Index.ListAsync( new ListRequest { Limit = 50, Namespace = "example", PaginationToken = "eyJza2lwX3Bhc3QiOiIxMDEwMy0=", } );
-
-
-
request:
ListRequest
-
-
client.Index.UpdateAsync(UpdateRequest { ... }) -> UpdateResponse
-
-
-
Update a vector
Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a
set_metadatais included, the values of the fields specified in it will be added or overwrite the previous value.For guidance and examples, see Update data.
-
-
-
await client.Index.UpdateAsync( new UpdateRequest { Id = "v1", Namespace = "example", Values = new[] { 42.2f, 50.5f, 60.8f }, } );
-
-
-
request:
UpdateRequest
-
-
client.Index.UpsertAsync(UpsertRequest { ... }) -> UpsertResponse
-
-
-
Upsert vectors
Upsert vectors into a namespace. If a new value is upserted for an existing vector ID, it will overwrite the previous value.
For guidance and examples, see Upsert data.
-
-
-
await client.Index.UpsertAsync( new UpsertRequest { Vectors = new List<Vector>() { new Vector { Id = "v1", Values = new[] { 0.1f, 0.2f, 0.3f } }, }, } );
-
-
-
request:
UpsertRequest
-
-
client.Inference.EmbedAsync(EmbedRequest { ... }) -> EmbeddingsList
-
-
-
Generate vector embeddings for input data. This endpoint uses Pinecone Inference.
-
-
-
await client.Inference.EmbedAsync( new EmbedRequest { Model = "multilingual-e5-large", Inputs = new List<EmbedRequestInputsItem>() { new EmbedRequestInputsItem() }, } );
-
-
-
request:
EmbedRequest
-
-
client.Inference.RerankAsync(RerankRequest { ... }) -> RerankResult
-
-
-
Rerank documents according to their relevance to a query.
For guidance and examples, see Rerank results.
-
-
-
await client.Inference.RerankAsync( new RerankRequest { Model = "bge-reranker-v2-m3", Query = "What is the capital of France?", Documents = new List<Dictionary<string, object?>>() { new Dictionary<string, object>() { { "id", "1" }, { "text", "Paris is the capital of France." }, { "title", "France" }, { "url", "https://example.com" }, }, }, } );
-
-
-
request:
RerankRequest
-
-
client.Inference.Models.ListAsync(ListModelsRequest { ... }) -> ModelInfoList
-
-
-
Get available models.
-
-
-
await client.Inference.Models.ListAsync(new ListModelsRequest());
-
-
-
request:
ListModelsRequest
-
-
client.Inference.Models.GetAsync(modelName) -> ModelInfo
-
-
-
Get model details.
-
-
-
await client.Inference.Models.GetAsync("multilingual-e5-large");
-
-
-
modelName:
string— The name of the model to look up.
-
-