curl --request POST \
--url https://api.example.com/v1/audio/transcriptions \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>"
}
'{
"text": "<string>"
}Transcribe audio to text using OpenAI-compatible format
curl --request POST \
--url https://api.example.com/v1/audio/transcriptions \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>"
}
'{
"text": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Soju06/codex-lb/llms.txt
Use this file to discover all available pages before exploring further.
/v1/audio/transcriptions endpoint provides OpenAI-compatible audio transcription. It accepts multipart audio file uploads and returns transcribed text.
This endpoint:
gpt-4o-transcribe only)Bearer YOUR_API_KEYmultipart/form-data encoding.
"gpt-4o-transcribe".Any other value will return a 400 error with:{
"error": {
"message": "Unsupported transcription model 'model-name'. Only 'gpt-4o-transcribe' is supported.",
"type": "invalid_request_error",
"code": "invalid_request_error",
"param": "model"
}
}
curl https://api.example.com/v1/audio/transcriptions \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@/path/to/audio.mp3" \
-F "model=gpt-4o-transcribe"
{
"text": "Hello, this is a test transcription of an audio file."
}
curl https://api.example.com/v1/audio/transcriptions \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@/path/to/meeting.wav" \
-F "model=gpt-4o-transcribe" \
-F "prompt=This is a technical meeting discussing API design. Speakers include Alice, Bob, and Charlie."
curl https://api.example.com/v1/audio/transcriptions \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@recording.wav" \
-F "model=gpt-4o-transcribe"
curl https://api.example.com/v1/audio/transcriptions \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@voice-memo.m4a" \
-F "model=gpt-4o-transcribe"
curl https://api.example.com/v1/audio/transcriptions \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@podcast.flac" \
-F "model=gpt-4o-transcribe"
const formData = new FormData();
formData.append('file', audioFile); // File object from input
formData.append('model', 'gpt-4o-transcribe');
formData.append('prompt', 'Optional context for transcription');
const response = await fetch('https://api.example.com/v1/audio/transcriptions', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
},
body: formData
});
const result = await response.json();
console.log('Transcription:', result.text);
import requests
url = 'https://api.example.com/v1/audio/transcriptions'
headers = {'Authorization': 'Bearer YOUR_API_KEY'}
with open('audio.mp3', 'rb') as audio_file:
files = {'file': audio_file}
data = {
'model': 'gpt-4o-transcribe',
'prompt': 'Optional transcription context'
}
response = requests.post(url, headers=headers, files=files, data=data)
result = response.json()
print('Transcription:', result['text'])
{
"error": {
"message": "Error description",
"type": "error_type",
"code": "error_code",
"param": "field_name"
}
}
{
"error": {
"message": "Unsupported transcription model 'whisper-1'. Only 'gpt-4o-transcribe' is supported.",
"type": "invalid_request_error",
"code": "invalid_request_error",
"param": "model"
}
}
400 Bad Request
Missing File:
{
"error": {
"message": "Missing required parameter: file",
"type": "invalid_request_error",
"code": "invalid_request_error"
}
}
400 Bad Request
Model Access Denied:
{
"error": {
"message": "This API key does not have access to model 'gpt-4o-transcribe'",
"type": "invalid_request_error",
"code": "model_not_allowed"
}
}
403 Forbidden
Rate Limit Exceeded:
{
"error": {
"message": "Rate limit exceeded. Usage resets at 2026-03-03T15:30:00Z.",
"type": "rate_limit_error",
"code": "rate_limit_exceeded"
}
}
429 Too Many Requests
Upstream Error:
{
"error": {
"message": "Upstream transcription service error",
"type": "server_error",
"code": "upstream_error"
}
}
502 Bad Gateway
No Accounts Available:
{
"error": {
"message": "No upstream accounts available",
"type": "server_error",
"code": "no_accounts"
}
}
503 Service Unavailable
gpt-4o-transcribe.
This is enforced for OpenAI API compatibility. If you need to use a different transcription model, contact your administrator.
allowed_models configured, it must include gpt-4o-transcribe to use this endpoint.
API Key Configuration:
{
"allowed_models": ["gpt-4.1", "gpt-5.2"]
}
403 Forbidden and model_not_allowed error.
Valid Configuration:
{
"allowed_models": ["gpt-4.1", "gpt-4o-transcribe"]
}
/v1/models (note: gpt-4o-transcribe may not appear in the models list but is still accessible if allowed).
gpt-4o-transcribe.
Rate limit headers:
X-RateLimit-Limit-Requests: 100
X-RateLimit-Remaining-Requests: 95
X-RateLimit-Reset-Requests: 2026-03-03T15:00:00Z
"This is a medical consultation discussing patient symptoms."
"Technical presentation about Kubernetes and Docker containers."
"Podcast interview with Dr. Jane Smith about climate science."
try {
const response = await fetch(url, { method: 'POST', headers, body: formData });
if (!response.ok) {
const error = await response.json();
if (error.error.code === 'model_not_allowed') {
console.error('API key lacks access to transcription');
} else if (error.error.code === 'rate_limit_exceeded') {
console.error('Rate limit hit, retry after:', error.error.resets_at);
} else {
console.error('Transcription failed:', error.error.message);
}
return;
}
const result = await response.json();
console.log('Transcription:', result.text);
} catch (err) {
console.error('Network error:', err);
}
/v1/audio/transcriptions format with these specifics:
Similarities:
file and model parametersprompt parametertext fieldgpt-4o-transcribe is supported (OpenAI supports whisper-1 and variants)/backend-api/transcribe (internal format, no model parameter required)/v1/chat/completions (text generation with chat format)/v1/responses (text generation with responses format)