Audio
tts-1The text to generate audio for.
The voice to use when generating the audio.
The format to output audio in.
mp3Possible values: The speed of the generated audio.
1Successful response with an audio speech.
Invalid request data.
The company has run out of AI credits. Returned when the company's budget limit has been reached.
Server error.
POST /v1/audio/speech HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 97
{
"model": "tts-1",
"input": "There are three letters 'r' in the word 'strawberry'.",
"voice": "alloy"
}binaryThe audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
WhisperThe language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency.
An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
The format of the transcript output. Note: the non-JSON formats (text, srt,
vtt) are currently returned wrapped in a JSON object ({"html-message": "..."})
with Content-Type: application/json, not as a plain-text body.
jsonPossible values: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
0OK
Invalid request data.
The company has run out of AI credits. Returned when the company's budget limit has been reached.
Server error.
POST /v1/audio/transcriptions HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 147
{
"file": "binary",
"model": "Whisper",
"language": "text",
"prompt": "text",
"response_format": "json",
"temperature": 0,
"timestamp_granularities[]": [
"word"
]
}{
"text": "text",
"usage": {
"type": "duration",
"seconds": 1
}
}The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
WhisperAn optional text to guide the model's style or continue a previous audio segment. The prompt should be in English.
The format of the translated transcript output. Note: the non-JSON formats
(text, srt, vtt) are currently returned wrapped in a JSON object
({"html-message": "..."}) with Content-Type: application/json, not as a
plain-text body.
jsonPossible values: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.
0OK
Invalid request data.
The company has run out of AI credits. Returned when the company's budget limit has been reached.
Server error.
POST /v1/audio/translations HTTP/1.1
Host: api.nexos.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 92
{
"file": "binary",
"model": "Whisper",
"prompt": "text",
"response_format": "json",
"temperature": 0
}{
"text": "text"
}Last updated

