Docs

Asset outputs

Find transcripts, captions, static renditions, and additional thumbnails produced for a video asset.

A video asset exposes its main playback URLs, poster, and default timeline previews. Additional outputs have their own resources and processing states. Use List Asset outputs to find them, and Get an Asset output to read one.

Outputs requested directly and outputs created by a Workflow appear in the same collection. Every output uses an aop_ ID. Read its type to identify the output kind.

Output type Details
transcript Original-language text, timed segments, and detected language.
caption Language, transcript or translation source, and subtitle paths.
static_rendition Resolution, media properties, preparation progress, and download URLs.
thumbnail Sampling settings, images or sprite sheets, and the WebVTT index.

Find outputs

Filter by type to read one kind of output. You can also filter by status. The default page contains up to 100 results; use limit and offset to request subsequent pages. total counts all outputs matching the filters.

import Chunkify from '@chunkify/chunkify';

const client = new Chunkify({
  projectAccessToken: process.env.CHUNKIFY_PROJECT_TOKEN,
});

const outputs = await client.assets.outputs.list('ast_example', {
  type: 'caption',
  limit: 100,
  offset: 0,
});

console.log(outputs);

The list response contains an envelope for each output. Its type selects the schema of details, which contains the canonical transcript, caption, static rendition, or thumbnail resource.

{
  "status": "success",
  "data": [
    {
      "id": "aop_example",
      "asset_id": "ast_example",
      "type": "caption",
      "status": "ready",
      "details": {
        "id": "aop_example",
        "status": "ready",
        "language_code": "fr",
        "vtt_path": "videos/ast_example/captions/fr/subtitles.vtt"
      }
    }
  ],
  "total": 1,
  "limit": 100,
  "offset": 0
}

Results are ordered by creation date, newest first, with descending output ID as a tie-breaker. List and get return the same output schema. Clients should ignore output types they do not use.

Read one output

Use the output's existing ID together with its owning Asset ID:

const output = await client.assets.outputs.retrieve(
  'aop_example',
  {
    asset_id: 'ast_example',
  },
);

console.log(output);

A Workflow action's result.output_id and result.output_type identify the same resource. Workflow action history describes execution; the output endpoints return the resource's current state. Output reads remain available after retained action history is cleaned up, until the output itself is deleted or its owning Asset is removed.

Processing and expiry

Output statuses are preparing, ready, failed, and expired. Each output completes independently. A video asset can be ready for playback while a caption or static rendition is preparing or has failed. See details.error for a processing failure.

Transcripts, captions and static renditions inherit their Asset's temporary-output expiry. Additional thumbnails use the expiry recorded on their thumbnail resource. Reading an output does not extend its retention. Expired transcripts omit content. Expired media has no delivery URLs, while its retained resource metadata remains readable.

Static rendition details expose a stable cdn_url when the selected Storage has CDN delivery, and a temporary signed url for downloads. Refresh signed URLs by reading the output again. Use the Asset's main playback URLs, poster, and timeline_previews for normal player integration.

Create outputs

Use Create an Asset output. Each request creates or reuses an output resource. Original caption requests also create or reuse a transcript output. Its type selects the settings under params. Creation returns 202 Accepted with the same output envelope as list and get, including its current status. Poll the output or listen for its lifecycle event to know when it is ready.

Create a static MP4 rendition:

const rendition = await client.assets.outputs.create(
  'ast_example',
  {
    type: 'static_rendition',
    params: {
      resolution: '1080p',
    },
  },
);

Generate an original-language transcript:

const transcript = await client.assets.outputs.create(
  'ast_example',
  {
    type: 'transcript',
    params: {},
  },
);

Once ready, a transcript's details.content contains full text and segments, each with start, end, and text. Times are seconds relative to the Asset's selected content. No file URL is needed. The same content is included in its asset.output.ready event and webhook snapshot. Silence produces empty text and segments.

Caption and transcript requests share one transcription. You can request both together, or add either later, without repeating speech recognition or its charge. Transcript-only requests save the original subtitle copy privately so captions can be published later even when the original input is unavailable. Transcripts currently cover the original language only.

Generate original captions with automatic language detection:

const captions = await client.assets.outputs.create(
  'ast_example',
  {
    type: 'caption',
    params: {},
  },
);

Once the original caption is ready, translate it by supplying both source_caption_id and language_code. The source caption must belong to this Asset. Each translation is another caption output with its own ID and status.

const translation = await client.assets.outputs.create(
  'ast_example',
  {
    type: 'caption',
    params: {
      source_caption_id: 'aop_example',
      language_code: 'fr',
    },
  },
);

Generate additional sprite thumbnails. This creates one thumbnail resource containing the requested samples:

const thumbnails = await client.assets.outputs.create(
  'ast_example',
  {
    type: 'thumbnail',
    params: {
      count: 10,
      output: 'sprites',
    },
  },
);

The Thumbnails guides explain sampling, layouts, and file delivery.

Output settings are validated for their selected type. The Asset supplies its configured Storage and output folder for media outputs. Transcript text and the saved original subtitle copy remain in private Chunkify storage for the lifetime of the transcript and its Asset. A Workflow can request these outputs automatically.

Remove an output

Use Delete an Asset output with its existing ID. The server resolves its type. Successful deletion returns 204 No Content.

await client.assets.outputs.delete(
  'aop_example',
  {
    asset_id: 'ast_example',
    delete_files: true,
  },
);

For transcripts, deletion always schedules removal of the private text and saved subtitle copy; delete_files does not change that behavior. Published captions remain available. For media outputs, omit delete_files or set it to false to preserve the generated files. Existing expiry rules still apply. Set it to true to remove this output's files from Storage too. The Asset, Source, and other outputs are preserved. Removing a caption also removes its subtitle track from the Asset's HLS master playlist.

Processing and dependency rules apply per type. Transcripts, captions and static renditions must finish processing before deletion. A transcript needed by a preparing caption cannot be deleted. Removing captions preserves their transcript for reuse. A caption being used by an active translation cannot be deleted. Thumbnail deletion requires its processing and workers to finish. Thumbnail cleanup remains available to inactive teams; other output operations require an active subscription.

If file cleanup fails, the output record is retained so you can retry. Files already removed cannot be restored by that retry. No deletion refunds completed processing charges.

The video asset's Outputs section shows transcripts, static renditions, captions, and additional thumbnails. The Manage outputs dialog creates or removes that kind of output.