跳转到主要内容
GET
/
v1
/
attachments
/
{uuid}
/
{name}
Download an attachment
curl --request GET \
  --url https://api.devin.ai/v1/attachments/{uuid}/{name} \
  --header 'Authorization: Bearer <token>'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
此端点允许你从 Devin 会话中下载文件。若要上传资源,请使用上传端点 该端点返回一个 307 重定向到预签名 URL,为文件提供临时访问权限。预签名 URL 的有效期为 60 秒。

使用示例

import requests

# 下载附件
response = requests.get(
    f"https://api.devin.ai/v1/attachments/{uuid}/{filename}",
    headers={"Authorization": f"Bearer {DEVIN_API_KEY}"},
    allow_redirects=True
)

# 保存文件内容
with open(filename, "wb") as f:
    f.write(response.content)

Authorizations

Authorization
string
header
required

Personal API Key (apk_user_) or Service API Key (apk_)

Path Parameters

uuid
string
required
name
string
required

Response

Redirect to presigned download URL