POST
/
databases
curl --request POST \
     --url https://controller.us-east1-gcp.pinecone.io/databases \
     --header 'accept: text/plain' \
     --header 'content-type: application/json' \
     --data '
{
  "metric": "cosine",
  "pods": 1,
  "replicas": 1,
  "pod_type": "p1.x1"
}
'
"<string>"
curl --request POST \
     --url https://controller.us-east1-gcp.pinecone.io/databases \
     --header 'accept: text/plain' \
     --header 'content-type: application/json' \
     --data '
{
  "metric": "cosine",
  "pods": 1,
  "replicas": 1,
  "pod_type": "p1.x1"
}
'

Authorizations

Api-Key
string
header
required

An API Key is required to call Pinecone APIs. Get yours at https://app.pinecone.io/.

Body

application/json
name
string
required

The name of the index to be created. The maximum length is 45 characters.

Example:

"example-index"

dimension
integer
required

The dimensions of the vectors to be inserted in the index

Example:

1024

index_type
string
default:approximated
deprecated

The type of vector index. Pinecone supports 'approximated'.

metric
string
default:cosine

The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'.

pods
integer
default:1

The number of pods for the index to use,including replicas.

replicas
integer
default:1

The number of replicas. Replicas duplicate your index. They provide higher availability and throughput.

pod_type
string
default:p1.x1

The type of pod to use. One of s1, p1, or p2 appended with . and one of x1, x2, x4, or x8.

index_config
object
deprecated
metadata_config
object | null

Configuration for the behavior of Pinecone's internal metadata index. By default, all metadata is indexed; when metadata_config is present, only specified metadata fields are indexed. To specify metadata fields to index, provide a JSON object of the following form:

{"indexed": ["example_metadata_field"]} 
source_collection
string

The name of the collection to create an index from

Response

201
text/plain
The index has been successfully created

The response is of type string.