Skip to main content
POST
Create speech (OpenAI-compatible)

Authorizations

Authorization
string
header
required

API key in the Authorization header: Bearer sk_hopper_... Keys are minted in the dashboard at withhopper.com/console/keys and shown once at creation. WebSocket connections also accept ?api_key=.

Body

application/json
model
string
required

TTS model id, e.g. omnivoice.

input
string
required

Text to synthesize, 1-5000 characters. Billed per character.

Required string length: 1 - 5000
voice
string
required

Voice id from GET /voices.

response_format
enum<string>
default:mp3

opus, aac, and flac return 400.

Available options:
mp3,
wav,
pcm
speed
number

Playback speed. Streaming requires speed 1.

Required range: 0.6 <= x <= 1.5
stream
boolean
default:false

Relay raw WAV/PCM bytes progressively as they are generated. Not supported with mp3.

Response

Audio bytes.

The response is of type file.