PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_PROJECT_ID="YOUR_PROJECT_ID"
curl "https://api.pinecone.io/admin/projects/$PINECONE_PROJECT_ID/api-keys" \
-H "X-Pinecone-Api-Version: 2025-10" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-d '{
"name": "Example API Key",
"roles": ["ProjectEditor"]
}'
{
"key": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Example API key",
"project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"roles": [
"ProjectEditor"
]
},
"value": "string"
}
API keys
Create an API key
Create a new API key for a project. Developers can use the API key to authenticate requests to Pinecone’s Data Plane and Control Plane APIs.
POST
/
admin
/
projects
/
{project_id}
/
api-keys
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_PROJECT_ID="YOUR_PROJECT_ID"
curl "https://api.pinecone.io/admin/projects/$PINECONE_PROJECT_ID/api-keys" \
-H "X-Pinecone-Api-Version: 2025-10" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-d '{
"name": "Example API Key",
"roles": ["ProjectEditor"]
}'
{
"key": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Example API key",
"project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"roles": [
"ProjectEditor"
]
},
"value": "string"
}
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_PROJECT_ID="YOUR_PROJECT_ID"
curl "https://api.pinecone.io/admin/projects/$PINECONE_PROJECT_ID/api-keys" \
-H "X-Pinecone-Api-Version: 2025-10" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-d '{
"name": "Example API Key",
"roles": ["ProjectEditor"]
}'
{
"key": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Example API key",
"project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"roles": [
"ProjectEditor"
]
},
"value": "string"
}
Authorizations
An access token must be provided in the Authorization header using the Bearer scheme.
Headers
Required date-based version header
Path Parameters
Project ID
Body
application/json
The details of the new API key.
The name of the API key. The name must be 1-80 characters long.
Required string length:
1 - 80Example:
"devkey"
The roles to create the API key with. Default is ["ProjectEditor"].
A role that can be assigned to an API key.
Possible values: ProjectEditor, ProjectViewer, ControlPlaneEditor, ControlPlaneViewer, DataPlaneEditor, or DataPlaneViewer.
Response
API key created successfully.
The details of an API key, including the secret. Only returned on API key creation.
Was this page helpful?
⌘I