Authorization header:
namu_sk_ followed by 43 letters and digits. GET /v1/models, /v1/voices and /v1/health need no key.
Create a key
- Open API keys in the console (sign in or create an account first).
- Click Create new secret key and name it after where it will live:
clinic-reminders-server,staging. - Choose its scopes (below), then create it.
- Copy the key now. It is shown once: we keep a fingerprint of it, not the key, so we cannot show it again.
Scopes
A scope is permission to call one endpoint. Give a key only the scopes its code uses: if it leaks, that is all it can do.
A call outside a key’s scopes returns
403 insufficient_scope.
Keep keys secret
Call the Namu API from your server, and let your app talk to your server:- Read the key from an environment variable or your host’s secret store, never from a file in the repository.
- Use a different key for each app and environment, so you can revoke one without stopping the others.
Revoke a key
In the console, open API keys and revoke it. Requests with it stop within about 30 seconds and return401 key_revoked. Revoke a key at once if you think it was exposed, then create a new one.