Skip to content
  • Auto
  • Light
  • Dark

Create File Upload Presigned URLs

Create Presigned URLs for Evaluation Dataset File Upload
post/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls

To create presigned URLs for evaluation dataset file upload, send a POST request to /v2/gen-ai/evaluation_datasets/file_upload_presigned_urls.

Body ParametersExpand Collapse
files: optional array of object { file_name, file_size }

A list of files to generate presigned URLs for.

file_name: optional string

Local filename

file_size: optional string

The size of the file in bytes.

formatint64
ReturnsExpand Collapse
request_id: optional string

The ID generated for the request for Presigned URLs.

uploads: optional array of object { expires_at, object_key, original_file_name, presigned_url }

A list of generated presigned URLs and object keys, one per file.

expires_at: optional string

The time the url expires at.

formatdate-time
object_key: optional string

The unique object key to store the file as.

original_file_name: optional string

The original file name.

presigned_url: optional string

The actual presigned URL the client can use to upload the file directly.

curl https://api.digitalocean.com/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN"
{
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "uploads": [
    {
      "expires_at": "2023-01-01T00:00:00Z",
      "object_key": "example string",
      "original_file_name": "example name",
      "presigned_url": "example string"
    }
  ]
}
Returns Examples
{
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "uploads": [
    {
      "expires_at": "2023-01-01T00:00:00Z",
      "object_key": "example string",
      "original_file_name": "example name",
      "presigned_url": "example string"
    }
  ]
}