# API keys

> Create, name, cap, disable and delete the keys your servers call the API with.

Source: https://docs.strokes.ink/console/api-keys

Open **API keys** in the [console](https://platform.strokes.ink).

## Create a key

Click **Create key**, name it after where it will run — `production server`, `staging`, `batch jobs` — and click **Create**. Owners and admins can give it a [monthly spend limit](#spend-limits) right away. Then copy the key: **it's shown once.** Strokes stores only a hash of it, so it can't be shown again; if you lose it, create another.

## The list

Each key shows its name with its first characters and last four under it (`swi_live_a1B2…9xYz`), what it has spent this month, when it was created and when it was last used. Last used is updated every few minutes, not on every request. A disabled key shows **Disabled** next to its name.

## Spend limits

A spend limit caps what one key can spend in a calendar month (UTC), from $0.01 to $1,000,000. Once the key has spent it, its requests get `402 billing_error` until the limit is raised or the next month begins; the key's spend turns red in the list. A key with no limit spends from the organization's credits without a cap.

Owners and admins set a limit when they create a key, or later from the key's **⋯** menu: **Set spend limit** opens a dialog with $10, $50, $100 and $500 presets or any amount, and leaving it empty removes the limit. The list shows each key's spend against its limit, with a bar.

The limit is checked before each request, so requests already running when it's reached can take the key slightly over it. See [Limits and spend](/guides/rate-limits).

## Disable or delete a key

**Disable key** in the key's **⋯** menu stops it at once: its requests get a `401` with `This API key is disabled. Enable it on the API keys page.` **Enable key** brings it back as it was. Disable a key while you check whether something still uses it, or while you look into a possible leak.

**Delete key** removes it for good after you confirm: its requests get `401 Invalid API key.` and it leaves the list. Deleting can't be undone — create a new key instead. Delete a key as soon as you know it leaked, and when a service that used it is retired.

A disabled or deleted key's requests stay on the [Usage](/console/usage) and [Activity](/console/activity) pages, under its name.

## Who can manage keys

Every member of the organization can create, disable and delete its keys. Only owners and admins set spend limits. See [Organizations and members](/console/organizations).

## Limits

There is no requests-per-minute limit on a key. Usage is bounded by the organization's [credits](/console/billing) and the key's spend limit.
