# Keys and test mode

> widar marks AI output for the EU AI Act and California's AI Transparency Act: an invisible watermark and a signed C2PA credential on text, images, audio and video, in one API, by Bynn Intelligence.

Documentation index: https://widar.com/llms.txt

The examples in these docs use invented companies, such as Lumen Labs B.V., and invented values: none is a real check, mark, signature or certificate.

Section: Get started. URL: https://widar.com/docs/keys-and-test-mode

Which credential to use where, how to send it, and what test mode does. A key belongs to one workspace; every workspace calls the same host.

Updated December 4, 2026

## Send a key

Send the key as a bearer token to `https://api.widar.com`. Keep it in `WIDAR_API_KEY`, never in code, a browser, an app or a link. widar stores only a hash of each key and shows a secret once.

```
Authorization: Bearer wd_live_...
```

## Credentials

Credentials

| Kind | Starts with | Held by | May call |
| --- | --- | --- | --- |
| Secret key | `wd_live_` | Your server | Every server route of its workspace. |
| Test key | `wd_test_` | A developer or an agent | As a secret key, in test mode. |
| Restricted key | `wd_live_` | One job | Only its scopes, each read or write: `systems`, `marking`, `signing`, `certificates`, `timestamps`, `verifications`, `evidence`, `routes`, `webhooks`, `events`. |
| Provisioning key | `wd_live_` | Your provisioning server | Only `/v1/keys`. |
| Publishable key | `wd_pub_live_` | A page of yours | Only placing a verify page on your own site, from the origins you list. |
| Plugin key | `wd_plg_` | A plugin or sidecar install | Only fetching its system's keys and reporting usage. |
| Enrolment token | `enr_` | A new install, EST, or an ACME account binding | One enrolment, once. |
| AI agent's token | `wd_agent_` | An AI agent member | What its role allows. |

## Test mode

- A free account works in test mode from the first minute: test keys, test watermark keys, test certificates from widar's test root and timestamps from the test timestamp authority.
- The test root is on no trust list, and a test credential says it is a test. A check reads a test mark as a test, naming your workspace, never as a live mark.
- Test mode takes any file, without a limit. Nothing in test mode is billed.
- Every object and every event carries `mode`, `live` or `test`. Test objects never appear in a live list, export or count, and test events go only to endpoints registered for test.
- A live key works on the Free plan up to 1,000 C2PA-only files and 500 watermarked files a month. Past them, a live call answers `402 plan_required`, with how to move to Business or Volume.

> **Check your key before you start.** `GET /v1/key_check` (`widar auth status`) answers its workspace, mode, kind, scopes and expiry, and changes nothing.

## Errors

Key errors

| Status | Code | What to do |
| --- | --- | --- |
| 401 | `unauthorized` | Send a valid key in `Authorization: Bearer`. |
| 401 | `key_expired` | The key passed its expiry. Create or roll a key. |
| 402 | `plan_required` | The Free plan's files this month are used. Choose Business or Volume in the console, or let your agent pay: see [Agents](https://widar.com/docs/agents). |
| 403 | `forbidden` | The key's scopes, or the member's role, do not allow the call. |
| 429 | `rate_limited` | Wait the seconds in `Retry-After`, then retry with the same `Idempotency-Key`. |
