Skip to content
API Reference
API Reference

API Key object

A Standard API key that can authenticate RunAPI requests. Its plaintext value is not part of this reusable object.

A Standard API key that can authenticate RunAPI requests. Its plaintext value is not part of this reusable object.

01

Object fields

JSON body

Stable fields shared by the resource's reusable object.

API Keys17 fields
allowed_modelsarray | null
Required

Optional model allowlist.

created_atstring
Required

Time the key was created.

credit_limit_centsinteger | null
Required

Optional key spending cap in USD cents.

credit_limit_reset_intervalstring | null
Required

Optional key spending-cap reset cadence.

Allowed values: daily, weekly, monthly, null
credit_limit_windowscredit_limit_windows
Required

Rolling spending caps keyed by supported window duration.

credit_limit_windows.1dcredit_limit_window
Optional
credit_limit_windows.1d.limit_centsinteger
Required

Spending cap for this rolling window in USD cents.

credit_limit_windows.1hcredit_limit_window
Optional
credit_limit_windows.1h.limit_centsinteger
Required

Spending cap for this rolling window in USD cents.

credit_limit_windows.7dcredit_limit_window
Optional
credit_limit_windows.7d.limit_centsinteger
Required

Spending cap for this rolling window in USD cents.

enabledboolean
Required

Whether the key can authenticate requests.

guardrail_idstring | null
Required

Attached guardrail prefix ID

idstring
Required

API key prefix ID.

last_used_atstring | null
Required

Time the key was last used

masked_tokenstring
Required

Masked API key value.

namestring
Required

Friendly API key name.