Skip to content

Audio Transcription Whisper-1

POST: https://www.kkiai.com/v1/audio/transcriptions

Official documentation: https://platform.openai.com/docs/guides/speech-to-text

Request Parameters

Authorization

Add the Authorization parameter to the Header. Its value should be the Token concatenated after Bearer.

Example: Authorization: Bearer YOUR_API_KEY

Header Parameters

Parameter NameTypeRequiredDescriptionExample
Content-TypestringOptionalThe request content type. When using cURL with --form, this is usually generated automatically.multipart/form-data
AuthorizationstringRequiredAPI key used for authentication.Bearer YOUR_API_KEY

Body Parameters (multipart/form-data)

Parameter NameTypeRequiredDescription
filefileRequiredThe audio file object to be transcribed, not the filename. Supported formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
modelstringRequiredThe model ID to use. Currently only whisper-1 and gpt-4o-mini-transcribe are available.
languagestringOptionalThe language of the input audio. Providing the input language in ISO-639-1 format can improve accuracy and latency.
promptstringOptionalAn optional text prompt to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
response_formatstringOptionalThe format of the transcript output. Options: json, text, srt, verbose_json, or vtt.
temperaturenumberOptionalDefaults to 0. 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 automatically increase the temperature based on log probability until a specific threshold is reached.

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/v1/audio/transcriptions' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--form 'file=@"/path/to/audio.m4a"' \
--form 'model="whisper-1"' \
--form 'language="en"' \
--form 'prompt="This is an English audio file."' \
--form 'response_format="json"'

Response

🟢 200 Success

Response Body

Parameter NameTypeRequiredDescription
textstringRequiredThe transcribed text.

Response Example

json
{
  "text": "Hello, this is a test audio transcription."
}