Realtime TTS-2 is live. Built for realtime conversation that feels human. Learn more

Authentication

Overview

How requests to Inworld APIs authenticate: API keys, session tokens, and one-time tokens.

Every request to an Inworld API carries a credential in the Authorization header. There is one root credential — the workspace API key — and two kinds of short-lived tokens minted from it for code you can't trust with the key itself.

Pick a credential

CredentialHeaderLifetimeWhere it belongs
API keyAuthorization: Basic <api-key>Until you delete the keyYour servers only
One-time tokenpreferred for clientsAuthorization: Bearer <token>Minutes, single-useClients that make one connection per token
Session token — deprecatedAuthorization: Bearer <jwt>A few hours, multi-useRealtime sessions, which one-time tokens can't cover yet

Two rules cover most decisions:

  1. Server-side code authenticates with the API key directly. Simple, no minting step.
  2. Client-side code never sees the API key. Your backend mints a token and hands only the token to the client. Prefer one-time tokens: every token carries the key's full permissions, and a single-use, minutes-lived credential exposes them for at most one connection. Session tokens are deprecated; they remain for Realtime sessions, which one-time tokens can't cover yet. The reasoning and patterns are in Security best practices.

Guides