Overview
The Speech-to-Text API transcribes an audio file to text in a single synchronous request. Upload audio, get back the transcript in the same response.
POST /api/stt/transcribe/Billed per second of audio. Pairs with the Text to Speech endpoint.
Authentication
Send your key in the x-api-key header (browser sessions may use a JWT
Authorization: Bearer <token> instead). See API Keys
to create one.
x-api-key: sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxTranscribe audio
POST /api/stt/transcribe/Send the audio as multipart/form-data.
curl -X POST https://api.oshara.ai/api/stt/transcribe/ \
-H "x-api-key: $OSHARA_KEY" \
-F "file=@recording.wav" \
-F "model=whisper" \
-F "language=en"Request fields
| Field | Type | Required | Description |
|---|---|---|---|
file | file | ✓ | The audio file to transcribe. Max 50 MB. |
model | string | whisper (default) or omnilingual. Any other value falls back to whisper. | |
language | string | en (default) or ne (Nepali). |
Models
| Model | Best for |
|---|---|
whisper | General transcription; strong Nepali support (default). |
omnilingual | Broad multilingual coverage (alias: sherpa). |
Response
Returns JSON with the transcript:
{
"success": true,
"message": "Request successful",
"data": {
"transcript": "…transcribed text…",
"model": "whisper",
"language": "en"
}
}Billing
Charged per second of audio (rounded up, with a minimum). Duration is measured from the uploaded file.
Errors
| Status | Meaning |
|---|---|
400 | No file provided, or the file exceeds the 50 MB limit. |
401 | Missing or invalid x-api-key. |
502 | Transcription failed upstream. |
{ "success": false, "message": "An error occurred",
"errors": { "error": "..." } }Last updated on