> For the complete documentation index, see [llms.txt](https://developer.hyper3d.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.hyper3d.ai/api-specification/download-results_reset_v.md).

# Download Results

{% openapi src="/files/Loq5rJmt4RM9YPcKaDp9" path="/api/v2/download" method="post" %}
[public-api.json](https://3170127470-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fve7H9sNOF32Exg6OAhKo%2Fuploads%2Fgit-blob-8b3e8c417bade1e10d0190a05b80cfb0b4f9c3bb%2Fpublic-api.json?alt=media\&token=dadacf4c-0d41-4413-aeb2-aef74447d787)
{% endopenapi %}

Call this API endpoint to get the download URLs for your generation task following a `Done` status returned by the Check Status endpoint.

{% hint style="info" %}
Calling this API endpoint before the task is done may return unexpected results like imcomplete list of files. See [Check Status](/api-specification/check-status_reset_v.md) for how to see if a task has finished.
{% endhint %}

### Pricing

We do not charge any addtional credits for calling this API to download results of your task.

### Request

#### Authentication

This API uses bearer key for authentication. You need to include a valid token in the `Authorization` header for all requests.

```
Authorization: Bearer RODIN_API_KEY
```

#### Body

The API takes one parameter in the `POST` request body.

{% hint style="info" %}
Use the `uuid` field instead of `jobs.uuids` for `task_uuid` in the [response from the Generation API](/api-specification/rodin-generation_reset_v.md#response).
{% endhint %}

| Parameter      | Type       | Description                                                                                                                            |
| -------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **task\_uuid** | **string** | **Required.** The UUID of the task you want to query the status of. Typically you will get it in the response from the Generation API. |

### Response

The JSON response has the following fields. You can download preview\.webp in the list to preview the model.

| Property  | Type   | Description                                                       |
| --------- | ------ | ----------------------------------------------------------------- |
| error     | string | Optional. Error message, if any.                                  |
| list      | array  | The list of the model files available for download for this task. |
| list.url  | string | The URL to download the model files from.                         |
| list.name | string | A human-readable name for the model file.                         |

### Examples

{% tabs %}
{% tab title="Request with cURL" %}

```bash
export RODIN_API_KEY="your api key"
curl -X 'POST' \
  'https://api.hyper3d.com/api/v2/download' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d "{\"task_uuid\": \"your-task-uuid\"}"
unset RODIN_API_KEY
```

{% endtab %}

{% tab title="Request with Python3" %}

```python
import requests

# Constants
ENDPOINT = "https://api.hyper3d.com/api/v2/download"
API_KEY = os.getenv("HYPER3D_API_KEY")
TASK_UUID = "your-task-uuid"  # Replace with your actual task UUID

# Prepare the headers
headers = {
    'accept': 'application/json',
    'Content-Type': 'application/json',
    'Authorization': f'Bearer {API_KEY}',
}

# Prepare the JSON payload
data = {
    "task_uuid": TASK_UUID
}

# Make the POST request
response = requests.post(ENDPOINT, headers=headers, json=data)

# Parse and return the JSON response
print(response.json())

```

{% endtab %}

{% tab title="Response" %}

```json
{
  "list": [
    {
      "url": "https://example.com/",
      "name": "testfile"
    }
  ]
}
```

{% endtab %}
{% endtabs %}
