> 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/zh_cn/api-specification/download-results_reset_v.md).

# Download Results

{% openapi src="/files/rA0xuGrMtEOsEqeySbPJ" path="/api/v2/download" method="post" %}
[public-api.json](https://563398440-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwiMYwiLTHWAzkgBEpY5K%2Fuploads%2Fgit-blob-8b3e8c417bade1e10d0190a05b80cfb0b4f9c3bb%2Fpublic-api.json?alt=media)
{% endopenapi %}

在Check status端点返回的`Done`状态之后，调用这个API端点来获取生成任务的下载url。

{% hint style="info" %}
在任务完成之前调用这个API端点可能会返回错误的结果，比如文件列表不完整。 查看[ Check Status ](/zh_cn/api-specification/check-status_reset_v.md)了解如何查看任务是否完成。
{% endhint %}

### 价格

我们不会对调用API下载生成结果的行为收取任何额外的费用。

### 请求

#### Authentication

此API使用密钥进行身份验证。您需要在所有请求的`Authorization`头中包含一个有效的密钥. 参

```
Authorization: Bearer RODIN_API_KEY
```

#### Body

API在`POST`请求体中需求一个参数。

{% hint style="info" %}
对于[response from the Generation API](/zh_cn/api-specification/rodin-generation_reset_v.md#response)的`task_uuid`，使用`uuid`字段替代`jobs_uuid`。
{% endhint %}

| Parameter      | Type       | Description                                     |
| -------------- | ---------- | ----------------------------------------------- |
| **task\_uuid** | **string** | **Required.** 需要查询状态的任务UUID。通常，您将在生成API的响应中获得它。 |

### 响应

JSON响应包含以下字段。您可以在list列表中下载preview\.webp以预览模型。

| Property  | Type   | Description    |
| --------- | ------ | -------------- |
| error     | string | 可选。 可能存在的错误信息。 |
| list      | array  | 此任务可下载的模型文件列表。 |
| list.url  | string | 下载模型文件的URL。    |
| list.name | string | 模型文件的名称。       |

### 样例

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

```sh
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 %}
