Theme
Audio to Text gpt-4o-transcribe
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 appended after Bearer.
Example: Authorization: Bearer ********************
Header Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | string | Optional | multipart/form-data |
Body Parameters (multipart/form-data)
| Parameter | 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 to guide the model's style or continue a previous audio segment. The prompt should match the audio language. |
response_format | string | Optional | Default is json. The format of the transcription output. Options: json, text |
temperature | number | Optional | Default is 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 use log probability to automatically increase the temperature until a certain threshold is reached. |
cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/v1/audio/transcriptions' \
--header 'Authorization: Bearer <token>' \
--form 'file=@"C:\\Users\\Administrator\\Desktop\\test.m4a"' \
--form 'model="gpt-4o-transcribe"' \
--form 'response_format="json"'Response
🟢 200 Success
Response Body
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Required |
Response Example
json
{
"text": "Imagine the wildest idea that you've ever had, and you're curious about how it might scale to something that's a 100, a 1,000 times bigger. This is a place where you can get to do that."
}