> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API keys

> Organization-scoped bearer keys, shown once at creation, everything after that is lifecycle management.

Keys are minted on the [API Keys](https://platform.pearlresearch.ai/api-keys) page (developers and org admins), are prefixed `sk-prl-infapi-`, and authenticate straight against the inference endpoint:

```text theme={null}
Authorization: Bearer sk-prl-infapi-…
```

The full key is displayed **exactly once**, at creation, Pearl stores only a digest, so a lost key can't be recovered, only replaced. Afterwards the dashboard shows the key's name, its last characters for identification, its creation date, and its status, its expiration, and its credit limit.

## Expiration and credit limits

Every key has an **expiration** and a **credit limit**, and both are optional. A key created with *No expiration* and no credit limit lives until you retire it; keys created before these settings existed work exactly that way.

* **Expiration** (1 hour up to 1 year, or none) is fixed when the key is created. From that moment requests with the key are rejected, and the dashboard badges it "Expired". To extend access, create a new key.
* **Credit limit** caps what the key can spend, in USD at your organization's prices. Once the key's spend reaches the limit, requests with it are rejected until the limit resets or you raise it. Raising or removing a limit, or changing its reset period, takes effect within about a minute; you can do it at any time from the key's Edit button.
* **Reset limit every...** makes the limit a budget per period instead of a lifetime cap: *Daily* resets every day at midnight UTC, *Weekly* every Monday at midnight UTC, and *Monthly* on the 1st of each calendar month at midnight UTC. With *N/A* (the only choice until a credit limit is set) the limit applies to the key's total spend.

To check a key's limit, remaining budget, next reset, and spend from code, call [`GET /key`](/docs/reference/management/key) with the key itself.

> [!NOTE]
>
> A key's spend is measured from metered usage, which trails live traffic by a minute or two, so a busy key can run slightly past its limit before it is cut off. Treat the limit as a guard rail, not an exact meter. Your organization's balance still applies to every key: a key under its own limit stops when the organization runs out of credits.

## Revoke vs. delete

| | Revoke | Delete |
| - | - | - |
| Requests using the key | Stop being accepted within a couple of minutes | Stop being accepted; removal is immediate on the next network sync |
| Dashboard listing | Stays visible, badged "Revoked", an audit trail of what was shut off | Disappears from the list |
| Reversible? | No, mint a new key instead | No, and it cannot be undone |
| Usage history | Preserved | Preserved, analytics keep the attribution |

The working rule: **revoke to kill traffic, delete to tidy up.** Revoke a key the moment it's compromised or retired; delete it later, once you no longer need the line item in the list.

## Rotating a key

Rotation is a create-then-revoke, in that order, so there's no gap:

* Create the replacement key and deploy it to your application.
* Verify traffic flows on the new key (watch your app's logs or Analytics).
* Revoke the old key, anything still using it fails loudly within minutes.
* Delete the revoked key once you're confident nothing references it.

## Prompt storage

The [Settings](https://platform.pearlresearch.ai/settings) page carries an organization-wide **Store prompts** switch controlling whether your prompts are retained. It starts disabled; nothing is persisted until you switch it on. Developers and org admins can change it (every member can see it), and like a key change it reaches the network within a couple of minutes.

## Management keys

A **management key** (`sk-prl-mgmt-`) is the other kind of key: it authenticates the [Management API](/docs/reference/management.md), which reads your organization's credits and usage, and it can never call models. Only org admins create, rename, revoke, or delete them, on the [Management Keys](https://platform.pearlresearch.ai/management-keys) page. They share your organization's key limit with API keys and can expire, but carry no credit limit, since they never spend.

## Practices that pay off

* **One key per service and environment** ("checkout-prod", "checkout-staging"), names are your only forensic handle, and scoped keys make revocation surgical instead of an outage.
* **Keep keys out of code and clients.** Environment variables or a secret manager on the server side only, a key in a browser bundle or mobile app is public.
* **Leaked key?** Revoke it immediately (effective within a couple of minutes), mint a replacement, and review the period's usage in [Analytics](/docs/analytics.md).

> [!NOTE]
>
> Viewers can see key names and metadata but never key material (nobody can, it isn't stored). Billing admins have no key access at all; see [Team & roles](/docs/team.md) for the full matrix.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.