Get video transcript
Fetch transcript for a single video. No API key required.
Path Parameters
id*string
Video ID or URL
Query Parameters
lang?string
BCP 47 language code (e.g. en, es, pt-BR)
Response Body
application/json
application/json
application/json
import { Router } from 'express'import { transcribeVideo } from 'lyra-sdk/transcript'const router = Router()router.get('/transcript/:id', async (req, res) => { const { id } = req.params const lang = req.query.lang as string | undefined const lines = await transcribeVideo(id, { lang }) res.json(lines)})export const routes = router[
{
"text": "string",
"duration": 0,
"offset": 0,
"lang": "string"
}
]{
"error": {
"code": 0,
"message": "string",
"details": [
"string"
]
}
}{
"error": {
"code": 0,
"message": "string",
"details": [
"string"
]
}
}