Creating a new File is a prerequisite for using that file with the evaluation sets API.

This endpoint will pre-process the contents of the file, and store it in the Extend platform for use in evaluation sets. For files that require pre-processing (e.g. pdfs, images, etc.) this endpoint can take up to 30 seconds to complete.

Files can be created with a url, base64 encoded contents, or rawText contents.

Body

name
string
required

The name of the file.

url
string

A pre signed URL for the file.

base64
string

The base64 encoded contents of the file.

rawText
string

The raw text content of the file.

mediaType
string

The media type of the file. (e.g. application/pdf). Required if base64 is provided.

Response

success
boolean

A true or false value for whether the file was processed successfully or not.

file
File

A File object representing the newly created file. See the File object for more details.