# Download balenaOS

## Download private or ESR balenaOS images

> \## Download balenaOS Resource Fields\
> \
> \| Field |\
> \| :--- |\
> \
> \
> \---\
> \
> \`GET /download\`\
> \
> In order to download an ESR or private balenaOS image, you need to provide your bearer token. The \`deviceType\` and \`version\` parameters are required. Add an \`--output\` flag to provide a path for the image to be downloaded.\
> \
> \
> \### Usage Variations\
> \
> \--- \
> \#### Download public balenaOS images\
> \`GET /download?deviceType=\<DEVICE NAME>\&version=\<BALENAOS VERSION>\&fileType=.gz'\`\
> \
> Same as above but the auth header is optional to use. The \`deviceType\` and \`version\` parameters are required. These releases also available for download on balena.io/os and the dashboard.

```json
{"openapi":"3.0.0","info":{"title":"Balena API Spec","version":"7.0.0"},"servers":[{"url":"https://api.balena-cloud.com"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/download":{"get":{"tags":["Download balenaOS"],"summary":"Download private or ESR balenaOS images","description":"## Download balenaOS Resource Fields\n\n| Field |\n| :--- |\n\n\n---\n\n`GET /download`\n\nIn order to download an ESR or private balenaOS image, you need to provide your bearer token. The `deviceType` and `version` parameters are required. Add an `--output` flag to provide a path for the image to be downloaded.\n\n\n### Usage Variations\n\n--- \n#### Download public balenaOS images\n`GET /download?deviceType=<DEVICE NAME>&version=<BALENAOS VERSION>&fileType=.gz'`\n\nSame as above but the auth header is optional to use. The `deviceType` and `version` parameters are required. These releases also available for download on balena.io/os and the dashboard."}}}}
```
