---
name: "generate-captions"
description: "Use this skill when the task matches: Generate subtitle files from transcript segments for selected Opal Sparks."
---
# Generate Captions

## Purpose

Generate subtitle files from transcript segments for selected Sparks.

## Install from SKLx

This skill is published on SKLx and can be installed locally or on an Opal server:

```bash
skl add "generate captions" --registry https://sklx.one
```

## Current API

Caption/subtitle generation happens during render.

```txt
POST /api/jobs/:jobId/render
GET  /api/jobs/:jobId
```

## Inputs

```json
{
  "jobId": "string",
  "clips": [],
  "transcript": {
    "segments": []
  }
}
```

## Outputs

Subtitle files are written beside rendered clip outputs.

```json
{
  "jobId": "string",
  "status": "rendering_cuts"
}
```

## Steps

1. Use transcript segments inside each Spark time range.
2. Generate ASS subtitle files.
3. Keep captions readable on vertical video.
4. Render subtitles into MP4 cuts with FFmpeg.

## Rules

Do not invent words.
Use transcript text for subtitles.
Keep captions readable on mobile.
Do not alter spoken content.
