# API keys

> Which plan includes API access, who can create an API key, how to create, rotate and revoke one, and where the Endless API reference is.

Source: https://endless.app/docs/settings/api-keys

**Settings → Workspace → API keys** creates the keys that let a server, a script or an agent call
the Endless REST API at `https://api.endless.app` without signing in. Every operation the API
offers is in the [API reference](/docs/api).

To use Endless from Claude, ChatGPT, Cursor or VS Code, you don't need a key: connect them to the
[MCP server](/connect) instead.

<Callout type="warn">
  API access comes with the **Business** plan. On any other plan the page shows
  _"Your plan doesn't include API keys"_ with **"Contact sales"**, and no key
  can be created.
</Callout>

## Who can create keys

The page needs **"Manage API keys"** (Admin by default). See [roles and
permissions](/governance/roles-and-permissions).

A key acts as the person who created it, limited to what they allow. It can never do more than
their role allows: if their role changes, the key changes with it, and if they leave the
workspace it stops working.

## Create a key

<Steps>

<Step>
### Pick a starting point

Press **"Create API key"** and choose **Generate media**, **Read only**, **Research**,
**Full access** or **Custom**. You can change every ability on the next step.

</Step>

<Step>
### Name it and set its access

Enter a **Name** and decide what it can do:

| Tab           | Sets                                                                           |
| ------------- | ------------------------------------------------------------------------------ |
| **Abilities** | What the key can do, grouped by area. Abilities that spend credits are marked. |
| **Projects**  | **All projects**, or **Only these projects**                                   |
| **Limits**    | **Credit limit per billing cycle**. Empty means no limit.                      |

**Expiration** is a number of days, a custom date or **Never**. Your own credit limit still
applies on top of the key's.

</Step>

<Step>
### Review and create

Check the summary and press **"Create key"**.

</Step>

<Step>
### Copy the secret

The secret is shown only once. Copy it before you press **"Done"**. Send it as a bearer token
in the `Authorization` header.

</Step>

</Steps>

## Rotate or revoke a key

- **"Rotate key"** creates a new secret. The current one keeps working until the expiration you
  choose (now, or in 1 hour to 7 days), so everything that uses it has time to switch. Only the
  key's creator can rotate it.
- **"Revoke key"** stops it at once. Revoked keys stay listed with what they spent.
- Anyone else who can manage keys can rename a key, narrow it or revoke it. Only its creator can
  add abilities or projects, raise its limit or extend its expiration.

## Limits

- A key can make **50 requests a minute**.
- If the workspace moves to a plan without API access, its keys are kept but their requests are
  refused until it is back on Business.
- Errors and their codes: [API errors and rate limits](/reference/api-errors).
