// Requires Node.js SDK v8.2.0 or later
import { AdminClient } from '@pinecone-database/pinecone';
// Reads PINECONE_CLIENT_ID and PINECONE_CLIENT_SECRET from the environment
const admin = new AdminClient();
const apiKey = await admin.apiKeys.describe('YOUR_API_KEY_ID');
console.log(apiKey);
// Requires Go SDK v6.0.0 or later
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v6/pinecone"
)
func main() {
ctx := context.Background()
adminClient, err := pinecone.NewAdminClientWithContext(ctx, pinecone.NewAdminClientParams{
ClientId: os.Getenv("PINECONE_CLIENT_ID"),
ClientSecret: os.Getenv("PINECONE_CLIENT_SECRET"),
})
if err != nil {
log.Fatalf("Failed to create AdminClient: %v", err)
}
apiKey, err := adminClient.APIKey.Describe(ctx, "YOUR_API_KEY_ID")
if err != nil {
log.Fatalf("Failed to describe API key: %v", err)
}
fmt.Printf("API key: %v (%v)\n", apiKey.Name, apiKey.Id)
}
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_API_KEY_ID="3fa85f64-5717-4562-b3fc-2c963f66afa6"
curl -X GET "https://api.pinecone.io/admin/api-keys/$PINECONE_API_KEY_ID" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-H "accept: application/json" \
-H "X-Pinecone-Api-Version: 2026-04"
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"roles": [
"ProjectEditor"
]
}
API keys
Get API key details
Get an API key’s details, excluding its secret.
GET
/
admin
/
api-keys
/
{api_key_id}
// Requires Node.js SDK v8.2.0 or later
import { AdminClient } from '@pinecone-database/pinecone';
// Reads PINECONE_CLIENT_ID and PINECONE_CLIENT_SECRET from the environment
const admin = new AdminClient();
const apiKey = await admin.apiKeys.describe('YOUR_API_KEY_ID');
console.log(apiKey);
// Requires Go SDK v6.0.0 or later
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v6/pinecone"
)
func main() {
ctx := context.Background()
adminClient, err := pinecone.NewAdminClientWithContext(ctx, pinecone.NewAdminClientParams{
ClientId: os.Getenv("PINECONE_CLIENT_ID"),
ClientSecret: os.Getenv("PINECONE_CLIENT_SECRET"),
})
if err != nil {
log.Fatalf("Failed to create AdminClient: %v", err)
}
apiKey, err := adminClient.APIKey.Describe(ctx, "YOUR_API_KEY_ID")
if err != nil {
log.Fatalf("Failed to describe API key: %v", err)
}
fmt.Printf("API key: %v (%v)\n", apiKey.Name, apiKey.Id)
}
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_API_KEY_ID="3fa85f64-5717-4562-b3fc-2c963f66afa6"
curl -X GET "https://api.pinecone.io/admin/api-keys/$PINECONE_API_KEY_ID" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-H "accept: application/json" \
-H "X-Pinecone-Api-Version: 2026-04"
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"roles": [
"ProjectEditor"
]
}
// Requires Node.js SDK v8.2.0 or later
import { AdminClient } from '@pinecone-database/pinecone';
// Reads PINECONE_CLIENT_ID and PINECONE_CLIENT_SECRET from the environment
const admin = new AdminClient();
const apiKey = await admin.apiKeys.describe('YOUR_API_KEY_ID');
console.log(apiKey);
// Requires Go SDK v6.0.0 or later
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/pinecone-io/go-pinecone/v6/pinecone"
)
func main() {
ctx := context.Background()
adminClient, err := pinecone.NewAdminClientWithContext(ctx, pinecone.NewAdminClientParams{
ClientId: os.Getenv("PINECONE_CLIENT_ID"),
ClientSecret: os.Getenv("PINECONE_CLIENT_SECRET"),
})
if err != nil {
log.Fatalf("Failed to create AdminClient: %v", err)
}
apiKey, err := adminClient.APIKey.Describe(ctx, "YOUR_API_KEY_ID")
if err != nil {
log.Fatalf("Failed to describe API key: %v", err)
}
fmt.Printf("API key: %v (%v)\n", apiKey.Name, apiKey.Id)
}
PINECONE_ACCESS_TOKEN="YOUR_ACCESS_TOKEN"
PINECONE_API_KEY_ID="3fa85f64-5717-4562-b3fc-2c963f66afa6"
curl -X GET "https://api.pinecone.io/admin/api-keys/$PINECONE_API_KEY_ID" \
-H "Authorization: Bearer $PINECONE_ACCESS_TOKEN" \
-H "accept: application/json" \
-H "X-Pinecone-Api-Version: 2026-04"
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"roles": [
"ProjectEditor"
]
}
Authorizations
An access token must be provided in the Authorization header using the Bearer scheme.
Headers
Required date-based version header
Path Parameters
API key ID
Response
The details of the API key, excluding the API key secret.
The details of an API key, without the secret.
The unique ID of the API key.
The name of the API key.
The ID of the project containing the API key.
The roles assigned to the API key.
A role that can be assigned to an API key.
Possible values: ProjectEditor, ProjectViewer, ControlPlaneEditor, ControlPlaneViewer, DataPlaneEditor, or DataPlaneViewer.
Was this page helpful?
⌘I