Audio transcriptions (STT)
Transcribe audio to text. OpenAI-compatible.
POST https://api.ecohash.com/v1/audio/transcriptions
Headers
| Header | Value |
|---|---|
Authorization | Bearer eco_YOUR_KEY |
Content-Type | multipart/form-data (set by your client, not by you) |
Request form fields
This endpoint takes multipart/form-data, not JSON.
| Field | Type | Required | Notes |
|---|---|---|---|
model | string | yes | STT model ID (e.g. large-v3) |
file | file | yes | Audio — mp3, wav, m4a, webm, ogg, flac |
language | string | no | ISO-639-1 code (en, es, zh, etc.). Leave blank to auto-detect |
prompt | string | no | Context hint to bias transcription (domain terms, names) |
response_format | string | no | "json" (default), "text", "srt", "vtt", "verbose_json" |
temperature | number | no | Sampling 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.