Skip to main content
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

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:
{
  "data": {
    "url": "https://api.getagentdrive.com/v0/presigned/TOKEN",
    "token": "TOKEN",
    "expires_at": "2025-01-15T12:00:00Z"
  }
}

Parameters

ParameterTypeDefaultDescription
expires_innumber3600Link 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