Skip to content

Audio Transcription

POST /v1/audio/transcriptions

Transcribe an audio file to text. Uses multipart/form-data.

Request

Terminal window
curl https://ghostmind.optdmsa.com/v1/audio/transcriptions \
-H "Authorization: Bearer sk-gm-..." \
-F "file=@audio.mp3" \
-F "language=en" \
-F "response_format=json"

Parameters

FieldTypeRequiredDescription
filefileYesAudio file (multipart upload)
languagestringNoLanguage hint
response_formatstringNojson (default) or text
conversation_idstringNoLink to an existing conversation

Response (JSON)

{
"text": "Hello, this is a transcription of the audio file.",
"language": "en",
"duration": 5.2,
"model": "whisper-1",
"job_id": "transcription-job-uuid"
}

Response (Text)

When response_format=text, returns plain text:

Hello, this is a transcription of the audio file.

Privacy

  • Transcript text is not stored in the database
  • Audio files are deleted immediately after transcription
  • Only metrics are recorded (mime type, size, language, duration, status)

Errors

StatusError TypeCause
400audio_validation_failedInvalid audio file
404conversation_not_foundInvalid conversation_id
429transcription_rate_limitRate limited
503transcription_disabledTranscription is disabled
503transcription_provider_unavailableNo provider available
504transcription_timeoutTranscription timed out

Next Steps