Skip to main content
An API key is the credential your server, script, or CI job uses to call Kernel without an interactive login. Treat it like a password: keep it out of client-side code, store it in a secret manager, and rotate it when access changes. Kernel only returns the plaintext key once, when you create it. Save the key value immediately. After that, Kernel only shows the masked value.

Before you start

You need one existing Kernel credential to create another API key:
  • Set KERNEL_API_KEY before running the SDK examples.
API keys can be org or project scoped:
  • Omit project_id to create an org-scoped key that can access resources across your organization.
  • Set project_id to create a project-scoped key that can only access resources in that project.
  • When you authenticate with a project-scoped key, you can only create another project-scoped key for the same project.

Create an API key

Use the SDKs when your backend needs to provision keys for environments, customers, or automation jobs.

SDKs

List and inspect API keys

List keys to audit what exists. List and retrieve responses include masked_key, project_id, project_name, created_by, and expiry metadata, but they don’t include the plaintext key.

Rename or delete an API key

Rename a key when the owner or purpose changes. Delete a key when the workload no longer needs access.

Rotate a key

Rotate by creating the replacement first, then deleting the old key after your workload has switched over.
  1. Create a new API key with the same scope.
  2. Store the new plaintext key in your secret manager.
  3. Deploy or restart the workload that uses KERNEL_API_KEY.
  4. Verify the workload can call Kernel.
  5. Delete the old API key.

Troubleshooting