Skip to content

Transcribe media

POSThttps://api.vidmoat.com/v1/ai/transcriptions
Bearer tokenScope ai.transcribe5 credits per 5 minutes of mediaTry it in the playground

Word-level timings for captions. Feed words[] straight into an addCaptions command.

Body#

  • srcstring
    A public http(s) URL, or one of your upload URLs or filenames. Required unless you send script.
  • languagestring
    Language code, for example en, zh (Mandarin) or yue (Cantonese). A Chinese locale such as zh-TW or zh-CN also picks the script.
  • chineseScriptstring
    zh-Hans (Simplified) or zh-Hant (Traditional): Chinese speech is written in this script. Default: what language implies, else the script most of the transcript is in, else Simplified (Traditional for Cantonese). Word timings are unchanged.
  • scriptstring
    Free mode: text to spread evenly over duration. No provider is called.
  • durationnumber
    Free mode: seconds to spread script over. Must be a JSON number; a string such as "12" does not switch to free mode.
  • startnumberdefault 0
    Free mode: offset of the first word.

Response#

Returns 200.

Response fields#

  • wordsarray
    { text, start, end } per word, in seconds.
  • providerstring
    Which engine answered (script in free mode).
  • mediaSecondsnumber
    The measured length that was billed. Not present in free mode.
  • creditsobject
    { charged, remaining, basis }: remaining is the balance after the charge. Free mode returns { charged: 0, remaining } without basis.

Errors#

Besides the errors any request can get (authentication, rate limits):

StatusCodeWhen
400invalid_requestNeither src nor script + duration; a YouTube link (we never download YouTube); a refused URL; unreadable media; or media longer than 3 hours (mediaSeconds, maxSeconds).
402insufficient_creditsThe balance cannot cover the call. Nothing ran. remaining is the balance.
501not_configuredNo speech-to-text provider is available. Nothing is charged.
502provider_errorThe generation provider failed. The charge is refunded.