Create an API key
Mint a new API key. The raw key is returned exactly once in the key field. Pass an optional limit and limit_reset to attach a spend cap.
Authentication
A management key (prefixed mgmt_), created in the dashboard under Settings, API keys, Management keys. Distinct from a regular gateway API key, and never used to call models.
Request
A name for the key, for example customer-acme or [email protected]. Shown in the dashboard and usage views.
Window the spend cap resets on. Required if limit is set.
Response
Stable identifier for the key. A one-way hash, not the secret, so it is safe to store and log. Use it in get, update, and delete calls.
Display label (the key’s public prefix, e.g. mg_8Kx2pQ). Not the secret.
The raw API key (prefixed mg_). Shown exactly once, at creation. Store it now; it cannot be retrieved later.
User-set name for the key.