# Download model

You can download the final checkpoint of a successfully completed fine-tuning job.&#x20;

{% hint style="info" %}
Replace `{{API_TOKEN}}` with your actual token.
{% endhint %}

## Step 1: List All Checkpoints

**Example Request:**

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location 'https://api.netmind.ai/v1/fine-tuning/job/{{JOB_ID}}/checkpoint' \
--header 'Authorization: Bearer {{API_TOKEN}}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.netmind.ai/v1/fine-tuning/job/{{JOB_ID}}/checkpoint"

payload = {}
headers = {
  'Authorization': 'Bearer {{API_TOKEN}}'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}
{% endtabs %}

**Example Response:**

```json
[
    {
        "id": "ftckpt-a91...",
        "checkpoint": "checkpoint-30",
        "step": 30,
        "metrics": {
            "loss": 0.0001
        },
        "created_at": 1730977618
    }
]
```

## Step 2: Get Download Url

**Example Request:**

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location 'https://api.netmind.ai/v1/fine-tuning/job/{{JOB_ID}}/checkpoint/{{CHECKPOINT_ID}}/download' \
--header 'Authorization: Bearer {{API_TOKEN}}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.netmind.ai/v1/fine-tuning/job/{{JOB_ID}}/checkpoint/{{CHECKPOINT_ID}}/download"

payload = {}
headers = {
  'Authorization': 'Bearer {{API_TOKEN}}'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}
{% endtabs %}

**Example Response:**

```json
{
    "presigned_url": "https://...."
}
```

The returned presigned download URL can be used to download the checkpoint. The presigned URL is valid for 2 hours. You can use command like "wget" to download the checkpoint file.

```bash
wget {{PRESIGNED_URL}} -O checkpoint.tar
```
