API keys
An API key lets your own systems send text to your prisms through the /v1 API. Admins manage keys on the API keys page, under Settings in the sidebar. To make your first call with a key, follow the quickstart. For the header format and the errors a bad key gets, see Authentication.
What a key can do
Section titled “What a key can do”A key belongs to the account, not to a person or a prism. It can run every prism in the account and read every result in it, including results made in the app and the extension. There are no scopes and no per-prism keys.
To tell your systems apart, give each one its own key. The page then shows when each system last called, and you can revoke one without stopping the others.
Each key can make 600 calls a minute. Past that, a call answers 429 with a Retry-After header. See Limits.
Create a key
Section titled “Create a key”- On API keys, click Create key.
- Enter a Label that names the system that will use it, such as Inbox tool.
- Click Create key.
The dialog Copy your key now shows the full key, which starts with pl_. Click Copy and put it in your secret store, then click Done.
The app shows the full key only this once. Prismlet keeps only a fingerprint of it, so nobody can show it to you again. If you lose a key, create a new one and revoke the old one.
The keys list
Section titled “The keys list”Each row shows:
| Column | Shows |
|---|---|
| Label | The name you gave the key. Click it to open its detail panel. |
| Key | The first characters of the key, so you can tell keys apart. |
| Last used | How long ago the key last made a call, or Never. |
| Status | Active or Revoked. |
Revoked keys stay in the list, so you can still see what they did.
The detail panel
Section titled “The detail panel”Click a key's label to open its panel on the right. It shows:
- Created: the date, and who created the key.
- Last used: how long ago it last made a call.
- Results, last 30 days and Failed, last 30 days: how many results the key made, and how many of them failed.
- Used with: the prisms the key called in the last 30 days.
- Recent results: the five latest results the key made, each opening its result page.
See all its results opens the Rows of the prism's Results, filtered to this key, when the key was used with one prism. When it was used with several, it opens the Prisms list.
Revoke a key
Section titled “Revoke a key”Click Revoke on the key's row and confirm with Revoke key. The key stops working on the next call, which answers 401. A call already waiting on the model when you revoke still finishes and saves its result. Results the key made stay in the account.
Revoking cannot be undone. To rotate a key without downtime, create the new key, deploy it, check its Last used on this page, then revoke the old one.
Keep keys secret
Section titled “Keep keys secret”Anyone who has a key can run your prisms and read your results.
- Keep the key on your server, in an environment variable or a secret store.
- Never put a key in a web page, a mobile app or a code repository. A browser blocks a web page's calls to the API anyway.
- If a key may have leaked, revoke it at once and create a new one.