AdminClient: manage organizations, projects, and access (2026-04)
This release adds AdminClient, a second top-level entry point covering the Pinecone Admin API. It manages an organization and the resources beneath it including projects, API keys, service accounts, role bindings, invites, and users.
The Admin API authenticates differently from the rest of the SDK using service-account OAuth2 rather than a project Api-Key.
Authentication
Create a service account in the console under Organization Settings → Service Accounts, then either pass its credentials directly or set PINECONE_CLIENT_ID / PINECONE_CLIENT_SECRET:
import { AdminClient } from '@pinecone-database/pinecone';
// Reads PINECONE_CLIENT_ID / PINECONE_CLIENT_SECRET from the environment
const admin = new AdminClient();
// ...or pass credentials explicitly
const admin = new AdminClient({
clientId: 'your_client_id',
clientSecret: 'your_client_secret',
});The AdminClient constructor is synchronous. The bearer token is fetched lazily on the first admin request and then cached for the lifetime of the client, with concurrent first calls sharing a single in-flight exchange. There is no proactive refresh, so a client held past its token's server-side expiry should be recreated. Rejected credentials surface as PineconeAuthorizationError, so instanceof checks behave the same as they do on the Pinecone client.
Resource surface
| Sub-client | Methods |
|---|---|
admin.projects |
create describe list update delete |
admin.organizations |
describe list update delete |
admin.apiKeys |
create describe list update delete |
admin.serviceAccounts |
create describe list update rotateSecret delete |
admin.roleBindings |
create describe list delete |
admin.invites |
create describe list resend delete |
admin.users |
describe list delete |
const project = await admin.projects.create({ name: 'my-project' });
// List operations return their results under `data`
const { data: projects } = await admin.projects.list();
// `create` returns the new record alongside its secret, which is shown only once
const { serviceAccount, clientSecret } = await admin.serviceAccounts.create({
name: 'ci-runner',
});
await admin.roleBindings.create({
principalType: 'service_account',
principalId: serviceAccount.id,
resourceType: 'project',
resourceId: project.id,
role: 'ProjectEditor',
});Bridging to the Pinecone client
Provision a project and key with AdminClient, then hand the key to Pinecone:
import { AdminClient, Pinecone } from '@pinecone-database/pinecone';
const admin = new AdminClient();
const project = await admin.projects.create({ name: 'my-project' });
const apiKey = await admin.apiKeys.create(project.id, { name: 'my-key' });
// `value` is returned only at creation time and cannot be retrieved later
const pc = new Pinecone({ apiKey: apiKey.value });Other changes
- The
2026-04generated client was regenerated to pull in theadminAPI module (#420). npm run replgains aninitAdmin()helper for spinning up anAdminClient, and its environment variable checks are now grouped by initializer, so a.envconfigured for only one surface no longer warns about the other (#425).- Dev dependency bumps:
prettier3.9.6,ts-jest29.4.12, andglobals17.8.0 (#425), plusjest-utilas an explicit dev dependency (#421).
What's Changed
- Add
jest-utilas an explicit dev dependency by @austin-denoble in #421 - Regenerate
2026-04to pull inadminAPI module by @austin-denoble in #420 - Add
AdminClientfor the Pinecone Admin API (v2026-04) by @austin-denoble in #424 - Bump dev dependencies and group REPL env var warnings by @austin-denoble in #425
Full Changelog: v8.1.0...v8.2.0