The Pinecone REST API lets you interact programmatically with your Pinecone account using HTTP requests.

Authentication

All HTTP requests to the Pinecone API must contain an Api-Key header that specifies a valid API key and must be encoded as JSON with the Content-Type: application/json header.

curl -s -X POST "https://api.pinecone.io/indexes" \
   -H "Api-Key: YOUR_API_KEY" \
   -H "Content-Type: application/json" \
   -d '{
         "name":  "docs-api-intro",
         "dimension": 8,
         "metric": "euclidean",
         "spec": {
            "serverless": {
               "cloud":"aws",
               "region": "us-east-1"
            }
         }
      }'

Endpoints

Data plane

The data plane handles requests to write and read records in indexes. Indexes are partitioned into one or more logical namespaces, and all write and read requests are scoped by namespace.

For each index, there is a unique URL for performing data plane operations in the form of https://{index_host}/{operation}. The Python and Node.js clients construct these URLs for you. However, when using the API directly, you must explicitly specify them.

You can get index URLs in the Pinecone console or using the describe_index operation. For more details, see Get an index endpoint.

Control plane

The control plane handles requests to create and manage indexes and collections.

The global URL for all control plane operations is https://api.pinecone.io. You use this URL regardless of the cloud environment where an index is hosted.

Was this page helpful?