Show examples in:
Automatically generate a subtitles track

Body Parameters

language_code  Required  string  Example: "it-IT"

A valid BCP 47 specification compliant language code

name  Optional  string  Example: "Italiano"

The human-readable name of the track

Returns

Returns a upload_track resource object.

Examples

Example Basic example
import { buildClient } from '@datocms/cma-client-node';
async function run() {
const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
const uploadId = 'xBe7u01029ipxBLQhYzZCJ1cke01zCkuUsgnYtH0017nNzbpv2YcsoMDmw';
const uploadTrack = await client.uploadTracks.generateSubtitles(uploadId, {
language_code: 'it-IT'
});
console.log(uploadTrack);
}
run();