Skip to main content
POST

Authorizations

Authorization
string
header
required

Most Arize AI endpoints require authentication. For those endpoints that require authentication, include your API key in the request header using the format

Body

application/json

Body containing API key creation parameters

Request body for creating an API key. Set key_type to select the kind of key:

  • USER — authenticates as the creating user, inheriting their current permissions.
  • SERVICE — authenticates as a service account: a dedicated, automatically provisioned identity with roles explicitly configured in the spaces you specify. Use this for automation, CI/CD pipelines, or any workload that should run independently of a specific user.
key_type
enum<string>
required

The type of key to create. Use "USER" for a personal key that authenticates as you with your current permissions. Use "SERVICE" for a key tied to a dedicated service account with its own explicitly configured access across one or more spaces.

Available options:
USER
name
string
required

User-defined name for the API key.

Maximum string length: 256
Example:

"My dev key"

description
string

Optional user-defined description for the API key.

Maximum string length: 1000
Example:

"Used for local development."

expires_at
string<date-time>

Optional expiration timestamp. If omitted the key never expires.

Example:

"2026-01-01T00:00:00Z"

Response

API key successfully created or refreshed. The raw key is only returned once.

Response for a newly created or refreshed API key. The key_type field discriminates the variant:

  • USER — standard user key; no bot user.
  • SERVICE — service key tied to a service account; includes a bot_user with the service account's resolved role assignments.
id
string
required

Unique identifier for the API key.

name
string
required

User-defined name for the API key.

key_type
enum<string>
required

Discriminator value for user keys.

Available options:
USER
status
enum<string>
required

Current status of the API key.

  • ACTIVE - The key is valid for use.
  • REVOKED - The key has been revoked and is no longer valid.
Available options:
ACTIVE,
REVOKED
redacted_key
string
required

Redacted version of the key suitable for display (e.g., "ak-abc...xyz").

created_at
string<date-time>
required

Timestamp when the key was created.

created_by_user_id
string
required

ID of the user who created the key.

key
string
required

The full API key value. Only returned once at creation or refresh time. Store it securely — it cannot be retrieved again.

description
string

Optional user-defined description for the API key.

expires_at
string<date-time>

Optional timestamp when the key will expire.

last_used_at
string<date-time>

Approximate timestamp when the key was last used for authentication. This value is periodically updated and may not reflect the most recent usage.