?
auth.createApiKey
Mint the current user's API key.
auth.createApiKey() → { key }
For apps with api-key auth. The key is shown once, then only a masked value remains on the user row; there is one per user, so creating a new one replaces the old. Consumers send it as Authorization: Bearer sk_...; revoke it with revokeApiKey.
Usage
const { key } = await auth.createApiKey(); // sk_... shown once