API keys are environment-scoped. Each key belongs to exactly one environment, and the key’s prefix tells you which one at a glance.Documentation Index
Fetch the complete documentation index at: https://docs.retab.com/llms.txt
Use this file to discover all available pages before exploring further.
| Prefix | Environment | Dashboard section |
|---|---|---|
rt_test_ | test | Test keys |
rt_live_ | production | Live keys |
sk_retab_ | production | Live keys (labelled legacy) |
Create a key from the dashboard
Go to Developer settings in the dashboard. The page is split into two sections — Test keys and Live keys — to keep environment scope explicit at the moment of creation.- Click Create test key to mint a new
rt_test_...key. - Click Create live key to mint a new
rt_live_...key.
Use a key
Each SDK readsRETAB_API_KEY from the environment by default. Pick the
right key per surface:
Verify a key
Probe the API and see exactly which environment Retab resolved for the current credential:GET /v1/auth/status.
Rules of thumb
- Use a test key for local development, CI, integration tests, and customer-facing staging apps. Test resources never bill, log, or trigger production-only side effects.
- Use a live key for production deploys, scheduled jobs, and any call that should actually move money, send a notification, or update customer-facing systems.
- Never bake a live key into a public repo, a client bundle, or a shell history file. Treat it like a database password.
- Rotate keys from the dashboard. Revoking a key invalidates it
immediately; in-flight requests using the revoked key get
401.
Legacy keys
sk_retab_... keys from before the environments feature continue to work.
They resolve to production and appear under Live keys with a
legacy label. There is no rush to rotate them — they keep working —
but you should mint a fresh rt_live_... key the next time you would
have rotated anyway, so the prefix matches the environment.