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

# Authentication

> How to create and use API keys to authenticate requests.

MoltSets uses API key authentication. Every request must include your API key as a Bearer token in the `Authorization` header.

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

API keys follow the format `ms_XXXXXXXXXXX`.

## Creating an API key

API keys are managed at [app.moltsets.com](https://app.moltsets.com/dashboard/api_keys).

1. To create an API Key, choose "create an API key"
2. Give it a name then click "create now"

<Warning>
  Store your API key somewhere secure as soon as you create it!
</Warning>

## Using your API key

Pass the key as a Bearer token on every request:

```bash theme={null}
curl -X POST https://api.moltsets.com/api/v1/tools/get_account \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Multiple keys

You can create as many API keys as you need. The recommended pattern is one key per environment or agent — for example, separate keys for local development, staging, and production.

This makes it easy to revoke access for a specific environment without affecting others.

## Revoking a key

You can revoke credentials individually or all at once:

1. To revoke a single API Key or Connector, click **Revoke** to the right of the credential you want to remove.
2. To revoke all credentials at once, use the **Revoke All** option on the page.

Revocation is immediate and irreversible.

## Key permissions

All API keys have the same permissions — there are no read-only or scoped keys. Any key can call any tool on your account.

## Error responses

| Status             | Meaning                                   |
| ------------------ | ----------------------------------------- |
| `401 Unauthorized` | Missing or invalid API key                |
| `403 Forbidden`    | Valid key but insufficient account access |

```json theme={null}
{
  "error": "Unauthorized",
  "message": "Invalid or missing API key."
}
```
