Create a new API key

Authentication

AuthorizationBearer
API key as bearer token in Authorization header

Request

This endpoint expects an object.
namestringRequired>=1 character
Name for the new API key
limitdouble or nullOptional
Optional spending limit for the API key in USD
limit_resetenum or nullOptional

Type of limit reset for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.

Allowed values:
include_byok_in_limitbooleanOptional
Whether to include BYOK usage in the limit
expires_atstring or nullOptionalformat: "date-time"
Optional ISO 8601 UTC timestamp when the API key should expire. Must be UTC, other timezones will be rejected

Response

API key created successfully
dataobject
The created API key information
keystring

The actual API key string (only shown once)

Errors