# Get the subtitles of a dub

- **Method:** `GET`
- **Path:** `/v1/dubs/{id}/subtitles`
- **Operation ID:** `getDubSubtitles`
- **Tags:** Dubs

Returns the lines of a dub job as SRT, VTT or JSON.

## Effective servers

- `https://api.vcp.name`

## Authentication

- **bearer**: HTTP bearer (`API key`)

  An API key from Settings, starting vcp\_live\_.

## Path parameters

- **`id` (required)**: `string`

## Query parameters

- **`format`**: `string`, possible values: `"srt", "vtt", "json"`, default: `"srt"`

  srt for SubRip, vtt for WebVTT, or json for each line with its speaker and the original text.

## Responses

### 200 OK.

**Content type:** `application/x-subrip`

`string`

SubRip subtitles.

**Example:**

```json
""
```

**Content type:** `text/vtt`

`string`

WebVTT subtitles.

**Example:**

```json
""
```

**Content type:** `application/json`

schema: `SubtitleList`

Each subtitle line in order.

**Array of:**

schema: `SubtitleLine`, no additional properties

- **`end` (required)**: `number`, minimum: `0`

  Seconds from the start of the video.
- **`source_text` (required)**: `string`

  What was said in the original video.
- **`speaker` (required)**: `string | null`

  Who says the line, or null if unknown.
- **`start` (required)**: `number`, minimum: `0`

  Seconds from the start of the video.
- **`text` (required)**: `string`

  The dubbed line.

**Example:**

```json
[
  {
    "start": 0.4,
    "end": 2.6,
    "text": "Bienvenidos de nuevo.",
    "speaker": "SPEAKER_00",
    "source_text": "Welcome back."
  }
]
```

### 400, 401, 403, 404, 429, 500, 503

- `400` The request is invalid. The message names the field.
- `401` The API key is missing, invalid or revoked.
- `403` The account needs a paid plan, or the action is not allowed.
- `404` Not found.
- `429` Too many requests. Retry after the Retry-After header.
- `500` Something went wrong on our side.
- `503` Temporarily unavailable. Retry after the Retry-After header.

**Content type:** `application/json`

schema: `ErrorBody`, no additional properties

- **`error` (required)**: `object`, schema: `ErrorDetail`, no additional properties
  - **`code` (required)**: `string`

    A code from the error tables.
  - **`message` (required)**: `string`

    What went wrong.
  - **`param`**: `string`

    The request field at fault, when there is one.

**Example:**

```json
{
  "error": {
    "code": "invalid_request",
    "message": "text is required.",
    "param": "text"
  }
}
```

## Schemas

### ErrorBody

**Type:** `object`, no additional properties

*Schema `ErrorBody` is shown above.*

**Example:**

```json
{
  "error": {
    "code": "invalid_request",
    "message": "text is required.",
    "param": "text"
  }
}
```

- `ErrorDetail` — shown above.
- `SubtitleLine` — shown above.
- `SubtitleList` — shown above.
