Skip to content
Trang này chưa có bản dịch sang ngôn ngữ của bạn, nên hiện đang được hiển thị bằng tiếng Anh.

Whisper-1 Audio Transcription

Supports speech recognition in 99 languages

Toàn bộ tài liệu
POST/v1/audio/transcriptions
  • Multiple output formats: json, text, srt, vtt, etc.
  • Maximum file size 25 MB
srt
1
00:00:00,000 --> 00:00:03,500
This is a transcribed text

2
00:00:03,500 --> 00:00:08,500
from the test audio.
json
{
  "error": {
    "code": 502,
    "message": "Bad gateway, server temporarily unavailable",
    "type": "bad_gateway"
  }
}

Ví dụ request

curl --request POST \
  --url https://api.apisea.ai/v1/audio/transcriptions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=@/path/to/audio.mp3' \
  --form 'model=whisper-1' \
  --form 'language=en' \
  --form 'response_format=json'

Authorizations

Authorizationstringrequired

All interfaces require Bearer Token authentication

Get API Key:

Visit API Key Management Page to get your API Key

Add to request header:

text
Authorization: Bearer YOUR_API_KEY

Body

Note

⚠️ Online testing (Try it) is not supported for this endpoint

Due to file upload limitations, please test using:

  • Apifox / Postman - Manually change file parameter to file type after importing
  • cURL - Refer to code examples on the right
  • SDK - Use SDK examples in various languages
filestringrequired

Audio file to transcribe (File type)

⚠️ Note: When testing with Apifox or similar tools:

  1. After importing, manually change this parameter type to file
  2. Ensure request Content-Type is multipart/form-data

Supported formats: mp3, mp4, mpeg, mpga, m4a, wav, webm

Maximum file size: 25 MB

modelstringrequireddefault: whisper-1

Speech recognition model name

Example: "whisper-1"

languagestring

Language code of the audio (ISO-639-1 format)

Specifying the language can improve accuracy and speed

Supported languages include: zh (Chinese), en (English), ja (Japanese), ko (Korean), and 99 other languages

Example: "en"

promptstring

Optional text prompt to guide the transcription style or continue from previous audio

Maximum 224 tokens

response_formatstringdefault: json

Output format

Supported formats:

  • json - JSON format (text only)
  • text - Plain text
  • srt - SRT subtitle format
  • verbose_json - Verbose JSON format (includes timestamps and metadata)
  • vtt - WebVTT subtitle format
temperaturenumberdefault: 0

Sampling temperature, range 0 to 1

Higher values (like 0.8) make output more random, lower values (like 0.2) make it more deterministic and consistent

Response

textstring

Transcribed text content

taskstring

Task type, fixed as transcribe

Only returned in verbose_json format

languagestring

Detected or specified language code

Only returned in verbose_json format

durationnumber

Audio duration (seconds)

Only returned in verbose_json format

segmentsarray

Array of text segments

Only returned in verbose_json format

Properties

idinteger

Segment ID

startnumber

Segment start time (seconds)

endnumber

Segment end time (seconds)

textstring

Segment text content

temperaturenumber

Sampling temperature used

avg_logprobnumber

Average log probability

compression_rationumber

Compression ratio

no_speech_probnumber

No speech probability

Phản hồi

{
  "text": "This is a transcribed text from the test audio."
}

Phát hiện lỗi trong tài liệu này? Gửi email đến support@apisea.ai.