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-04" \
	-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-04" \
	-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

Authorization
string
header
required

An access token must be provided in the Authorization header using the Bearer scheme.

Path Parameters

project_id
string
required

Project ID

Body

application/json

The details of the new API key.

The body is of type object.

Response

201
application/json

API key created successfully.

The details of an API key, including the secret. Only returned on API key creation.