[metadata]
apple-mobile-web-app-title: Pinecone Docs
application-name: Pinecone Docs
description: 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.
generator: Mintlify
google-site-verification: woTBImNAcYO-gseVfFKIzQrDRUmLWzFjBWrYbYkOTlI
msapplication-TileColor: #002BFF
msapplication-config: /mintlify-assets/_mintlify/favicons/pinecone/JqxxUxUkDTnX7oN2/_generated/favicon/browserconfig.xml
og:description: 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.
og:image: https://www.pinecone.io/images/docs_og_image_v2.png
og:image:height: 630
og:image:width: 1200
og:site_name: Pinecone Docs
og:title: Create an index - Pinecone Docs
og:type: website
og:url: https://docs.pinecone.io/reference/api/2025-04/control-plane/create_index
twitter:card: summary_large_image
twitter:description: Search through billions of items for similar matches to any object, in milliseconds. It's the next generation of search, an API call away.
twitter:image: https://www.pinecone.io/images/docs_og_image_v2.png
twitter:image:height: 630
twitter:image:width: 1200
twitter:title: The vector database to build knowledgeable AI | Pinecone
viewport: width=device-width, initial-scale=1, viewport-fit=cover

[canonical-links]
https://docs.pinecone.io/reference/api/2025-04/control-plane/create_index

[document-links]
/llms.txt: /llms.txt
Authentication: /reference/api/authentication
Authentication: /reference/cli/authentication
BYOC indexes: http://docs.pinecone.io/guides/production/bring-your-own-cloud
Command reference: /reference/cli/command-reference
Create an index with integrated embedding: /reference/api/2025-04/control-plane/create_for_model
Create an index: https://docs.pinecone.io/guides/index-data/create-an-index
DEL Delete an index: /reference/api/2025-04/control-plane/delete_index
Errors: /reference/api/errors
Examples: /examples/notebooks
GET Describe an index: /reference/api/2025-04/control-plane/describe_index
GET List indexes: /reference/api/2025-04/control-plane/list_indexes
Guides: /guides/get-started/overview
Integrations: /integrations/overview
Introduction: /reference/api/introduction
List indexes: /reference/api/2025-04/control-plane/list_indexes
Log In: https://app.pinecone.io/?sessionType=login
Models: /models/overview
PATCH Configure an index: /reference/api/2025-04/control-plane/configure_index
POST Create an index with integrated embedding: /reference/api/2025-04/control-plane/create_for_model
POST Create an index: /reference/api/2025-04/control-plane/create_index
POST Get index stats: /reference/api/2025-04/data-plane/describeindexstats
Pinecone Docs home page: https://www.pinecone.io
Pinecone SDKs overview: /reference/pinecone-sdks
Quickstart: /reference/cli/quickstart
Reference: /reference/api/introduction
Releases: /release-notes/2026
See details: /guides/manage-cost/understanding-cost#imports
Sign up free: https://app.pinecone.io/?sessionType=signup
Spark-Pinecone connector: /reference/tools/pinecone-spark-connector
Status: https://status.pinecone.io
Support: https://app.pinecone.io/organizations/-/settings/support
Target context: /reference/cli/target-context
Troubleshooting: /troubleshooting/contact-support
Versioning: /reference/api/versioning
cloud and region: http://docs.pinecone.io/guides/index-data/create-an-index#cloud-regions
console: https://app.pinecone.io/
deletion protection: http://docs.pinecone.io/guides/manage-data/manage-indexes#configure-deletion-protection
environment: http://docs.pinecone.io/guides/indexes/pods/understanding-pod-based-indexes#pod-environments
github: https://github.com/pinecone-io
linkedin: https://www.linkedin.com/company/pinecone-io
pod type and size: http://docs.pinecone.io/guides/indexes/pods/understanding-pod-based-indexes#pod-types
x: https://x.com/pinecone?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor
youtube: https://www.youtube.com/@pinecone-io

