Skip to main content
WSS wss://api.withhopper.com/stt/websocket Streaming speech-to-text on Nemotron ASR, NVIDIA’s open speech-to-text model served by Hopper. Configuration is query parameters at connect; audio is binary frames in; transcripts are JSON frames out. This page is the exact message contract — the streaming guide covers usage and includes a runnable client.

Handshake

  • URL: wss://api.withhopper.com/stt/websocket
  • Method: GET upgrade
  • Auth: Authorization: Bearer sk_hopper_... header, or ?api_key= query parameter
  • Success: 101 Switching Protocols
  • Failure: raw HTTP response in the error envelope, written before any frames — 400 invalid_turn_detection or invalid_sample_rate, 401 invalid_api_key, 402 insufficient_quota, 429 rate_limit_exceeded, 502 upstream_unavailable, 503 model_offline

Query parameters

Client → server

Audio chunk — binary frame. Raw PCM16 mono samples at the configured sample_rate. Send only after Ready. Received bytes are what gets metered: audio_seconds = bytes / (sample_rate × 2). Flush — text frame containing exactly END. Finalizes all buffered audio; the server sends any remaining finals, then echoes END.

Server → client

Ready — sent once when the upstream session is live. Audio sent before it is not guaranteed to be processed.
Transcript — partial while a turn is in progress (is_final: false, revised as audio arrives), final when the turn ends (is_final: true, stable). Finals carry words when available.
Flush acknowledgment — text frame END, echoed after the final transcript for the flushed audio. Everything sent before your END is now transcribed.

Billing and close

Usage costs $0.30 per hour of audio, computed from received bytes, and settles every 60 s during the session and at close. At zero balance the server closes the socket with code 1008 (“insufficient credits”).