api_keys
Creates, updates, deletes, gets or lists an api_keys resource.
Overview
| Name | api_keys |
| Type | Resource |
| Id | vercel.authentication.api_keys |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
create | insert | purpose |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|
INSERT examples
- create
- Manifest
No description available.
INSERT INTO vercel.authentication.api_keys (
purpose,
project_id,
name,
expires_at,
ai_gateway_quota,
metadata
)
SELECT
'{{ purpose }}' /* required */,
'{{ project_id }}',
'{{ name }}',
{{ expires_at }},
'{{ ai_gateway_quota }}',
'{{ metadata }}'
RETURNING
api_key,
api_key_string
;
# Description fields are for documentation purposes
- name: api_keys
props:
- name: purpose
value: "{{ purpose }}"
description: |
The API key's purpose, which restricts how it can be used.
- name: project_id
value: "{{ project_id }}"
description: |
An optional project to restrict the API key to.
- name: name
value: "{{ name }}"
description: |
An optional name for the API key.
- name: expires_at
value: {{ expires_at }}
description: |
The API key's expiration, expressed as a UNIX timestamp in milliseconds.
- name: ai_gateway_quota
description: |
Optional AI Gateway quota configuration for the API key.
value:
limitAmount: {{ limitAmount }}
includeByokInQuota: {{ includeByokInQuota }}
refreshPeriod: "{{ refreshPeriod }}"
alertThresholds:
- {{ alertThresholds }}
- name: metadata
value: "{{ metadata }}"
description: |
Optional generic metadata for the API key. The accepted shape depends on the key's `purpose` and is validated on creation; for `ai-gateway` keys this accepts `environment`.