Manage API Keys
This guide describes how to create, copy, edit, revoke, and delete API Keys for PaletteAI Inference Launchpad. An API Key is a bearer credential that a client presents to the Inference Launchpad gateway and that draws against exactly one Inference Quota.
You can manage API Keys at the System, Tenant, or Project scope, from the same Inference Quotas tab you use to manage quotas.
You can manage API Keys from the PaletteAI console or by applying YAML Kubernetes manifests.
Prerequisites
- UI Workflow
- YAML Workflow
-
An Inference Quota exists at the target scope. Refer to Manage Inference Quotas.
-
Depending on the scope you plan to manage:
- System — Platform operator access.
- Tenant — Tenant admin role. Refer to Tenant Role Permissions.
- Project — Project admin role. Refer to Project Role Permissions.
-
The
spectrocloud.com/inferenceapikeys:create,spectrocloud.com/inferenceapikeys:update, andspectrocloud.com/inferenceapikeys:deletepermissions for creating, editing, and deleting keys, andspectrocloud.com/inferenceapikeys:getfor copying key values. If a button described in this guide is not displayed, your role does not include the required permission.
-
Access to the PaletteAI hub cluster with permissions to read, create, update, and delete
InferenceAPIKeyresources and theSecretobjects they own in the target namespace. -
An Inference Quota exists in the same namespace as the API Key you plan to create. Refer to Manage Inference Quotas.
-
The OIDC group names that should be allowed to view and manage the key in PaletteAI. Groups are matched by exact name. The Inference Launchpad gateway does not use these groups; it authenticates callers with the bearer token only.
Create an API Key
Each API Key is bound to one Inference Quota at creation. The binding is immutable — to move a key to a different quota, delete it and create a new one.
- UI Workflow
- YAML Workflow
-
Log in to the PaletteAI console and navigate to the settings page for the target scope:
- System — System Settings
- Tenant — Tenant Settings
- Project — Select the Project, then Project Settings
-
Select the Model Management section, and then select the Inference Quotas tab.
-
In the row for the quota you want the key to draw against, select API Keys to open the API Keys drawer.
-
Select Add API Key in the drawer's toolbar. The Add API Key dialog appears.
-
In the Name field, enter a name for the key. The name is displayed in the drawer and on the key resource, and it cannot be changed later. Names must be 63 characters or fewer, contain only lowercase alphanumeric characters or hyphens, and begin and end with an alphanumeric character.
-
In the Expiration field, select one of the following:
- Never — The key does not expire on its own.
- 7 days, 30 days, 60 days, or 90 days — The exact date each option resolves to is displayed in the option label.
- Custom — A Custom Date field appears. Pick any future date.
-
In the OIDC Groups field, select the groups that may view and manage this key in PaletteAI. If a group is not in the list, type the name and press Enter to add it. At least one group is required. These groups do not affect gateway authentication.
If the current scope has parent-scope API keys with their own groups, those appear as a read-only Inherited OIDC Groups section — members of those groups already have control-plane access through the parent-scope key.
-
Select Confirm. The new key appears in the drawer.
An InferenceAPIKey lives in the same namespace as the InferenceQuota it references. On first reconcile, the controller generates the token, stores it in a Secret in the same namespace named iapikey-<api-key-name>, and records the reference on status.inferenceApiKeySecretRef.
apiVersion: spectrocloud.com/v1alpha1
kind: InferenceAPIKey
metadata:
name: team-y
namespace: <project-name>
spec:
inferenceQuotaRef:
name: project-y-budget
oidcGroups:
- team-y-engineers
- team-y-oncall
expiresAt: '2027-01-01T00:00:00Z'
spec.inferenceQuotaRef.name— The Inference Quota in the same namespace that the key draws against. Required and immutable.spec.oidcGroups— At least one OIDC group name. Members of these groups may view and manage the key in PaletteAI. The gateway does not evaluate this field.spec.expiresAt— Optional RFC 3339 timestamp. Omit for a non-expiring key.
Apply the manifest:
kubectl apply --filename inferenceapikey.yaml
Copy the API Key Value
The key value is generated by the controller and stored in a Secret. You must copy it out and hand it to the caller through a secure channel; the UI does not persist the value.
- UI Workflow
- YAML Workflow
-
On the Inference Quotas tab, in the row for the quota, select API Keys to open the drawer.
-
In the row for the key you want to copy, select the copy icon in the API Key column. The value is placed on your clipboard.
The token lives in a Secret owned by the InferenceAPIKey. Both the Secret name and the data key that holds the token value are recorded on status.inferenceApiKeySecretRef, so read them from the resource rather than hard-coding them:
secret_name="$(kubectl get inferenceapikey <api-key-name> --namespace <namespace> \
--output jsonpath='{.status.inferenceApiKeySecretRef.name}')"
data_key="$(kubectl get inferenceapikey <api-key-name> --namespace <namespace> \
--output jsonpath='{.status.inferenceApiKeySecretRef.key}')"
kubectl get secret "$secret_name" --namespace <namespace> \
--output jsonpath="{.data.$data_key}" | base64 --decode
The value begins with the prefix pai-. Callers pass it to the Inference Launchpad gateway as a bearer token in the Authorization header. Refer to the PaletteAI Inference Launchpad documentation for the request format.
Edit an API Key
You can update the OIDC groups and expiration on an existing key in place. The key name and the Inference Quota it draws against cannot be changed. To change either, delete the key and create a new one.
- UI Workflow
- YAML Workflow
-
On the Inference Quotas tab, in the row for the quota, select API Keys to open the drawer.
-
In the row for the key you want to edit, open the three-dot menu and select Edit. The Edit API Key dialog appears with the current values pre-filled.
-
Update the Expiration or the OIDC Groups fields.
-
Select Confirm.
Edit spec.oidcGroups or spec.expiresAt on the resource and re-apply. Do not change spec.inferenceQuotaRef or metadata.name.
kubectl edit inferenceapikey <api-key-name> --namespace <namespace>
Delete an API Key
Deleting a key permanently removes the credential and its Secret. Any client still using the value receives an authentication error from the gateway on the next request. This action cannot be undone.
- UI Workflow
- YAML Workflow
-
On the Inference Quotas tab, in the row for the quota, select API Keys to open the drawer.
-
In the row for the key you want to delete, open the three-dot menu and select Delete.
-
In the confirmation dialog, select Confirm.
kubectl delete inferenceapikey <api-key-name> --namespace <namespace>
The owner-referenced Secret that holds the key value is deleted by Kubernetes garbage collection.
Validate
Confirm the key is working:
- UI Workflow
- YAML Workflow
-
On the Inference Quotas tab, open the API Keys drawer for the quota and confirm the key appears with the Active status badge.
-
Issue an inference call using the copied key value. Refer to the PaletteAI Inference Launchpad documentation for the request format.
-
Return to the Inference Quotas tab and confirm the utilization on the quota row advances after the call.
Confirm the key is Active and the Secret has been generated:
kubectl get inferenceapikey <api-key-name> --namespace <namespace> --output yaml
The status.state field should read Active, and status.inferenceApiKeySecretRef.name should be populated.
If a call is rejected by the gateway, verify that the bearer token is correct, that the key is not Expired or Revoked, and that the referenced Inference Quota still has budget remaining in the current window. If a user cannot see or copy a key in the PaletteAI console, verify that they belong to at least one of the key's OIDC groups (including any inherited from a higher-scoped key).
Next Steps
- Manage Inference Quotas — Define the usage budgets that keys draw against.
- PaletteAI Inference Launchpad — Concept overview, lifecycle states, and OIDC group inheritance.
- PaletteAI Inference Launchpad documentation — How the gateway authenticates keys and meters requests.