Skip to main content
Use this endpoint to generate a new API key for your account. You supply a human-readable name to help you identify the key later; Prompt Bank returns the raw key string in the response alongside the key’s metadata. This is the only time the raw key value is returned — store it in a secrets manager or environment variable immediately. If you lose it, you will need to revoke the key and create a new one.

Endpoint

Authentication: SessionAuth — browser session cookie (not an API key)

Request Body

string
required
A descriptive label for the key, between 1 and 80 characters. Choose a name that identifies the system or purpose the key is used for, e.g. "Production Backend" or "GitHub Actions CI".

Response — 201 Created

string
The raw API key string. This value is shown once only and cannot be retrieved again. Store it securely before closing the response.
object
Metadata about the newly created key. Contains the same fields as a key object returned by the List Keys endpoint: id, name, keyPrefix, scopes, lastUsedAt, revokedAt, expiresAt, and createdAt.

Example

Request
Response
Store the raw key immediately. The value in data.key is returned once only and is not recoverable after this response is closed. Prompt Bank stores only a secure hash of the key — it cannot be decrypted or displayed again. If you lose the key before storing it, revoke it and create a new one.