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

# API keys

> Create, name, rename and revoke Notra Labs Platform API keys, choose a production or development environment, and keep keys out of your code.

API keys authenticate requests to the API. Send a key as a Bearer token:

```bash theme={"system"}
Authorization: Bearer $NOTRA_LABS_API_KEY
```

Keys belong to a workspace. Requests with a key use that workspace's credits and show up in its Logs and Usage. A workspace can have up to 25 keys.

## Create a key

**1. Open API keys**

In the console, open **API keys** and click **Create API key**.

**2. Name it and pick an environment**

Give the key a name you'll recognize, like the server or app that uses it. Pick **Production** or **Development**. The environment can't be changed later.

**3. Copy the key**

Copy the key and store it somewhere safe, like your secret manager. The console shows it only once.

Production keys start with `nl_live_` and development keys with `nl_test_`, so you can tell them apart in your configuration. Both call the same models and use the same credits.

## Keep keys secret

* Read the key from an environment variable like `NOTRA_LABS_API_KEY`. Never commit it or put it in client-side code.
* Use a separate key per app or environment, so you can revoke one without touching the others.

## Manage keys

The **API keys** page lists each key with its environment, the first characters of the key, who created it and when it was last used. Open a key to see its spend, its recent requests and how close it is to its [rate limits](https://www.usenotra.com/docs/platform/account/rate-limits.md).

* **Rename** a key from its menu. The key itself doesn't change.
* **Revoke** a key from its menu. Requests with it fail right away with 401 `invalid_api_key`, and this can't be undone. Its past requests stay in Logs and Usage.


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