> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refmatter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Transcripts

> Timed text from the source's captions, stored with the reference and kept after the media expires.

When a source publishes captions, Refmatter derives a transcript during acquisition and keeps it as a durable derivative next to the poster frame. Manual captions are preferred; automatic captions are used when they are all the source has.

## In the reference

```json theme={null}
"machineDerived": {
  "transcript": {
    "mediaId": "01a0a1c2-…",
    "language": "en",
    "source": "captions",
    "segmentCount": 214
  }
}
```

`source` is `captions` for a human-authored track or `automatic_captions` for the platform's speech recognition. `null` means the source had no usable track; the reference is still complete.

## Full text and timings

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.refmatter.com/v1/references/$REFERENCE_ID/transcript \
    -H "Authorization: Bearer $REFMATTER_API_KEY"
  ```

  ```ts TypeScript theme={null}
  const transcript = await refmatter.references.transcript(reference.id);
  for (const segment of transcript.segments) {
    console.log(segment.startMs, segment.endMs, segment.text);
  }
  ```
</CodeGroup>

```json theme={null}
{
  "referenceId": "01a0a1b1-…",
  "mediaId": "01a0a1c2-…",
  "language": "en",
  "source": "captions",
  "segments": [
    {
      "startMs": 1200,
      "endMs": 3360,
      "text": "All right, so here we are, in front of the elephants"
    }
  ],
  "text": "All right, so here we are, in front of the elephants …"
}
```

The transcript object can also be downloaded as JSON through `GET /v1/media/{mediaId}/download-url` with the `mediaId` from the summary.

## Language choice

English is preferred when several tracks exist; otherwise the first manual track wins, then automatic captions. Per-request language selection is planned.

## Retention

Transcripts are Tier A: they stay as long as the reference exists, including after the media bytes expire. A source with no captions gets no transcript; speech recognition on the acquired audio is planned as a fallback.
