API Keys

An API Key authenticates every request to the Palabra API — REST calls, WebSocket streams, and WebRTC sessions alike. This page covers how to create one and how to use it once you have it.

Obtaining an API Key

Prerequisites

Get an API Key

To get your Palabra API Key, follow the steps below:

  1. Log in to the Palabra Platform
  2. Navigate to the API Keys page
  3. Create a new API Key
  4. Copy and save the API Key
The API Key is shown only once, upon creation. Save it in a safe place — it cannot be viewed again after the page is refreshed.
The API Key is a secret. Use it in server-side integrations only — never embed it in client-side (browser or mobile) code.

Using API Keys

REST API Requests

Pass the API Key in the Authorization: Bearer <API_KEY> header in every request to the Palabra API endpoints listed in the API Reference.

WebSocket Streaming APIs

When connecting to the real-time WebSocket endpoints (Speech-to-Speech, Speech-to-Text, Text-to-Speech), pass the API Key in the Authorization header or in the token query parameter — the server validates the key and creates a streaming session for you automatically. See the docs of each streaming API for the endpoint URLs.

Code Sample

The example below shows how to send a request to the built-in voices API endpoint.

Built-in Voices Request Code Sample

curl -L 'https://api.palabra.ai/saas/voice/builtin' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <YourApiKey>'