Audio

POST/v1/audio/speech

Synthesize 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

FieldTypeRequiredDescription
modelstringYesA speech synthesis model ID returned by /v1/models.
inputstringNoText to convert into speech; use it instead of prompt.
promptstringNoPrompt for audio or music models; use it instead of input.
voicestringNoA voice ID supported by the model; music models usually omit it.
response_formatstringNoRequested audio format; accepted values depend on the model.
instructionsstringNoDelivery or tone instructions when supported by the model.
speednumberNoSpeech speed for compatible TTS models.
audio_referencesstring[]NoSeed Audio reference audio URLs; up to three.
image_urlsstring[]NoSeed Audio reference image URL; mutually exclusive with audio_references.
formatstringNoSeed Audio output format, such as wav or mp3.
sample_rateintegerNoSeed Audio sample rate, such as 24000 or 48000.
speech_ratenumberNoSeed Audio speech rate.
loudness_ratenumberNoSeed Audio loudness adjustment.
pitch_ratenumberNoSeed Audio pitch adjustment.
custom_modebooleanNoSuno custom-mode switch.
instrumentalbooleanNoWhether Suno should generate instrumental audio.
stylestringNoSuno style description; required when custom_mode=true.
titlestringNoSuno track title; required when custom_mode=true.
durationintegerNoForwarded only for Suno v5.5/v6 with custom_mode=true; acceptance depends on the model.
vocal_genderstringNoSuno vocal-gender preference.
negative_tagsstringNoSuno tags to avoid.
style_weightnumberNoSuno style weight.
weirdness_constraintnumberNoSuno weirdness constraint.
audio_weightnumberNoSuno reference-audio weight.
persona_idstringNoSuno Persona ID.
persona_modelstringNoSuno Persona model.

Speech synthesis example

Suno · JSON
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}'
Seed Audio · JSON
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 · binary output
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.mp3

Speech 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

GET/v1/audio/speech/:task_id

Poll with the id from the JSON creation response. succeeded, failed, and canceled are terminal states; clients must enforce a maximum wait time.

curl
curl "https://api.noxgate.net/v1/audio/speech/audio_task_example" \
  -H "Authorization: Bearer sk-your-api-key"

Audio transcription

POST/v1/audio/transcriptions

Upload an audio file and receive its transcription.

Transcription fields

FieldTypeRequiredDescription
modelstringYesA transcription model ID returned by /v1/models.
filefileYesThe audio file uploaded as multipart data.
Other form fieldsstringNoOther text form fields are passed to the Provider; use only fields supported by the selected model.

Transcription examples

curl · multipart
curl https://api.noxgate.net/v1/audio/transcriptions \
  -H "Authorization: Bearer sk-your-api-key" \
  -F "model=YOUR_MODEL_ID" \
  -F "file=@./audio.mp3"
Python · requests
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())
Node.js · fetch
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.

JSON
{"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.