> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /api/models/{slug}/download — download an Aria model bundle

> Download a quantized Aria model bundle. Returns a 302 redirect to a short-lived S3 presigned URL, a ZIP stream, or a JSON payload on request.

Download an Aria model bundle. By default the server returns a `302` redirect to a short-lived S3 presigned URL. For directory-keyed bundles it streams a ZIP file. Request `Accept: application/json` or add `?format=json` to receive the URL as JSON instead.

**Method:** `GET` **Path:** `/api/models/{slug}/download` **Auth:** Session Bearer, `?token=` query JWT, or Bearer API key (`bfvk-...`)

## Path parameters

<ParamField path="slug" type="string" required>
  Model slug (for example `gemma-4-e2b-it`).
</ParamField>

## Query parameters

<ParamField query="quant" type="string" required>
  Quantization: `int4`, `int8`, or `int326`.
</ParamField>

<ParamField query="sdk" type="string" required>
  SDK version (for example `v1.0`).
</ParamField>

<ParamField query="format" type="string">
  Set to `json` to receive a JSON envelope instead of a redirect or ZIP stream.
</ParamField>

<ParamField query="token" type="string">
  Session JWT for browser-initiated downloads. Equivalent to `Authorization: Bearer`.
</ParamField>

## Response

Default response is a `302 Found` redirect to a short-lived S3 presigned URL for a single file, or a `200 OK` ZIP stream for a directory-keyed bundle (with `Content-Disposition: attachment; filename=...`).

With `Accept: application/json` or `?format=json`:

<ResponseField name="mode" type="string">
  `redirect` (single file) or `zip` (directory).
</ResponseField>

<ResponseField name="url" type="string">
  Presigned URL or download URL.
</ResponseField>

<ResponseField name="filename" type="string">
  Suggested output filename.
</ResponseField>

## Example

<CodeGroup>
  ```bash Redirect follow theme={null}
  curl -L -H "Authorization: Bearer bfvk-XXXXXXXXXXXXXXXX" \
    "https://ariacompute.com/api/models/gemma-4-e2b-it/download?quant=int4&sdk=v1.0" \
    -o gemma-4-e2b-it_q4.zip
  ```

  ```bash JSON envelope theme={null}
  curl -H "Authorization: Bearer bfvk-XXXXXXXXXXXXXXXX" \
    -H "Accept: application/json" \
    "https://ariacompute.com/api/models/gemma-4-e2b-it/download?quant=int4&sdk=v1.0"
  ```

  ```json Response theme={null}
  {
    "mode": "redirect",
    "url": "https://s3.amazonaws.com/aria-bundles/...?X-Amz-Expires=300",
    "filename": "gemma-4-e2b-it_q4.zip"
  }
  ```
</CodeGroup>

<Warning>
  Presigned URLs expire quickly. Do not cache them: request a fresh one for each download.
</Warning>

## Errors

| Status | Meaning                                  |
| ------ | ---------------------------------------- |
| `401`  | Missing or invalid credential.           |
| `404`  | Unknown slug, quant, or SDK combination. |
| `429`  | Rate limit exceeded.                     |


## Related topics

- [GET /api/models — list available Aria model bundles](/api-reference/models/list.md)
- [Download Aria model bundles from the registry](/guides/download-models.md)
- [Use the Aria Compute API from cURL](/sdks/curl.md)
- [GET /api/download/engine-latest — latest aria-engine release](/api-reference/downloads/engine-latest.md)
- [GET /api/download/agent-latest — latest aria-agent release](/api-reference/downloads/agent-latest.md)
