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

A list of files to generate presigned URLs for.

Hide ParametersShow Parameters
file_namestring
optional

Local filename

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.

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"
200 Example
{
  "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\""
    }
  ]
}