API Reference

Complete reference for the Doslarb Cloud REST API.

Authentication

Include your API key in the Authorization header as a Bearer token. All requests must use HTTPS.

Authorization: Bearer YOUR_API_KEY
POST/api/v1/transcribe
Transcribe Audio

Upload an audio file and receive Khmer and English transcripts.

Parameters

NameTypeRequiredDescription
filebinaryYesAudio file in MP3, WAV, M4A, OGG, FLAC, or OPUS format
modelstringNoModel identifier. Default: tmrone-speech-v1

Response

json
{
  "text": "transcribed text here",
  "confidence": 0.95,
  "duration_seconds": 14.2,
  "model": "tmrone-speech-v1"
}

Examples

bash
curl -X POST https://tmrone.cloud/api/v1/transcribe \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @audio.mp3
POST/api/v1/tts
Text to Speech
Coming Soon

The Text-to-Speech endpoint is under development. This section will be updated when it becomes available.

Parameters

NameTypeRequiredDescription
textstringYesThe text to convert to speech
languagestringNoLanguage code: "km" (Khmer) or "en" (English). Default: "km"

Examples

bash
curl -X POST https://tmrone.cloud/api/v1/tts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello world", "language": "en"}' \
  --output speech.mp3

Error Codes

Status CodeError TypeDescription
400invalid_requestMalformed request body or missing required fields
401unauthorizedMissing or invalid API key
413file_too_largeAudio file exceeds maximum size limit
415unsupported_media_typeAudio format not supported
429monthly_limit_exceededMonthly plan limit reached. Upgrade to continue.
503service_unavailableSTT engine temporarily unavailable. Retry after delay.