Theme
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 Name | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | string | Optional | The request content type. When using cURL with --form, this is usually generated automatically. | multipart/form-data |
Authorization | string | Required | API key used for authentication. | Bearer YOUR_API_KEY |
Body Parameters (multipart/form-data)
| Parameter Name | Type | Required | Description |
|---|---|---|---|
file | file | Required | The audio file object to be transcribed, not the filename. Supported formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. |
model | string | Required | The model ID to use. Currently only whisper-1 and gpt-4o-mini-transcribe are available. |
language | string | Optional | The language of the input audio. Providing the input language in ISO-639-1 format can improve accuracy and latency. |
prompt | string | Optional | An optional text prompt to guide the model's style or continue a previous audio segment. The prompt should match the audio language. |
response_format | string | Optional | The format of the transcript output. Options: json, text, srt, verbose_json, or vtt. |
temperature | number | Optional | Defaults 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 Name | Type | Required | Description |
|---|---|---|---|
text | string | Required | The transcribed text. |
Response Example
json
{
"text": "Hello, this is a test audio transcription."
}