Nbility provides OpenAI-compatible speech-to-text, audio translation, and text-to-speech endpoints. Available models, languages, voices, and audio formats depend on the live catalog and selected channel.
Transcription
POST /v1/audio/transcriptions
This endpoint uses multipart/form-data:
curl https://api.nbility.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $NBILITY_API_KEY" \
-F "model=YOUR_TRANSCRIPTION_MODEL" \
-F "file=@meeting.mp3" \
-F "response_format=json"
Common fields include file, model, and—when supported—language, prompt, temperature, and response_format. A JSON response normally exposes the transcript in text.
Translation
POST /v1/audio/translations
The request is also multipart:
curl https://api.nbility.ai/v1/audio/translations \
-H "Authorization: Bearer $NBILITY_API_KEY" \
-F "model=YOUR_TRANSCRIPTION_MODEL" \
-F "file=@speech.m4a"
The target language and optional fields depend on the selected model.
Text to speech
POST /v1/audio/speech
curl https://api.nbility.ai/v1/audio/speech \
-H "Authorization: Bearer $NBILITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_TTS_MODEL",
"voice": "YOUR_VOICE",
"input": "Welcome to Nbility.",
"response_format": "mp3"
}' \
--output speech.mp3
Common TTS fields:
| Field | Required | Description |
|---|---|---|
model | yes | Text-to-speech model ID |
input | yes | Text to synthesize |
voice | yes | Voice ID from the model's supported set |
instructions | no | Style or delivery instruction, only for supported models |
response_format | no | Such as mp3 or wav; supported values are model-specific |
speed | no | Speaking speed; allowed range is model-specific |
Production guidance
- Enforce file size, duration, and MIME-type limits before forwarding user uploads.
- Audio processing may take longer than text generation, so configure an appropriate overall timeout.
- When TTS returns binary audio, do not parse it as JSON; inspect
Content-Typeas well. - Speech can contain personal data. Align storage, logs, and retention with your privacy policy.