Platform credential prefixes are error-detection hints, not authorization:
| Context | Prefix |
|---|---|
| Platform pre-production | osp_stg_ |
| Production infrastructure / Project test | osp_test_ |
| Production infrastructure / Project live | osp_live_ |
The credential record determines Infrastructure Environment, Project Environment, Principal, status and scopes. A key is shown once; only a public prefix and strong keyed digest are retained. Revocation is checked on every authentication. Restricted scopes can only reduce the Principal's active Grant.
Never place an API key in browser code, firmware shared across devices, a URL,
logs, source control or MCP model context. osp_live_ is server-side only and
does not bypass live-enable policy.
On the pre-production environment, an Owner creates a Service Principal API key in the
OneSay Cloud (the API keys page, Create key; Owner access is needed). The
secret, with the osp_stg_ prefix, is shown once. OneSay Cloud also rotates and
revokes keys; the API operations are createCredential, rotateCredential and
revokeCredential. Your first key comes from OneSay Cloud's onboarding (/cloud/onboarding/, step Create your first API key, after the first
Application): it is created for your Project's Test Environment, not for one Application, with the scopes a first integration uses (app sessions, Rooms, dictation tasks, audio signals, usage
and logs), and shown once. A key that starts an AI Agent also needs agent.execution.create, agent.execution.read, agent.execution.stop,
source.use and signal.audio.subscribe: an Owner creates it on OneSay Cloud's API keys page, as above, with scopes that include them. Use a key from server code only: the SDK's browser client
refuses an API key (authentication_required), and a browser tokenProvider
that returns one fails with token_invalid.