client.ListIndexesAsync() -> IndexList
-
-
-
This operation returns a list of all indexes in a project.
-
-
-
await client.ListIndexesAsync();
-
-
client.CreateIndexAsync(CreateIndexRequest { ... }) -> Index
-
-
-
This operation deploys 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 = CreateIndexRequestMetric.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)
-
-
-
This operation deletes an existing index.
-
-
-
await client.DeleteIndexAsync("test-index");
-
-
-
indexName:
string
— The name of the index to delete.
-
-
client.ConfigureIndexAsync(indexName, ConfigureIndexRequest { ... }) -> Index
-
-
-
This operation configures an existing index.
For serverless indexes, you can configure only index deletion protection and tags. 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
-
-
-
This operation returns a list of all collections in a project. Serverless indexes do not support collections.
-
-
-
await client.ListCollectionsAsync();
-
-
client.CreateCollectionAsync(CreateCollectionRequest { ... }) -> CollectionModel
-
-
-
This operation creates a Pinecone collection.
Serverless indexes do not support collections.
-
-
-
await client.CreateCollectionAsync( new CreateCollectionRequest { Name = "example-collection", Source = "example-source-index" } );
-
-
-
request:
CreateCollectionRequest
-
-
client.DescribeCollectionAsync(collectionName) -> CollectionModel
-
-
-
This operation gets 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)
-
-
-
This operation deletes an existing collection. Serverless indexes do not support collections.
-
-
-
await client.DeleteCollectionAsync("test-collection");
-
-
-
collectionName:
string
— The name of the collection.
-
-
client.Index.ListBulkImportsAsync(ListBulkImportsRequest { ... }) -> ListImportsResponse
-
-
-
The
list_imports
operation lists all recent and ongoing import operations. For guidance and examples, see Import data.
-
-
-
await client.Index.ListBulkImportsAsync(new ListBulkImportsRequest());
-
-
-
request:
ListBulkImportsRequest
-
-
client.Index.StartBulkImportAsync(StartImportRequest { ... }) -> StartImportResponse
-
-
-
The
start_import
operation starts 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
-
-
-
The
describe_import
operation returns details of a specific import operation. For guidance and examples, see Import data.
-
-
-
await client.Index.DescribeBulkImportAsync("101");
-
-
-
id:
string
-
-
client.Index.CancelBulkImportAsync(id) -> CancelImportResponse
-
-
-
The
cancel_import
operation cancels 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
-
-
client.Index.DescribeIndexStatsAsync(DescribeIndexStatsRequest { ... }) -> DescribeIndexStatsResponse
-
-
-
Get index stats
The
describe_index_stats
operation returns 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.
For pod-based indexes, the index fullness result may be inaccurate during pod resizing; to get the status of a pod resizing process, use
describe_index
.
-
-
-
await client.Index.DescribeIndexStatsAsync(new DescribeIndexStatsRequest());
-
-
-
request:
DescribeIndexStatsRequest
-
-
client.Index.QueryAsync(QueryRequest { ... }) -> QueryResponse
-
-
-
Query vectors
The
query
operation searches a namespace, using a query vector. It retrieves the ids of the most similar items in a namespace, along with their similarity scores.For guidance and examples, see Query data.
-
-
-
await client.Index.QueryAsync( new QueryRequest { TopK = 3, Namespace = "example", IncludeValues = true, IncludeMetadata = true, } );
-
-
-
request:
QueryRequest
-
-
client.Index.DeleteAsync(DeleteRequest { ... }) -> DeleteResponse
-
-
-
Delete vectors
The
delete
operation deletes 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
The
fetch
operation looks up and returns 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
The
list
operation lists 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.list
returns up to 100 IDs at a time by default in sorted order (bitwise/"C" collation). If thelimit
parameter is set,list
returns up to that number of IDs instead. Whenever there are additional IDs to return, the response also includes apagination_token
that 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:
list
is 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
The
update
operation updates a vector in a namespace. If a value is included, it will overwrite the previous value. If aset_metadata
is 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
The
upsert
operation writes 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 embeddings for input data.
For guidance and examples, see Generate embeddings.
-
-
-
await client.Inference.EmbedAsync( new EmbedRequest { Model = "multilingual-e5-large", Inputs = new List<EmbedRequestInputsItem>() { new EmbedRequestInputsItem() }, } );
-
-
-
request:
EmbedRequest
-
-
client.Inference.RerankAsync(RerankRequest { ... }) -> RerankResult
-
-
-
Rerank items according to their relevance to a query.
For guidance and examples, see Rerank documents.
-
-
-
await client.Inference.RerankAsync( new RerankRequest { Model = "bge-reranker-v2-m3", Query = "What is the capital of France?", Documents = new List<Dictionary<string, string>>() { new Dictionary<string, string>() { { "id", "1" }, { "text", "Paris is the capital of France." }, { "title", "France" }, { "url", "https://example.com" }, }, }, } );
-
-
-
request:
RerankRequest
-
-