Authentication
API Key
An API Key is a single secret string created on the Palabra API Keys page. It is the way to authenticate every Palabra API:
- REST API (sessions, voices, glossaries, broadcaster, etc.) — pass it in the
Authorization: Bearer <API_KEY>header of every request. - Real-time streaming APIs (Speech-to-Speech, Speech-to-Text, Text-to-Speech) — pass it
in the
Authorizationheader or in thetokenquery parameter when connecting to a WebSocket endpoint; the server validates the key and creates a streaming session for you automatically.
warning
The API Key is a secret. Use it in server-side integrations only — never embed it in client-side (browser or mobile) code.
Session Token
Connecting to Palabra over WebRTC requires a session token. Use your API Key on your server to create a session, then connect with its returned token. Treat the session token as an opaque string.
tip
For WebSocket streaming endpoints, a session token is optional — an API Key can be used instead. To connect from a browser or mobile app, create a session on your server and give the client its session token.