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

# Presigned URLs

> Generate temporary download links for sharing

Presigned URLs let you generate temporary, unauthenticated download links for files. These are useful for:

* Sharing agent outputs with humans who don't have API keys
* Embedding download links in emails or Slack messages
* Giving agents temporary access to specific files

## Generating a presigned URL

```bash theme={null}
curl -X POST https://api.getagentdrive.com/v0/files/FILE_ID/presigned-url \
  -H "Authorization: Bearer agd_your_key" \
  -H "Content-Type: application/json" \
  -d '{"expires_in": 3600}'
```

Response:

```json theme={null}
{
  "data": {
    "url": "https://api.getagentdrive.com/v0/presigned/TOKEN",
    "token": "TOKEN",
    "expires_at": "2025-01-15T12:00:00Z"
  }
}
```

## Parameters

| Parameter    | Type   | Default | Description                                    |
| ------------ | ------ | ------- | ---------------------------------------------- |
| `expires_in` | number | 3600    | Link expiry in seconds (max 86,400 = 24 hours) |

## Behavior

* Presigned URLs are **one-time use** — the token is deleted after the first download
* No authentication is required to use the download link
* Expired links return `410 Gone`
