# Download the MP4 of a storyboard preview

`GET https://api.cream-ai.de/api/v1/films/{id}/storyboard-preview/file`

Downloads the MP4 of a storyboard preview (without `preview_id` the newest one). The preview is not approved and carries a watermark. The response is `video/mp4` with a strong `ETag` (the SHA-256 of the file in quotes, the same as `sha256` of the preview). Resume an interrupted download with `Range: bytes=<from>-` and `If-Range: <ETag>`. A single range is supported; several or invalid ranges return the whole file; a range behind the end returns `416 range_not_satisfiable`. With `If-None-Match: <ETag>` the response is `304` without a body. `HEAD` returns the headers only. `409 preview_not_ready`: the preview is not ready yet. `410 preview_expired`: the preview has expired; request a new one. `409 file_unavailable`: the file is currently not available; retry later. Downloads are free of credits.

Scopes: `films:read`, `previews:read`

## Parameters

- `id` (path, required): Id of the film (id from POST /films or GET /films).
- `preview_id` (query): Id of the preview. Default: the newest preview of the film.
- `Range` (header): One byte range, e.g. bytes=1048576-.
- `If-Range` (header): The ETag of the first response; the range only applies if it still matches.
- `If-None-Match` (header): The ETag you already have; 304 if unchanged.

## Returns

- 200: The whole file.
- 206: The requested part of the file.
- 304: Unchanged (the ETag from If-None-Match still matches).

## Errors

- 400: Invalid request (invalid_request, invalid_json, invalid_cursor, idempotency_key_required, invalid_idempotency_key, parent_not_found, max_depth_exceeded, narration_too_long, user_not_in_company, template_not_found, category_not_found, feedback_kind_unsupported, upload_not_found).
- 401: Missing, malformed, revoked or expired API key (unauthorized).
- 403: Not allowed (forbidden_scope, ip_not_allowed, company_inactive, api_not_enabled).
- 404: The film or the preview was not found, or the film has no preview yet (not_found).
- 409: The preview is not ready yet (preview_not_ready) or its file is currently not available (file_unavailable).
- 410: The preview has expired (preview_expired). Request a new one.
- 416: The range is behind the end of the file (range_not_satisfiable).
- 429: Too many requests (rate_limited).
- 500: Internal error (internal). Quote the request id when you contact support.
- 503: Temporarily unavailable (service_unavailable). Retry later (after Retry-After seconds, if sent).

## Example request

```sh
curl "https://api.cream-ai.de/api/v1/films/k7m2xq9v4t8n1b5r3c6d0wza/storyboard-preview/file" \
  -H "Authorization: Bearer $MINT_API_KEY" \
  -o preview.mp4
```

## Example response (200)

```http
HTTP/1.1 200 OK
Content-Type: video/mp4
X-Request-Id: req_5b2e8f1a4c7d0e3b6a9f2c5d8e1b4a7c
ETag: "3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b"
Accept-Ranges: bytes
Content-Length: 18342210
Content-Disposition: attachment; filename="storyboard-v1.mp4"
Cache-Control: no-store, no-transform

<binary MP4 data>
```
