Audio Transcription
POST /v1/audio/transcriptions
Transcribe an audio file to text. Uses multipart/form-data.
Request
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
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | Audio file (multipart upload) |
language | string | No | Language hint |
response_format | string | No | json (default) or text |
conversation_id | string | No | Link 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
| Status | Error Type | Cause |
|---|---|---|
| 400 | audio_validation_failed | Invalid audio file |
| 404 | conversation_not_found | Invalid conversation_id |
| 429 | transcription_rate_limit | Rate limited |
| 503 | transcription_disabled | Transcription is disabled |
| 503 | transcription_provider_unavailable | No provider available |
| 504 | transcription_timeout | Transcription timed out |
Next Steps
- Transcription Guide — User guide
- Speech Generation — TTS API