Skip to content

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 Parameters
filesarray of object
optional

A list of files to generate presigned URLs for.

Hide ParametersShow Parameters
file_namestring
optional
file_sizestring
optional

The size of the file in bytes.

formatint64
Returns
request_idstring
optional

The ID generated for the request for Presigned URLs.

uploadsarray of object
optional

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

Hide ParametersShow Parameters
expires_atstring
optional

The time the url expires at.

formatdate-time
object_keystring
optional

The unique object key to store the file as.

original_file_namestring
optional

The original file name.

presigned_urlstring
optional

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

Request example cURL
curl https://api.digitalocean.com//v2/gen-ai/evaluation_datasets/file_upload_presigned_urls \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $GRADIENTAI_API_KEY" \
    -d '{}'
200 Example
{
  "request_id": "request_id",
  "uploads": [
    {
      "expires_at": "2019-12-27T18:11:19.117Z",
      "object_key": "object_key",
      "original_file_name": "original_file_name",
      "presigned_url": "presigned_url"
    }
  ]
}