---
operationId: getClipEpisodeMedia
title: Get the URLs to watch and download a clip
url: "https://mediaseer.ai/docs/api/operations/getclipepisodemedia/"
---

# Get the URLs to watch and download a clip

`GET /clip-jobs/{id}/episodes/{episode}/media`

URL: `api.mediaseer.ai/api/v1/clip-jobs/{id}/episodes/{episode}/media`

Only available once the job is `READY`. Returns short-lived signed URLs for the clip, its poster and its download as JSON, not as a redirect: a `<video>` element and a download link send no `Authorization` header, so they use these URLs as they are. Every call returns fresh URLs. Call it before playing, and again once they expire (`expiresAt`), for example when a seek fails.

## Authorizations

- **[apiKeyAuth](https://mediaseer.ai/docs/api/#apikeyauth)**

## Parameters

### Path Parameters

- `id` string, required: The clip job’s `id`.

- `episode` integer, required: The clip’s `number` within the job, from 1.

  `>= 1`

### Query Parameters

- `version` string

  - `ORIGINAL`: the clip as the clip service made it
  - `EDITED`: the newest finished edit of the clip

  Allowed values: `ORIGINAL`, `EDITED`

  Which version of the clip. Leaving it out means `ORIGINAL`. With `EDITED`, the URLs are those of the newest finished edit of the clip in the web app’s editor, and the clip’s `editedAt` is brought up to date; a clip without a finished edit is a `404` (`NOT_FOUND`).

## Responses

### 200

OK

Media type: application/json

Signed URLs for one clip. They need no credentials: the URL is the credential, so don’t log or share it.

object

- `episodeUrl` string, format: uri, required: The clip as MP4, for the `src` of a `<video>` element. It supports range requests, so the video can seek.
- `posterUrl` string, format: uri: A still of the clip, for the video’s `poster`. Absent when the clip has none. Posters are made on a best-effort basis, so even a given one can fail to load; show the video without it then.
- `downloadUrl` string, format: uri, required: The same clip served as a file download (`Content-Disposition: attachment`), for a download link.
- `expiresAt` string, format: date-time, required: When the URLs stop working. Each request is checked, so a playback that started earlier can fail after this, at its next seek: get new URLs and continue from the same position.

#### Example

```json
{
  "episodeUrl": "https://storage.googleapis.com/clips/0b9e4d2c/episode_001.mp4?X-Goog-Signature=3f9a",
  "posterUrl": "https://storage.googleapis.com/clips/0b9e4d2c/episode_001.webp?X-Goog-Signature=7c2e",
  "downloadUrl": "https://storage.googleapis.com/clips/0b9e4d2c/episode_001.mp4?response-content-disposition=attachment&X-Goog-Signature=9d41"
}
```

### 400

The request is malformed or fails validation (`VALIDATION`).

Media type: application/json

object

- `code` string, required: Stable machine-readable code. Clients branch on this, never on `message`.

  Allowed values: `VALIDATION`, `UNAUTHENTICATED`, `INVALID_TOKEN`, `FORBIDDEN`, `EMAIL_NOT_VERIFIED`, `NOT_FOUND`, `INVALID_STATE`, `UPLOAD_INCOMPLETE`, `QUOTA_EXCEEDED`, `RATE_LIMITED`, `UPSTREAM_ERROR`, `CLIPS_NOT_CONFIGURED`, `CLIPS_UNAVAILABLE`, `INTERNAL`

- `message` string, required: Human-readable, safe to show to the user. For `VALIDATION` with a single detail, it states that detail’s reason, naming the field where the reason needs it; with several, it is generic and `details` lists them.

- `details` Array\<object>: Optional field-level or limit-level detail.

  object

  - `field` string: The request field the detail refers to, if any; for `QUOTA_EXCEEDED`, the limit that was hit.
  - `message` string, required

#### Example

```json
{
  "code": "VALIDATION",
  "message": "The file is larger than the limit of 2147483648 bytes.",
  "details": [
    {
      "field": "sizeBytes",
      "message": "must be at most 2147483648"
    }
  ]
}
```

### 401

Missing, invalid or expired credentials (`UNAUTHENTICATED`).

Media type: application/json

object

- `code` string, required: Stable machine-readable code. Clients branch on this, never on `message`.

  Allowed values: `VALIDATION`, `UNAUTHENTICATED`, `INVALID_TOKEN`, `FORBIDDEN`, `EMAIL_NOT_VERIFIED`, `NOT_FOUND`, `INVALID_STATE`, `UPLOAD_INCOMPLETE`, `QUOTA_EXCEEDED`, `RATE_LIMITED`, `UPSTREAM_ERROR`, `CLIPS_NOT_CONFIGURED`, `CLIPS_UNAVAILABLE`, `INTERNAL`

- `message` string, required: Human-readable, safe to show to the user. For `VALIDATION` with a single detail, it states that detail’s reason, naming the field where the reason needs it; with several, it is generic and `details` lists them.

- `details` Array\<object>: Optional field-level or limit-level detail.

  object

  - `field` string: The request field the detail refers to, if any; for `QUOTA_EXCEEDED`, the limit that was hit.
  - `message` string, required

#### Example

```json
{
  "code": "VALIDATION",
  "message": "The file is larger than the limit of 2147483648 bytes.",
  "details": [
    {
      "field": "sizeBytes",
      "message": "must be at most 2147483648"
    }
  ]
}
```

### 404

No such clip job, or the job has no clip with this number (`NOT_FOUND`).

Media type: application/json

object

- `code` string, required: Stable machine-readable code. Clients branch on this, never on `message`.

  Allowed values: `VALIDATION`, `UNAUTHENTICATED`, `INVALID_TOKEN`, `FORBIDDEN`, `EMAIL_NOT_VERIFIED`, `NOT_FOUND`, `INVALID_STATE`, `UPLOAD_INCOMPLETE`, `QUOTA_EXCEEDED`, `RATE_LIMITED`, `UPSTREAM_ERROR`, `CLIPS_NOT_CONFIGURED`, `CLIPS_UNAVAILABLE`, `INTERNAL`

- `message` string, required: Human-readable, safe to show to the user. For `VALIDATION` with a single detail, it states that detail’s reason, naming the field where the reason needs it; with several, it is generic and `details` lists them.

- `details` Array\<object>: Optional field-level or limit-level detail.

  object

  - `field` string: The request field the detail refers to, if any; for `QUOTA_EXCEEDED`, the limit that was hit.
  - `message` string, required

#### Example

```json
{
  "code": "VALIDATION",
  "message": "The file is larger than the limit of 2147483648 bytes.",
  "details": [
    {
      "field": "sizeBytes",
      "message": "must be at most 2147483648"
    }
  ]
}
```

### 409

The resource is in a state that does not allow this operation (`INVALID_STATE`).

Media type: application/json

object

- `code` string, required: Stable machine-readable code. Clients branch on this, never on `message`.

  Allowed values: `VALIDATION`, `UNAUTHENTICATED`, `INVALID_TOKEN`, `FORBIDDEN`, `EMAIL_NOT_VERIFIED`, `NOT_FOUND`, `INVALID_STATE`, `UPLOAD_INCOMPLETE`, `QUOTA_EXCEEDED`, `RATE_LIMITED`, `UPSTREAM_ERROR`, `CLIPS_NOT_CONFIGURED`, `CLIPS_UNAVAILABLE`, `INTERNAL`

- `message` string, required: Human-readable, safe to show to the user. For `VALIDATION` with a single detail, it states that detail’s reason, naming the field where the reason needs it; with several, it is generic and `details` lists them.

- `details` Array\<object>: Optional field-level or limit-level detail.

  object

  - `field` string: The request field the detail refers to, if any; for `QUOTA_EXCEEDED`, the limit that was hit.
  - `message` string, required

#### Example

```json
{
  "code": "VALIDATION",
  "message": "The file is larger than the limit of 2147483648 bytes.",
  "details": [
    {
      "field": "sizeBytes",
      "message": "must be at most 2147483648"
    }
  ]
}
```

### 501

This environment offers no clips (`CLIPS_NOT_CONFIGURED`): its backend has no access to the clip service. Trying again does not help.

Media type: application/json

object

- `code` string, required: Stable machine-readable code. Clients branch on this, never on `message`.

  Allowed values: `VALIDATION`, `UNAUTHENTICATED`, `INVALID_TOKEN`, `FORBIDDEN`, `EMAIL_NOT_VERIFIED`, `NOT_FOUND`, `INVALID_STATE`, `UPLOAD_INCOMPLETE`, `QUOTA_EXCEEDED`, `RATE_LIMITED`, `UPSTREAM_ERROR`, `CLIPS_NOT_CONFIGURED`, `CLIPS_UNAVAILABLE`, `INTERNAL`

- `message` string, required: Human-readable, safe to show to the user. For `VALIDATION` with a single detail, it states that detail’s reason, naming the field where the reason needs it; with several, it is generic and `details` lists them.

- `details` Array\<object>: Optional field-level or limit-level detail.

  object

  - `field` string: The request field the detail refers to, if any; for `QUOTA_EXCEEDED`, the limit that was hit.
  - `message` string, required

#### Example

```json
{
  "code": "VALIDATION",
  "message": "The file is larger than the limit of 2147483648 bytes.",
  "details": [
    {
      "field": "sizeBytes",
      "message": "must be at most 2147483648"
    }
  ]
}
```

### default

Unexpected error

Media type: application/json

object

- `code` string, required: Stable machine-readable code. Clients branch on this, never on `message`.

  Allowed values: `VALIDATION`, `UNAUTHENTICATED`, `INVALID_TOKEN`, `FORBIDDEN`, `EMAIL_NOT_VERIFIED`, `NOT_FOUND`, `INVALID_STATE`, `UPLOAD_INCOMPLETE`, `QUOTA_EXCEEDED`, `RATE_LIMITED`, `UPSTREAM_ERROR`, `CLIPS_NOT_CONFIGURED`, `CLIPS_UNAVAILABLE`, `INTERNAL`

- `message` string, required: Human-readable, safe to show to the user. For `VALIDATION` with a single detail, it states that detail’s reason, naming the field where the reason needs it; with several, it is generic and `details` lists them.

- `details` Array\<object>: Optional field-level or limit-level detail.

  object

  - `field` string: The request field the detail refers to, if any; for `QUOTA_EXCEEDED`, the limit that was hit.
  - `message` string, required

#### Example

```json
{
  "code": "VALIDATION",
  "message": "The file is larger than the limit of 2147483648 bytes.",
  "details": [
    {
      "field": "sizeBytes",
      "message": "must be at most 2147483648"
    }
  ]
}
```
