GPT 4o Mini Transcribe
Model Overview
A speech-to-text model based on GPT-4o mini for audio transcription. It provides improved word error rates and more accurate language recognition compared to the original Whisper models. Recommended for use cases that require higher transcription accuracy.
OpenAI STT models are priced based on tokens, similar to chat models. In practice, this means the cost primarily depends on the duration of the input audio.
Setup your API Key
If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.
API Schemas
Creating and sending a speech-to-text conversion task to the server
URL of the input audio file.
The BCP-47 language tag that hints at the primary spoken language. Depending on the Model and API endpoint you choose only certain languages are available
An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
The 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.
0curl -L \
--request POST \
--url 'https://api.aimlapi.com/v1/stt/create' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"model": "openai/gpt-4o-mini-transcribe",
"url": "https://audio-samples.github.io/samples/mp3/blizzard_primed/sample-0.mp3"
}'{
"generation_id": "text"
}Requesting the result of the task from the server using the generation_id
GET /v1/stt/{generation_id} HTTP/1.1
Host: api.aimlapi.com
Accept: */*
{
"id": "text",
"status": "queued",
"output": {
"metadata": {
"transaction_key": "text",
"request_id": "text",
"sha256": "text",
"created": "2026-01-01T00:00:00.000Z",
"duration": 1,
"channels": 1,
"models": [
"text"
],
"model_info": {
"ANY_ADDITIONAL_PROPERTY": {
"name": "text",
"version": "text",
"arch": "text"
}
}
},
"results": {
"channels": {
"alternatives": [
{
"transcript": "text",
"confidence": 1,
"words": [
{
"word": "text",
"start": 1,
"end": 1,
"confidence": 1,
"punctuated_word": "text"
}
],
"paragraphs": [
{
"transcript": "text",
"paragraphs": {
"sentences": [
{
"text": "text",
"start": 1,
"end": 1
}
],
"num_words": 1,
"start": 1,
"end": 1
}
}
]
}
]
}
}
},
"error": {
"name": "text",
"message": "text"
}
}Example Code: Processing a Speech Audio File via URL
Let's use the openai/gpt-4o-mini-transcribe model to transcribe the following audio fragment:
Last updated
Was this helpful?