Audio
/v1/audio/speechSynthesize speech and transcribe audio through unified endpoints.
Speech synthesis may return binary audio or a JSON asynchronous task. Transcription uses multipart/form-data. Provide exactly one of input or prompt for speech synthesis.
Read the complete audio guide for sync/async TTS, file saving, transcription, and errors
Speech synthesis fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A speech synthesis model ID returned by /v1/models. |
input | string | No | Text to convert into speech; use it instead of prompt. |
prompt | string | No | Prompt for audio or music models; use it instead of input. |
voice | string | No | A voice ID supported by the model; music models usually omit it. |
response_format | string | No | Requested audio format; accepted values depend on the model. |
instructions | string | No | Delivery or tone instructions when supported by the model. |
speed | number | No | Speech speed for compatible TTS models. |
audio_references | string[] | No | Seed Audio reference audio URLs; up to three. |
image_urls | string[] | No | Seed Audio reference image URL; mutually exclusive with audio_references. |
format | string | No | Seed Audio output format, such as wav or mp3. |
sample_rate | integer | No | Seed Audio sample rate, such as 24000 or 48000. |
speech_rate | number | No | Seed Audio speech rate. |
loudness_rate | number | No | Seed Audio loudness adjustment. |
pitch_rate | number | No | Seed Audio pitch adjustment. |
custom_mode | boolean | No | Suno custom-mode switch. |
instrumental | boolean | No | Whether Suno should generate instrumental audio. |
style | string | No | Suno style description; required when custom_mode=true. |
title | string | No | Suno track title; required when custom_mode=true. |
duration | integer | No | Forwarded only for Suno v5.5/v6 with custom_mode=true; acceptance depends on the model. |
vocal_gender | string | No | Suno vocal-gender preference. |
negative_tags | string | No | Suno tags to avoid. |
style_weight | number | No | Suno style weight. |
weirdness_constraint | number | No | Suno weirdness constraint. |
audio_weight | number | No | Suno reference-audio weight. |
persona_id | string | No | Suno Persona ID. |
persona_model | string | No | Suno Persona model. |
Speech synthesis example
curl https://api.noxgate.net/v1/audio/speech \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"suno-v5.5","prompt":"Bright adventure game music","custom_mode":false,"instrumental":true}'curl https://api.noxgate.net/v1/audio/speech \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"doubao-seed-audio-1-0","prompt":"Gentle rain falling in a forest"}'curl https://api.noxgate.net/v1/audio/speech \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{"model":"YOUR_MODEL_ID","input":"Hello from NoxGate","voice":"YOUR_VOICE_ID"}' \
-o speech.mp3Speech synthesis response
Inspect Content-Type first. Save audio responses as bytes; parse application/json as a task, retain its id, and poll the retrieval endpoint.
Retrieve an asynchronous speech task
/v1/audio/speech/:task_idPoll with the id from the JSON creation response. succeeded, failed, and canceled are terminal states; clients must enforce a maximum wait time.
curl "https://api.noxgate.net/v1/audio/speech/audio_task_example" \
-H "Authorization: Bearer sk-your-api-key"Audio transcription
/v1/audio/transcriptionsUpload an audio file and receive its transcription.
Transcription fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | A transcription model ID returned by /v1/models. |
file | file | Yes | The audio file uploaded as multipart data. |
Other form fields | string | No | Other text form fields are passed to the Provider; use only fields supported by the selected model. |
Transcription examples
curl https://api.noxgate.net/v1/audio/transcriptions \
-H "Authorization: Bearer sk-your-api-key" \
-F "model=YOUR_MODEL_ID" \
-F "file=@./audio.mp3"import requests
with open("audio.mp3", "rb") as audio:
response = requests.post(
"https://api.noxgate.net/v1/audio/transcriptions",
headers={"Authorization": "Bearer sk-your-api-key"},
data={"model": "YOUR_MODEL_ID"},
files={"file": ("audio.mp3", audio, "audio/mpeg")},
)
print(response.json())import { readFile } from "node:fs/promises";
const form = new FormData();
form.append("model", "YOUR_MODEL_ID");
form.append("file", new Blob([await readFile("audio.mp3")], { type: "audio/mpeg" }), "audio.mp3");
const response = await fetch("https://api.noxgate.net/v1/audio/transcriptions", {
method: "POST",
headers: { Authorization: "Bearer sk-your-api-key" },
body: form,
});
console.log(await response.json());Transcription response
The gateway preserves the Provider transcription payload. JSON routes commonly return a text field, but the exact shape depends on the selected model.
{"text":"Hello from NoxGate"}Usage notes
- This table combines fields from multiple model families; do not send every field. Suno and Seed Audio use prompt without voice. Traditional TTS uses input and a voice when required by the model.
- Voice IDs, formats, file types, and optional fields are constrained by the selected model.
- The speech example uses -o to save binary output; do not parse it as JSON.
- Transcription requires multipart/form-data and cannot receive a local file path inside JSON.