Overview
Krisp's speech models as realtime WebSocket endpoints: authentication, the session protocol, message limits and common errors.
The Krisp API gives you Krisp's speech models as realtime WebSocket endpoints. You open one WebSocket connection per session, describe the session in a JSON message, then stream audio or text and receive results on the same connection as they are produced.
Endpoints
| Endpoint | What it does | Page |
|---|---|---|
wss://streaming.krisp.ai/stt | Speech-to-Text: stream audio, receive transcripts | Speech-to-Text (STT) |
wss://streaming.krisp.ai/tts | Text-to-Speech: stream text, receive synthesized audio | Text-to-Speech (TTS) |
wss://streaming.krisp.ai/vt | Voice Translation: stream speech, receive translated speech | Voice Translation (VT) |
wss://streaming.krisp.ai/voice-isolation | Voice Isolation: stream noisy audio, receive cleaned audio | Voice Isolation |
Region and latency
The Krisp API currently runs in the US region. This applies to all endpoints: Speech-to-Text, Text-to-Speech, Voice Translation and Voice Isolation. You can connect from anywhere, but clients outside the US see extra network latency, which grows with the distance from the US. For the lowest latency, connect from servers in or near the US.
Authentication
The STT, TTS and Voice Isolation endpoints authenticate with a session token that your backend generates from your Krisp API key. See Authentication for how to generate one; do not send your API key (master token) on the WebSocket. Voice Translation uses the same session tokens, with usage_type vt. Send the session token in the Authorization header of the WebSocket handshake, using the api-key scheme (case-insensitive, so Api-Key also works):
Authorization: api-key SESSION_TOKENIf your client cannot set headers on a WebSocket handshake (for example, browsers), pass the same value as the authorization query parameter instead, URL-encoded:
wss://streaming.krisp.ai/stt?authorization=api-key%20SESSION_TOKENIf authentication fails, the server sends an error message (see below) and closes the connection with close code 1008.
Session protocol
All endpoints follow the same flow:
- Connect to
wss://streaming.krisp.ai/<endpoint>with your session token. - Send the client hello. The first message must be a JSON text message that configures the session (each endpoint page documents its fields). It must arrive within 15 seconds of connecting.
- Wait for the server hello. The server answers with either a
readymessage (session started) or anerrormessage, after which it closes the connection. - Stream. After
ready, send binary audio frames and/or JSON text messages, as described on the endpoint page. Results arrive on the same connection. - Close the WebSocket when you are done.
Each message you send after the hello must be at most 65,536 bytes (64 KB). Larger messages are rejected with the chunk_too_large error and the connection is closed.
ready: GatewayServerHello
ready: GatewayServerHelloThe first response sent by the server to the client. Successful handshake response format.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | no | "ready" | Response type |
request_id | string | null | no | null | Request ID if available |
tracks_ms | array of integer | null | no | null | Delays in ms of the decoders producing partial results. Each partial word's src is one of these values. |
metadata | object | null | no | null | User-provided metadata, echoed back. Omitted entirely when the service's ClientHello carries no metadata field. |
Fields with a null value are omitted from the message. Some endpoints add their own fields to ready; see each endpoint page. Keep request_id: it identifies the session if you contact Krisp support.
{"type": "ready", "request_id": "3f2a9c1e-7b4d-4c2a-9e51-0d6f8a2b7c90", "metadata": {"call_id": "abc-123"}}error: ErrorResponse
error: ErrorResponseError response schema following the standard format.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | no | "error" | Response type |
request_id | string | null | no | null | Request ID if available |
error | ErrorInfo | yes | Error information |
ErrorInfo
ErrorInfoError information structure.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
code | string | yes | Error code identifier | |
status_code | integer | yes | HTTP status code | |
message | string | yes | Human-readable error message | |
details | object | null | no | null | Optional error details (e.g., {'hint': '...'}) |
After sending an error message, the server closes the WebSocket. The close reason is the same as error.message.
{
"type": "error",
"request_id": "3f2a9c1e-7b4d-4c2a-9e51-0d6f8a2b7c90",
"error": {
"code": "invalid_client_hello",
"status_code": 400,
"message": "Invalid ClientHello: sample_rate: Input should be less than or equal to 16000",
"details": {
"hint": "Check documentation for the correct ClientHello message format",
"errors": [{"field": "sample_rate", "message": "Input should be less than or equal to 16000"}]
}
}
}Common errors
These errors can occur on every endpoint. Endpoint-specific errors are listed on each endpoint page.
error.code | status_code | WebSocket close code | Meaning |
|---|---|---|---|
missing_authorization_header | 401 | 1008 | No Authorization header or authorization query parameter was sent. |
invalid_api_key | 401 | 1008 | The Authorization value does not use the api-key scheme. |
unauthorized | 403 | 1008 | The session token or API key is not valid, or has expired. |
client_hello_timeout | 408 | 1008 | No client hello was received within 15 seconds of connecting. |
invalid_client_hello | 400 | 1003 / 1008 | The first message was binary (1003), or it was not valid JSON or failed validation (1008). details.errors lists each invalid field as field / message. |
internal_server_error | 500 | 1008 / 1011 | The session could not be created. Retry after a few seconds. |
upstream_connection_failed | 500 | 1011 | The model could not be reached. Retry after a few seconds. |
upstream_initialization_failed | 500 | 1011 | The model rejected or failed to start the session. Retry after a few seconds. |
chunk_too_large | 413 | 1009 | A message was larger than 65,536 bytes. |
service_shutting_down | 503 | 1012 | The server instance is restarting. Reconnect to start a new session. |
concurrency_limit_exceeded | 403 | 1008 | Your team reached the maximum number of simultaneous sessions allowed on its plan. |
Changelog
- 2026-10-01: Voice Translation authentication now points to its own session token endpoint.
- 2026-10-01: Authentication now uses a session token; see Authentication.
- 2026-10-01: Page created: endpoints, authentication, session protocol, common errors.
Updated 2 days ago

