Virtual Keys
These endpoints allow you to create and manage virtual keys, which are used to authenticate requests made through the AI Runtime Control gateway. Each virtual key can be configured with request-per-minute and token-per-minute rate limits, a spend-limit flag, and a failover policy.
Data model
The virtual key that was created, including its access token.
access_token | string | The access token for this virtual key. This is only returned when the key is created or rotated, and cannot be retrieved again afterward. Required. Read-only. | |
created_at | string | The date and time the key was created, in RFC 3339 format. Required. Read-only. | |
customer_id | string | The ID of the customer account that owns the key. Required. Read-only. | |
expires_at | string | The date and time the key expires, in RFC 3339 format. null if the key doesn't expire. | |
id | string | The unique identifier of the virtual key. Required. Read-only. | |
name | string | The display name of the virtual key. Required. | |
rpm_limit | integer | The requests-per-minute limit for this key. null if there is no limit. | |
tpm_limit | integer | The tokens-per-minute limit for this key. null if there is no limit. | |
updated_at | string | The date and time the key was last updated, in RFC 3339 format. Required. Read-only. | |
user_id | string | The ID of the user who created the key. Required. Read-only. | |
provider_connection_id | string | The ID of the provider connection to retry against. | |
security_action | string | The action AI Firewall takes when it detects a violation on a request made with this key. | |
security_enabled | boolean | Whether AI Firewall security is enabled for requests made with this key. | |
spend_limit_enabled | boolean | Whether a spend limit is enabled for this key. This field cannot be set when the key is created; it can only be changed with this endpoint. | |
spend_limit_enabled_on | string | The date and time spend_limit_enabled was last set to true, in RFC 3339 format.
null if the spend limit has never been enabled. This timestamp is not cleared when
spend_limit_enabled is later set back to false, so it can be non-null even when
the spend limit is currently disabled. Read-only. | |
rate_limit_429_enabled | boolean | Whether a 429 Too Many Requests response from the provider triggers failover. | |
server_error_5xx_enabled | boolean | Whether a 5xx server error response from the provider triggers failover. | |
targets | array | The provider connections to retry against, in order. | |
timeout_enabled | boolean | Whether a request timeout triggers failover. | |
deleted_at | string | The date and time the key was deleted, in RFC 3339 format. null unless the key was deleted and include_deleted was used to retrieve it. Read-only. | |
last_used_at | string | The date and time the key was last used to make a request, in RFC 3339 format. null if the key has never been used. Read-only. | |
type | string | The type of the resource. Read-only. | |
user_name | string | The display name of the user who created the key. Read-only. | |
created_by | string | The display name of the user who created the key. Read-only. | |
limit | integer | The limit value used when making the request. | |
next_cursor | string | The cursor to use to request the next page of results. null when there are no more results. | |
prev_cursor | string | The cursor to use to request the previous page of results. null when there is no previous page. | |
sort | string | The sort value used when making the request. | |
total | integer | The count of results matching the request. | |
meta | object | Metadata about the request. |