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

# Download trained weights

> Generate a temporary URL for downloading a Fastino training artifact.

`GET /v1/training-jobs/{job_id}/download`

Returns a presigned URL for the trained artifact. Fetch the returned URL separately to download the file.

## Request

<ParamField header="X-API-Key" type="string" required>
  Your Fastino API key.
</ParamField>

<ParamField path="job_id" type="string" required>
  Training-job UUID.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.fastino.ai/v1/training-jobs/YOUR_TRAINING_JOB_ID/download \
    -H "X-API-Key: $FASTINO_API_KEY"
  ```
</RequestExample>

## Response

<ResponseField name="success" type="boolean">
  Whether the URL was generated.
</ResponseField>

<ResponseField name="job_id" type="string">
  Training-job UUID.
</ResponseField>

<ResponseField name="download_url" type="string">
  Temporary presigned artifact URL.
</ResponseField>

<ResponseField name="expires_in_seconds" type="integer">
  URL lifetime. The default is 3600 seconds.
</ResponseField>

<ResponseField name="file_name" type="string">
  Suggested download file name.
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "job_id": "YOUR_TRAINING_JOB_ID",
    "download_url": "https://...",
    "expires_in_seconds": 3600,
    "file_name": "my-model-name-weights.zip",
    "message": "Download URL generated successfully"
  }
  ```
</ResponseExample>

<Warning>
  The presigned URL is a temporary bearer credential. Do not log, commit, persist, or share it. Download the artifact promptly and store it according to your data-handling policy.
</Warning>

To request the URL and download the artifact in one workflow:

```bash theme={null}
response=$(curl -fsS \
  https://api.fastino.ai/v1/training-jobs/YOUR_TRAINING_JOB_ID/download \
  -H "X-API-Key: $FASTINO_API_KEY")

curl -fL \
  -o "$(jq -r '.file_name' <<<"$response")" \
  "$(jq -r '.download_url' <<<"$response")"
```

This example requires `jq`.

An unknown job or a job without a downloadable artifact returns a request-specific `4xx` error.
