curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/presigned-url \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"expires_in": 7200
}'
{
"url": "https://storage.getagentdrive.com/files/file_xyz789?token=eyJhbGci...",
"token": "eyJhbGci...",
"expires_at": "2026-03-19T12:00:00Z"
}
Files
Create Presigned URL
Generate a temporary presigned URL for direct file access.
POST
/
v0
/
files
/
{id}
/
presigned-url
curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/presigned-url \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"expires_in": 7200
}'
{
"url": "https://storage.getagentdrive.com/files/file_xyz789?token=eyJhbGci...",
"token": "eyJhbGci...",
"expires_at": "2026-03-19T12:00:00Z"
}
Path Parameters
Request Body
The number of seconds until the presigned URL expires. Defaults to 3600 (1 hour). Maximum is 86400 (24 hours).
curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/presigned-url \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"expires_in": 7200
}'
{
"url": "https://storage.getagentdrive.com/files/file_xyz789?token=eyJhbGci...",
"token": "eyJhbGci...",
"expires_at": "2026-03-19T12:00:00Z"
}
Response
The presigned URL for direct file access. No authentication header is required when using this URL.
