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

# Authentication

> Send an API key with every request. Live keys dub whole files; test keys are free.

Every request carries an API key as a bearer token:

```bash theme={null}
curl https://api.reedapt.com/v1/usage \
  -H "Authorization: Bearer rk_live_…"
```

A request without a valid key gets `401 UNAUTHORIZED`.

## Making a key

Open [Reedapt](https://dub.reedapt.com/developers) and choose **Developers** in the account menu. Name the key, pick live or test, and copy it. **A key is shown once, when you make it.** If you lose it, revoke it and make another.

## Live and test keys

| | Live key | Test key |
| - | - | - |
| Starts with | `rk_live_` | `rk_test_` |
| Available on | Paid plans and API agreements | Every account, free |
| What it dubs | The whole file | The first 60 seconds, with a watermark |
| Billing | Per minute of source media, per language | Free |
| Files | Video and audio | Video only |
| Limits | Your minutes and dubs at once | 20 dubs a day |

Everything else works the same way, so code you write against a test key works unchanged with a live one. A test dub has `"test": true` and `preview_seconds` set, and its files are only the watermarked dub.

## Keeping keys safe

> [!WARNING]
>
> Use keys only from your server. Never put a key in a web page, a mobile app, or anything people can download. Anyone with the key can spend your minutes.

* Keep keys in environment variables or a secrets manager, not in your code or repository.
* Make one key per system, so you can revoke one without touching the others.
* Revoke a key in **Developers** if it may have leaked. It stops working within a minute.

## Checking a key

`GET /usage` tells you which plan and kind of key you're using and how many minutes are left:

```json Response theme={null}
{
  "plan": "pro",
  "key_mode": "live",
  "minutes_remaining": 184.5,
  "unlimited": false,
  "test_preview_seconds": 60
}
```


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