curl -X POST "https://t.ato2.nodesms.com/v1/audio/transcriptions" \
-H "Authorization: Bearer $API_KEY" \
-F file="@audio.mp3" \
-F model="whisper-1"
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxx",
base_url="https://t.ato2.nodesms.com/v1"
)
audio_file = open("audio.mp3", "rb")
transcript = client.audio.transcriptions.create(
model="whisper-1",
file=audio_file
)
print(transcript.text)
{
"text": "Hello, this is a test."
}
{
"error": {
"message": "string",
"type": "invalid_request_error",
"param": "file",
"code": "string"
}
}
{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"param": null,
"code": "rate_limit_exceeded"
}
}
Audio Transcription
Transcribe audio files to text, supporting multiple languages and output formats.
POST
/
v1
/
audio
/
transcriptions
curl -X POST "https://t.ato2.nodesms.com/v1/audio/transcriptions" \
-H "Authorization: Bearer $API_KEY" \
-F file="@audio.mp3" \
-F model="whisper-1"
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxx",
base_url="https://t.ato2.nodesms.com/v1"
)
audio_file = open("audio.mp3", "rb")
transcript = client.audio.transcriptions.create(
model="whisper-1",
file=audio_file
)
print(transcript.text)
{
"text": "Hello, this is a test."
}
{
"error": {
"message": "string",
"type": "invalid_request_error",
"param": "file",
"code": "string"
}
}
{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"param": null,
"code": "rate_limit_exceeded"
}
}
Headers
string
required
Bearer token authentication. Format:
Authorization: Bearer sk-xxxxxxBody
Format:multipart/form-data
file
required
Audio file to transcribe. Supports multiple formats (e.g., mp3, mp4, mpeg, mpga, m4a, wav, webm).
string
required
Model ID. For example
whisper-1.string
Language of the audio file, encoded in ISO-639-1 format (e.g.
zh, en, ja).string
Optional text prompt to guide the model’s style or continue a previous audio segment. The prompt should match the audio language.
string
default:"json"
Transcription output format. Allowed values are
json, text, srt, verbose_json, vtt. Defaults to json.number
Sampling temperature, between 0 and 1. Defaults to 0.
array
List of timestamp granularities. Allowed values are
word or segment. Only effective when response_format is set to verbose_json.Response
string
Transcribed text.
curl -X POST "https://t.ato2.nodesms.com/v1/audio/transcriptions" \
-H "Authorization: Bearer $API_KEY" \
-F file="@audio.mp3" \
-F model="whisper-1"
from openai import OpenAI
client = OpenAI(
api_key="sk-xxxxxx",
base_url="https://t.ato2.nodesms.com/v1"
)
audio_file = open("audio.mp3", "rb")
transcript = client.audio.transcriptions.create(
model="whisper-1",
file=audio_file
)
print(transcript.text)
{
"text": "Hello, this is a test."
}
{
"error": {
"message": "string",
"type": "invalid_request_error",
"param": "file",
"code": "string"
}
}
{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"param": null,
"code": "rate_limit_exceeded"
}
}
Last modified on October 28, 2026
Was this page helpful?