Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

Create an API key

curl
PINECONE_PROJECT_ID="32c8235a-5220-4a80-a9f1-69c24109e6f2"
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"

curl -X POST "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"] 
         }'
CLI
# Target the project for which you want to create an API key.
pc target -o "example-org" -p "example-project"
# Create the API key
pc api-key create -n "example-api-key" --roles ProjectEditor
curl
{
  "key": {
    "id": "62b0dbfe-3489-4b79-b850-34d911527c88",
    "name": "example-api-key",
    "project_id": "32c8235a-5220-4a80-a9f1-69c24109e6f2",
    "roles": [
      "ProjectEditor"
    ],
    "created_at": "2025-10-20T23:40:27.069075Z"
  },
  "value": "..."
}
CLI
ATTRIBUTE     VALUE
Name          example-api-key
ID            62b0dbfe-3489-4b79-b850-34d911527c88
Value         ...
Project ID    32c8235a-5220-4a80-a9f1-69c24109e6f2
Roles         ProjectEditor
POST/admin/projects/{project_id}/api-keys

Create an API key

2 parameters
  • X-Pinecone-Api-Versionstringheaderrequired

    Required date-based version header

  • project_idstringpathrequired

    Project ID

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu