Create a new API key for the authenticated user.
key_type defaults to user when omitted.service keys, space_id is required. The service key is
scoped to the given space, and a bot user will be created with the specified roles.user keys, space_id and roles must not be set — passing either returns 400.
The key inherits the authenticated user’s own permissions.400 Bad Request.space_role → member,
org_role → read-only, account_role → member.The full API key value (key) is only returned once in the creation response.
Store it securely — it cannot be retrieved again. Use the redacted_key field on
subsequent reads.
Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format
Body containing API key creation parameters
User-defined name for the API key.
256"CI pipeline key"
Optional user-defined description for the API key.
1000"Key used by the CI pipeline to upload evaluation results."
Type of the API key to create. Defaults to user.
space_id and roles must not be set (returns 400).space_id. All roles default to minimum privilege when omitted.user, service "user"
Optional expiration timestamp. If omitted the key never expires.
"2026-01-01T00:00:00Z"
ID of the space this service key is scoped to. Required when key_type is service;
invalid for user keys (returns 400).
"U3BhY2UxMjM"
Role assignments for the service key's bot user. Only valid when key_type is service;
invalid for user keys (returns 400).
API key successfully created or refreshed. The raw key is only returned once.
Unique identifier for the API key.
User-defined name for the API key.
Type of the API key.
user, service Current status of the API key.
active, deleted Redacted version of the key suitable for display (e.g., "ak-abc...xyz").
Timestamp when the key was created.
ID of the user who created the key.
The full API key value. Only returned once at creation or refresh time. Store it securely — it cannot be retrieved again.
Optional user-defined description for the API key.
Optional timestamp when the key will expire.