[structured-data]
{"@context":"https://schema.org","@graph":[{"@id":"https://docs.pinecone.io/#organization","@type":"Organization","logo":{"@type":"ImageObject","url":"https://mintcdn.com/pinecone/HsZKO51bNmpAasdT/logo/Pinecone-Full-Logo-Black.svg?fit=max&auto=format&n=HsZKO51bNmpAasdT&q=85&s=211d0e7bbefc29ce3b8feee1a05d76ee"},"name":"Pinecone Docs","url":"https://docs.pinecone.io"},{"@id":"https://docs.pinecone.io#website","@type":"WebSite","name":"Pinecone Docs","publisher":{"@id":"https://docs.pinecone.io/#organization"},"url":"https://docs.pinecone.io"},{"@id":"https://docs.pinecone.io/reference/api/2025-04/control-plane/create_index#webpage","@type":"WebPage","breadcrumb":{"@id":"https://docs.pinecone.io/reference/api/2025-04/control-plane/create_index#breadcrumb"},"dateModified":"2026-01-28T17:44:02.031Z","description":"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.","isPartOf":{"@id":"https://docs.pinecone.io#website"},"name":"Create an index","url":"https://docs.pinecone.io/reference/api/2025-04/control-plane/create_index"},{"@id":"https://docs.pinecone.io/reference/api/2025-04/control-plane/create_index#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","item":"https://docs.pinecone.io/reference/api/2025-04/control-plane/list_indexes","name":"Database","position":1},{"@type":"ListItem","item":"https://docs.pinecone.io/reference/api/2025-04/control-plane/list_indexes","name":"Indexes","position":2},{"@type":"ListItem","item":"https://docs.pinecone.io/reference/api/2025-04/control-plane/create_index","name":"Create an index","position":3}]},{"@id":"https://docs.pinecone.io/reference/api/2025-04/control-plane/create_index#apireference","@type":["TechArticle","APIReference"],"dateModified":"2026-01-28T17:44:02.031Z","description":"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.","headline":"Create an index","image":"https://www.pinecone.io/images/docs_og_image_v2.png","isPartOf":{"@id":"https://docs.pinecone.io#website"},"mainEntityOfPage":{"@id":"https://docs.pinecone.io/reference/api/2025-04/control-plane/create_index#webpage"},"name":"Create an index","publisher":{"@id":"https://docs.pinecone.io/#organization"},"url":"https://docs.pinecone.io/reference/api/2025-04/control-plane/create_index"}]}

[content]
Create an index - Pinecone Docs
Documentation Index
Fetch the complete documentation index at:
/llms.txt
Use this file to discover all available pages before exploring further.
Skip to main content
🎉 New: Standard and Enterprise orgs get a one-time
$250 bulk import credit
(1 TB), valid through August 30, 2026.
See details
Pinecone Docs
home page
2025-04
Search...
⌘
K
Ask Assistant
Status
Support
Log In
Sign up free
Sign up free
Search...
Navigation
Indexes
Create an index
Guides
Reference
Examples
Models
Integrations
Troubleshooting
Releases
Pinecone Database
APIs
Introduction
Authentication
Versioning
Limits
Errors
Database
Indexes
GET
List indexes
POST
Create an index
POST
Create an index with integrated embedding
GET
Describe an index
DEL
Delete an index
PATCH
Configure an index
POST
Get index stats
Namespaces
Vectors
Search
Imports
Backups
Inference
Embed
Rerank
Models
Admin
API keys
Projects
Service accounts
SDKs
Pinecone SDKs overview
Python
Node.js
Java
Go
CLI
Quickstart
Command reference
Authentication
Target context
Tools
Spark-Pinecone connector
Python
JavaScript
Java
Go
C#
curl
CLI
# pip install "pinecone[grpc]"
from
pinecone.grpc
import
PineconeGRPC
as
Pinecone
from
pinecone
import
ServerlessSpec
pc
=
Pinecone(
api_key
=
"YOUR_API_KEY"
)
pc.create_index(
name
=
"docs-example1"
,
dimension
=
1536
,
metric
=
"cosine"
,
spec
=
ServerlessSpec(
cloud
=
"aws"
,
region
=
"us-east-1"
,
),
deletion_protection
=
"disabled"
)
// npm install @pinecone-database/pinecone
import
{
Pinecone
}
from
'@pinecone-database/pinecone'
const
pc
=
new
Pinecone
({
apiKey:
'YOUR_API_KEY'
});
await
pc
.
createIndex
({
name:
'docs-example1'
,
dimension:
1536
,
metric:
'cosine'
,
spec:
{
serverless:
{
cloud:
'aws'
,
region:
'us-east-1'
}
},
deletionProtection:
'disabled'
,
});
import
io.pinecone.clients.Pinecone;
public
class
CreateServerlessIndexExample
{
public
static
void
main
(
String
[]
args
) {
Pinecone
pc
=
new
Pinecone.
Builder
(
"YOUR_API_KEY"
).
build
();
pc
.
createServerlessIndex
(
"docs-example1"
,
"cosine"
,
1536
,
"aws"
,
"us-east-1"
,
DeletionProtection
.
disabled
);
}
}
package
main
import
(
"
context
"
"
fmt
"
"
log
"
"
github.com/pinecone-io/go-pinecone/v4/pinecone
"
)
func
main
() {
ctx
:=
context
.
Background
()
pc
,
err
:=
pinecone
.
NewClient
(
pinecone
.
NewClientParams
{
ApiKey
:
"YOUR_API_KEY"
,
})
if
err
!=
nil
{
log
.
Fatalf
(
"Failed to create Client:
%v
"
,
err
)
}
deletionProtection
:=
pinecone
.
DeletionProtectionDisabled
idx
,
err
:=
pc
.
CreateServerlessIndex
(
ctx
,
&
pinecone
.
CreateServerlessIndexRequest
{
Name
:
"docs-example1"
,
Dimension
:
1536
,
Metric
:
pinecone
.
Cosine
,
Cloud
:
pinecone
.
Aws
,
Region
:
"us-east-1"
,
DeletionProtection
:
&
deletionProtection
,
})
if
err
!=
nil
{
log
.
Fatalf
(
"Failed to create serverless index:
%v
"
,
err
)
}
else
{
fmt
.
Printf
(
"Successfully created serverless index:
%v
"
,
idx
.
Name
)
}
}
using
Pinecone
;
var
pinecone
=
new
PineconeClient
(
"YOUR_API_KEY"
);
var
createIndexRequest
=
await
pinecone
.
CreateIndexAsync
(
new
CreateIndexRequest
{
Name
=
"docs-example1"
,
Dimension
=
1536
,
Metric
=
MetricType
.
Cosine
,
Spec
=
new
ServerlessIndexSpec
{
Serverless
=
new
ServerlessSpec
{
Cloud
=
ServerlessSpecCloud
.
Aws
,
Region
=
"us-east-1"
,
}
},
DeletionProtection
=
DeletionProtection
.
Disabled
});
PINECONE_API_KEY
=
"YOUR_API_KEY"
# Serverless index
curl
-X
POST
"https://api.pinecone.io/indexes"
\
-H
"Accept: application/json"
\
-H
"Content-Type: application/json"
\
-H
"Api-Key:
$PINECONE_API_KEY
"
\
-H
"X-Pinecone-Api-Version: 2025-04"
\
-d
'{
"name": "docs-example1",
"vector_type": "dense",
"dimension": 1536,
"metric": "cosine",
"spec": {
"serverless": {
"cloud": "aws",
"region": "us-east-1"
}
},
"tags": {
"example": "tag"
},
"deletion_protection": "disabled"
}'
# BYOC index
curl
-X
POST"https://api.pinecone.io/indexes"
\
-H
"Accept: application/json"
\
-H
"Content-Type: application/json"
\
-H
"Api-Key:
$PINECONE_API_KEY
"
\
-H
"X-Pinecone-Api-Version: 2025-04"
\
-d
'{
"name": "example-byoc-index",
"vector_type": "dense",
"dimension": 1536,
"metric": "cosine",
"spec": {
"byoc": {
"environment": "aws-us-east-1-b921"
}
},
"tags": {
"example": "tag"
},
"deletion_protection": "disabled"
}'
# Target the project where you'd like to create the index.
pc
target
-o
"example-org"
-p
"example-project"
# Create the index.
pc
index
create
\
--name
"docs-example1"
\
--dimension
1536
\
--metric
"cosine"
\
--cloud
"aws"
\
--region
"us-east-1"
\
--deletion_protection
"disabled"
\
--tags
"example=tag,example2=tag2"
Response
# Serverless index
{
"name"
:
"docs-example1",
"vector_type"
:
"dense",
"metric"
:
"cosine",
"dimension"
:
1536,
"status"
:
{
"ready"
:
true
,
"state"
:
"Ready"
},
"host"
:
"example-serverless-index-govk0nt.svc.aped-4627-b74a.pinecone.io",
"spec"
:
{
"serverless"
:
{
"region"
:
"us-east-1",
"cloud"
:
"aws"
}
},
"deletion_protection"
:
"disabled",
"tags"
:
{
"example"
:
"tag"
}
}
# BYOC index
{
"name"
:
"example-byoc-index",
"vector_type"
:
"dense",
"metric"
:
"cosine",
"dimension"
:
1536,
"status"
:
{
"ready"
:
true
,
"state"
:
"Ready"
},
"host"
:
"example-byoc-index-govk0nt.svc.private.aped-4627-b74a.pinecone.io",
"spec"
:
{
"byoc"
:
{
"environment"
:
"aws-us-east-1-b921"
}
},
"deletion_protection"
:
"disabled",
"tags"
:
{
"example"
:
"tag"
}
}
Indexes
Create an index
Copy page
Copy page
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
.
Copy page
Copy page
POST
/
indexes
Python
JavaScript
Java
Go
C#
curl
CLI
# pip install "pinecone[grpc]"
from
pinecone.grpc
import
PineconeGRPC
as
Pinecone
from
pinecone
import
ServerlessSpec
pc
=
Pinecone(
api_key
=
"YOUR_API_KEY"
)
pc.create_index(
name
=
"docs-example1"
,
dimension
=
1536
,
metric
=
"cosine"
,
spec
=
ServerlessSpec(
cloud
=
"aws"
,
region
=
"us-east-1"
,
),
deletion_protection
=
"disabled"
)
// npm install @pinecone-database/pinecone
import
{
Pinecone
}
from
'@pinecone-database/pinecone'
const
pc
=
new
Pinecone
({
apiKey:
'YOUR_API_KEY'
});
await
pc
.
createIndex
({
name:
'docs-example1'
,
dimension:
1536
,
metric:
'cosine'
,
spec:
{
serverless:
{
cloud:
'aws'
,
region:
'us-east-1'
}
},
deletionProtection:
'disabled'
,
});
import
io.pinecone.clients.Pinecone;
public
class
CreateServerlessIndexExample
{
public
static
void
main
(
String
[]
args
) {
Pinecone
pc
=
new
Pinecone.
Builder
(
"YOUR_API_KEY"
).
build
();
pc
.
createServerlessIndex
(
"docs-example1"
,
"cosine"
,
1536
,
"aws"
,
"us-east-1"
,
DeletionProtection
.
disabled
);
}
}
package
main
import
(
"
context
"
"
fmt
"
"
log
"
"
github.com/pinecone-io/go-pinecone/v4/pinecone
"
)
func
main
() {
ctx
:=
context
.
Background
()
pc
,
err
:=
pinecone
.
NewClient
(
pinecone
.
NewClientParams
{
ApiKey
:
"YOUR_API_KEY"
,
})
if
err
!=
nil
{
log
.
Fatalf
(
"Failed to create Client:
%v
"
,
err
)
}
deletionProtection
:=
pinecone
.
DeletionProtectionDisabled
idx
,
err
:=
pc
.
CreateServerlessIndex
(
ctx
,
&
pinecone
.
CreateServerlessIndexRequest
{
Name
:
"docs-example1"
,
Dimension
:
1536
,
Metric
:
pinecone
.
Cosine
,
Cloud
:
pinecone
.
Aws
,
Region
:
"us-east-1"
,
DeletionProtection
:
&
deletionProtection
,
})
if
err
!=
nil
{
log
.
Fatalf
(
"Failed to create serverless index:
%v
"
,
err
)
}
else
{
fmt
.
Printf
(
"Successfully created serverless index:
%v
"
,
idx
.
Name
)
}
}
using
Pinecone
;
var
pinecone
=
new
PineconeClient
(
"YOUR_API_KEY"
);
var
createIndexRequest
=
await
pinecone
.
CreateIndexAsync
(
new
CreateIndexRequest
{
Name
=
"docs-example1"
,
Dimension
=
1536
,
Metric
=
MetricType
.
Cosine
,
Spec
=
new
ServerlessIndexSpec
{
Serverless
=
new
ServerlessSpec
{
Cloud
=
ServerlessSpecCloud
.
Aws
,
Region
=
"us-east-1"
,
}
},
DeletionProtection
=
DeletionProtection
.
Disabled
});
PINECONE_API_KEY
=
"YOUR_API_KEY"
# Serverless index
curl
-X
POST
"https://api.pinecone.io/indexes"
\
-H
"Accept: application/json"
\
-H
"Content-Type: application/json"
\
-H
"Api-Key:
$PINECONE_API_KEY
"
\
-H
"X-Pinecone-Api-Version: 2025-04"
\
-d
'{
"name": "docs-example1",
"vector_type": "dense",
"dimension": 1536,
"metric": "cosine",
"spec": {
"serverless": {
"cloud": "aws",
"region": "us-east-1"
}
},
"tags": {
"example": "tag"
},
"deletion_protection": "disabled"
}'
# BYOC index
curl
-X
POST"https://api.pinecone.io/indexes"
\
-H
"Accept: application/json"
\
-H
"Content-Type: application/json"
\
-H
"Api-Key:
$PINECONE_API_KEY
"
\
-H
"X-Pinecone-Api-Version: 2025-04"
\
-d
'{
"name": "example-byoc-index",
"vector_type": "dense",
"dimension": 1536,
"metric": "cosine",
"spec": {
"byoc": {
"environment": "aws-us-east-1-b921"
}
},
"tags": {
"example": "tag"
},
"deletion_protection": "disabled"
}'
# Target the project where you'd like to create the index.
pc
target
-o
"example-org"
-p
"example-project"
# Create the index.
pc
index
create
\
--name
"docs-example1"
\
--dimension
1536
\
--metric
"cosine"
\
--cloud
"aws"
\
--region
"us-east-1"
\
--deletion_protection
"disabled"
\
--tags
"example=tag,example2=tag2"
Response
# Serverless index
{
"name"
:
"docs-example1",
"vector_type"
:
"dense",
"metric"
:
"cosine",
"dimension"
:
1536,
"status"
:
{
"ready"
:
true
,
"state"
:
"Ready"
},
"host"
:
"example-serverless-index-govk0nt.svc.aped-4627-b74a.pinecone.io",
"spec"
:
{
"serverless"
:
{
"region"
:
"us-east-1",
"cloud"
:
"aws"
}
},
"deletion_protection"
:
"disabled",
"tags"
:
{
"example"
:
"tag"
}
}
# BYOC index
{
"name"
:
"example-byoc-index",
"vector_type"
:
"dense",
"metric"
:
"cosine",
"dimension"
:
1536,
"status"
:
{
"ready"
:
true
,
"state"
:
"Ready"
},
"host"
:
"example-byoc-index-govk0nt.svc.private.aped-4627-b74a.pinecone.io",
"spec"
:
{
"byoc"
:
{
"environment"
:
"aws-us-east-1-b921"
}
},
"deletion_protection"
:
"disabled",
"tags"
:
{
"example"
:
"tag"
}
}
Python
JavaScript
Java
Go
C#
curl
CLI
# pip install "pinecone[grpc]"
from
pinecone.grpc
import
PineconeGRPC
as
Pinecone
from
pinecone
import
ServerlessSpec
pc
=
Pinecone(
api_key
=
"YOUR_API_KEY"
)
pc.create_index(
name
=
"docs-example1"
,
dimension
=
1536
,
metric
=
"cosine"
,
spec
=
ServerlessSpec(
cloud
=
"aws"
,
region
=
"us-east-1"
,
),
deletion_protection
=
"disabled"
)
// npm install @pinecone-database/pinecone
import
{
Pinecone
}
from
'@pinecone-database/pinecone'
const
pc
=
new
Pinecone
({
apiKey:
'YOUR_API_KEY'
});
await
pc
.
createIndex
({
name:
'docs-example1'
,
dimension:
1536
,
metric:
'cosine'
,
spec:
{
serverless:
{
cloud:
'aws'
,
region:
'us-east-1'
}
},
deletionProtection:
'disabled'
,
});
import
io.pinecone.clients.Pinecone;
public
class
CreateServerlessIndexExample
{
public
static
void
main
(
String
[]
args
) {
Pinecone
pc
=
new
Pinecone.
Builder
(
"YOUR_API_KEY"
).
build
();
pc
.
createServerlessIndex
(
"docs-example1"
,
"cosine"
,
1536
,
"aws"
,
"us-east-1"
,
DeletionProtection
.
disabled
);
}
}
package
main
import
(
"
context
"
"
fmt
"
"
log
"
"
github.com/pinecone-io/go-pinecone/v4/pinecone
"
)
func
main
() {
ctx
:=
context
.
Background
()
pc
,
err
:=
pinecone
.
NewClient
(
pinecone
.
NewClientParams
{
ApiKey
:
"YOUR_API_KEY"
,
})
if
err
!=
nil
{
log
.
Fatalf
(
"Failed to create Client:
%v
"
,
err
)
}
deletionProtection
:=
pinecone
.
DeletionProtectionDisabled
idx
,
err
:=
pc
.
CreateServerlessIndex
(
ctx
,
&
pinecone
.
CreateServerlessIndexRequest
{
Name
:
"docs-example1"
,
Dimension
:
1536
,
Metric
:
pinecone
.
Cosine
,
Cloud
:
pinecone
.
Aws
,
Region
:
"us-east-1"
,
DeletionProtection
:
&
deletionProtection
,
})
if
err
!=
nil
{
log
.
Fatalf
(
"Failed to create serverless index:
%v
"
,
err
)
}
else
{
fmt
.
Printf
(
"Successfully created serverless index:
%v
"
,
idx
.
Name
)
}
}
using
Pinecone
;
var
pinecone
=
new
PineconeClient
(
"YOUR_API_KEY"
);
var
createIndexRequest
=
await
pinecone
.
CreateIndexAsync
(
new
CreateIndexRequest
{
Name
=
"docs-example1"
,
Dimension
=
1536
,
Metric
=
MetricType
.
Cosine
,
Spec
=
new
ServerlessIndexSpec
{
Serverless
=
new
ServerlessSpec
{
Cloud
=
ServerlessSpecCloud
.
Aws
,
Region
=
"us-east-1"
,
}
},
DeletionProtection
=
DeletionProtection
.
Disabled
});
PINECONE_API_KEY
=
"YOUR_API_KEY"
# Serverless index
curl
-X
POST
"https://api.pinecone.io/indexes"
\
-H
"Accept: application/json"
\
-H
"Content-Type: application/json"
\
-H
"Api-Key:
$PINECONE_API_KEY
"
\
-H
"X-Pinecone-Api-Version: 2025-04"
\
-d
'{
"name": "docs-example1",
"vector_type": "dense",
"dimension": 1536,
"metric": "cosine",
"spec": {
"serverless": {
"cloud": "aws",
"region": "us-east-1"
}
},
"tags": {
"example": "tag"
},
"deletion_protection": "disabled"
}'
# BYOC index
curl
-X
POST"https://api.pinecone.io/indexes"
\
-H
"Accept: application/json"
\
-H
"Content-Type: application/json"
\
-H
"Api-Key:
$PINECONE_API_KEY
"
\
-H
"X-Pinecone-Api-Version: 2025-04"
\
-d
'{
"name": "example-byoc-index",
"vector_type": "dense",
"dimension": 1536,
"metric": "cosine",
"spec": {
"byoc": {
"environment": "aws-us-east-1-b921"
}
},
"tags": {
"example": "tag"
},
"deletion_protection": "disabled"
}'
# Target the project where you'd like to create the index.
pc
target
-o
"example-org"
-p
"example-project"
# Create the index.
pc
index
create
\
--name
"docs-example1"
\
--dimension
1536
\
--metric
"cosine"
\
--cloud
"aws"
\
--region
"us-east-1"
\
--deletion_protection
"disabled"
\
--tags
"example=tag,example2=tag2"
Response
# Serverless index
{
"name"
:
"docs-example1",
"vector_type"
:
"dense",
"metric"
:
"cosine",
"dimension"
:
1536,
"status"
:
{
"ready"
:
true
,
"state"
:
"Ready"
},
"host"
:
"example-serverless-index-govk0nt.svc.aped-4627-b74a.pinecone.io",
"spec"
:
{
"serverless"
:
{
"region"
:
"us-east-1",
"cloud"
:
"aws"
}
},
"deletion_protection"
:
"disabled",
"tags"
:
{
"example"
:
"tag"
}
}
# BYOC index
{
"name"
:
"example-byoc-index",
"vector_type"
:
"dense",
"metric"
:
"cosine",
"dimension"
:
1536,
"status"
:
{
"ready"
:
true
,
"state"
:
"Ready"
},
"host"
:
"example-byoc-index-govk0nt.svc.private.aped-4627-b74a.pinecone.io",
"spec"
:
{
"byoc"
:
{
"environment"
:
"aws-us-east-1-b921"
}
},
"deletion_protection"
:
"disabled",
"tags"
:
{
"example"
:
"tag"
}
}
Authorizations
​
Api-Key
string
header
required
An API Key is required to call Pinecone APIs. Get yours from the
console
.
Body
application/json
The desired configuration for the index.
The configuration needed to create a Pinecone index.
​
name
string
required
The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
Required string length:
1 - 45
Example
:
"example-index"
​
spec
object
required
The spec object defines how the index should be deployed.
For serverless indexes, you set only the
cloud and region
where the index should be hosted. For pod-based indexes, you set the
environment
where the index should be hosted, the
pod type and size
to use, and other index characteristics. For
BYOC indexes
, you set the environment name provided to you during onboarding.
Option 1
Option 2
Option 3
Show
child attributes
​
dimension
integer<int32>
The dimensions of the vectors to be inserted in the index.
Required range
:
1 <= x <= 20000
Example
:
1536
​
metric
enum<string>
The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the
vector_type
is
dense
, the metric defaults to 'cosine'.
Available options
:
cosine
,
euclidean
,
dotproduct
​
deletion_protection
enum<string>
default:
disabled
Whether
deletion protection
is enabled/disabled for the index.
Available options
:
disabled
,
enabled
​
tags
object
Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '
', or '-'. Values must be alphanumeric, ';', '@', '
', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string.
Show
child attributes
Example
:
{
"tag0"
:
"val0"
,
"tag1"
:
"val1"
}
​
vector_type
string
default:
dense
The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified.
Response
201
application/json
The index has been successfully created.
The IndexModel describes the configuration and status of a Pinecone index.
​
name
string
required
The name of the index. Resource name must be 1-45 characters long, start and end with an alphanumeric character, and consist only of lower case alphanumeric characters or '-'.
Required string length:
1 - 45
Example
:
"example-index"
​
metric
enum<string>
required
The distance metric to be used for similarity search. You can use 'euclidean', 'cosine', or 'dotproduct'. If the 'vector_type' is 'sparse', the metric must be 'dotproduct'. If the
vector_type
is
dense
, the metric defaults to 'cosine'.
Available options
:
cosine
,
euclidean
,
dotproduct
​
host
string
required
The URL address where the index is hosted.
Example
:
"semantic-search-c01b5b5.svc.us-west1-gcp.pinecone.io"
​
spec
object
required
Show
child attributes
Example
:
{
"pod"
: {
"environment"
:
"us-east-1-aws"
,
"metadata_config"
: {
"indexed"
: [
"genre"
,
"title"
,
"imdb_rating"
]
},
"pod_type"
:
"p1.x1"
,
"pods"
:
1
,
"replicas"
:
1
,
"shards"
:
1
}
}
​
status
object
required
Show
child attributes
Example
:
{
"ready"
:
true
,
"state"
:
"ScalingUpPodSize"
}
​
vector_type
string
default:
dense
required
The index vector type. You can use 'dense' or 'sparse'. If 'dense', the vector dimension must be specified. If 'sparse', the vector dimension should not be specified.
​
dimension
integer<int32>
The dimensions of the vectors to be inserted in the index.
Required range
:
1 <= x <= 20000
Example
:
1536
​
private_host
string
The private endpoint URL of an index.
Example
:
"semantic-search-c01b5b5.svc.private.us-west1-gcp.pinecone.io"
​
deletion_protection
enum<string>
default:
disabled
Whether
deletion protection
is enabled/disabled for the index.
Available options
:
disabled
,
enabled
​
tags
object
Custom user tags added to an index. Keys must be 80 characters or less. Values must be 120 characters or less. Keys must be alphanumeric, '
', or '-'. Values must be alphanumeric, ';', '@', '
', '-', '.', '+', or ' '. To unset a key, set the value to be an empty string.
Show
child attributes
Example
:
{
"tag0"
:
"val0"
,
"tag1"
:
"val1"
}
​
embed
object
The embedding model and document fields mapped to embedding inputs.
Show
child attributes
Example
:
{
"field_map"
: {
"text"
:
"your-text-field"
},
"metric"
:
"cosine"
,
"model"
:
"multilingual-e5-large"
,
"read_parameters"
: {
"input_type"
:
"query"
,
"truncate"
:
"NONE"
},
"write_parameters"
: {
"input_type"
:
"passage"
}
}
Was this page helpful?
Yes
No
List indexes
Create an index with integrated embedding
⌘
I
x
linkedin
youtube
github
Assistant
Responses are generated using AI and may contain mistakes.
