# Download a job file

> Download a file a job produced, such as the generated MP4.

`GET https://api.openrobotics.dev/v1/jobs/{id}/files/{name}`

Use the `result.video.url` from [Get a job](https://www.openrobotics.dev/docs/api/get-job) with the same key. Files are kept for 7 days after the job finishes.

## Authorization

`Authorization: Bearer sk-orb-v1-…`, your [API key](https://www.openrobotics.dev/docs/authentication), or a free [test key](https://www.openrobotics.dev/docs/authentication#test-keys) (`sk-orb-test-…`; no account? get one with [`POST /sandbox/keys`](https://www.openrobotics.dev/docs/api/create-sandbox-key)).

## Path parameters

- `id` (string, required): The job id.
- `name` (string, required): The file name, e.g. `video.mp4`.

## Response

- `body` (binary): The file itself, with its `Content-Type` (e.g. `video/mp4`).

## Errors

- `404`: No such job or file for this key, or the file is older than 7 days

Plus the errors every endpoint shares: see [Errors](https://www.openrobotics.dev/docs/errors).

## Example request

cURL:

```bash
curl -o rollout.mp4 https://api.openrobotics.dev/v1/jobs/job_9f2c41d07a5e8b3c6d1e2f40/files/video.mp4 \
  -H "Authorization: Bearer $OPENROBOTICS_API_KEY"
```

Python:

```python
import os, requests

headers = {"Authorization": f"Bearer {os.environ['OPENROBOTICS_API_KEY']}"}
job = requests.get("https://api.openrobotics.dev/v1/jobs/job_9f2c41d07a5e8b3c6d1e2f40", headers=headers).json()
video = requests.get(job["result"]["video"]["url"], headers=headers)
open("rollout.mp4", "wb").write(video.content)
```

## Example response

```
HTTP/1.1 200 OK
Content-Type: video/mp4
Content-Length: 2483021

<MP4 bytes>
```
