Overview
The Novisurf speech endpoint lets you convert text to spoken audio in seconds. It is fully OpenAI-compatible — just swap the base URL and API key and your existing code works out of the box.Endpoint
| Endpoint | Usage | URL |
|---|---|---|
| Speech | Convert text to audio | POST https://api2.novisurf.top/v1/audio/speech |
Authentication
Bearer token (recommended)Supported Models
| Model ID | Description |
|---|---|
shellai/melotts | Fast, lightweight multilingual TTS |
Quick Start
The speech endpoint takes four key inputs:- model: the TTS model to use
- input: the text to generate audio from
- voice: the desired voice for output
- response_format: defaults to
mp3
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | TTS model ID. |
input | string | Yes | Text to synthesize. |
voice | string | Yes | Voice to use for output. |
response_format | string | No | Output audio format. Defaults to mp3. |
speed | number | No | Playback speed from 0.25 to 4.0. Defaults to 1.0. |
Python
JavaScript
cURL
Response
The response is raw audio binary in the requested format, not JSON. Save the response body directly to a file.| Header | Value |
|---|---|
Content-Type | audio/mpeg for mp3, audio/wav for wav |
Error Codes
| Status | Meaning |
|---|---|
400 | Bad request — missing or invalid parameters |
401 | Unauthorized — invalid or missing API key |
402 | Insufficient credits |
429 | Rate limit exceeded |
500 | Internal server error |

