Transcribe media
POST
https://api.vidmoat.com/v1/ai/transcriptionsWord-level timings for captions. Feed words[] straight into an addCaptions command.
Body#
srcstringA public http(s) URL, or one of your upload URLs or filenames. Required unless you sendscript.languagestringLanguage code, for exampleen.scriptstringFree mode: text to spread evenly overduration. No provider is called.durationnumberFree mode: seconds to spreadscriptover.startnumberdefault0Free mode: offset of the first word.
Response#
Returns 200.
Response fields#
wordsarray{ text, start, end }per word, in seconds.providerstringWhich engine answered (scriptin free mode).mediaSecondsnumberThe measured length that was billed.creditsobject{ charged, remaining, basis }.
Errors#
Besides the errors any request can get (authentication, rate limits):
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Neither src nor script + duration; a refused URL; unreadable media; or media longer than 30 minutes (mediaSeconds, maxSeconds). |
| 402 | insufficient_credits | The balance cannot cover the call. Nothing ran. remaining is the balance. |
| 501 | not_configured | No speech-to-text provider is available. Nothing is charged. |
| 502 | provider_error | The generation provider failed. The charge is refunded. |