Skip to main content
The apikeys client methods are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.
API keys authenticate calls to the Arize platform. Service keys are tied to a bot user with role assignments at the account, organization, and space level; user keys are tied to a specific human user. Create issues user keys; CreateServiceKey issues service keys.

List API Keys

List returns a paginated list of API keys. Defaults to a page size of 50. Signature:
Usage Example:

Create a User API Key

Create issues a POST to create a new user API key and returns the created key, including the secret token. The secret is only returned at creation time. Signature:
Usage Example:

Create a Service API Key

CreateServiceKey creates a new service API key whose bot user is bound to one or more organizations, each containing one or more spaces. At least one OrgBinding — with a non-empty OrgID and at least one SpaceBinding — is required. Role assignments are optional: when a role is left zero, the server applies its default role at that scope. Build role assignments with the AssignPredefinedOrgRole/AssignCustomOrgRole, AssignPredefinedSpaceRole/AssignCustomSpaceRole, and AssignPredefinedAccountRole/AssignCustomAccountRole helpers. Signature:
Usage Example:

Refresh an API Key

Refresh rotates the secret on an existing API key and returns the new key value. ExpiresAt is optional; when zero, the refreshed key has no expiration. Signature:
Usage Example:

Revoke an API Key

Revoke sets an API key’s status to revoked by ID. The key stops working immediately; revoking an already-revoked key is a no-op and still succeeds. Signature:
Usage Example: