Skip to main content
TokModel provides three audio endpoints that follow the OpenAI Audio API shape: synthesize speech from text, transcribe an audio file into the spoken language, and translate spoken audio into English. You can switch between audio model providers by changing the model parameter.

Authentication

Include your API key in every request:

Convert text to speech

POST /v1/audio/speech generates an audio file from a text string. The response body is raw audio binary — write it directly to a file.
curl
The --output flag tells curl to save the binary response to speech.mp3 instead of printing it to the terminal.

Key parameters

Use openai/tts-1-hd for higher audio fidelity. It costs more per character but produces noticeably cleaner output, especially for longer texts.