Skip to main content

Audio transcriptions (STT)

Transcribe audio to text. OpenAI-compatible.

POST https://api.ecohash.com/v1/audio/transcriptions

Headers

HeaderValue
AuthorizationBearer eco_YOUR_KEY
Content-Typemultipart/form-data (set by your client, not by you)

Request form fields

This endpoint takes multipart/form-data, not JSON.

FieldTypeRequiredNotes
modelstringyesSTT model ID (e.g. large-v3)
filefileyesAudio — mp3, wav, m4a, webm, ogg, flac
languagestringnoISO-639-1 code (en, es, zh, etc.). Leave blank to auto-detect
promptstringnoContext hint to bias transcription (domain terms, names)
response_formatstringno"json" (default), "text", "srt", "vtt", "verbose_json"
temperaturenumbernoSampling temperature, default 0

Example request

curl https://api.ecohash.com/v1/audio/transcriptions \
-H "Authorization: Bearer eco_YOUR_KEY" \
-F model=large-v3 \
-F file=@recording.mp3

Response (default: json)

{ "text": "Full transcript here." }

Response (verbose_json)

{
"task": "transcribe",
"language": "en",
"duration": 8.5,
"text": "Full transcript.",
"segments": [
{ "start": 0.0, "end": 4.0, "text": "First segment." },
{ "start": 4.0, "end": 8.5, "text": "Second segment." }
]
}

Limits

  • Max file size: 25 MB
  • Max duration: 30 minutes per request

For longer audio, split client-side into 5–10 minute chunks and concatenate results.

Errors

See Errors. Common: 400 (unsupported audio format), 401, 402, 404, 429.