Index creation error with .NET API call

Hi there. Trying to use .NET to call pinecone. Using the default Http client, with function PostAsJsonAsync.

When I POST to the index creation API, I’m getting a JSON error:

Failed to deserialize the JSON body into the target type: invalid type: string "{\"name\":\"dev-test-classification-ch\",\"dimension\":3072,\"metric\":\"cosine\",\"spec\":{\"serverless\":{\"cloud\":\"aws\",\"region\":\"us-west-2\"}}}", expected struct GlobalCreateIndexRequest at line 1 column 243

I cannot find ANY references to that struct in any of the other clients. My JSON appears to match the cURL examples identically.

See NuGet Gallery | Pinecone.NET 2.0.0

There isn’t an official client but your experience will be much better using it, now that thanks to a new contributor it supports serverless as well.