Skip to main content
POST
Create File Upload

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your auth token.

Body

application/json
filename
string
required

The filename for the file. Must end with .json extension.

Pattern: \.json$
purpose
enum<string>
default:context

The purpose of the file. Supported values: 'context' or 'batch'. Defaults to 'context'.

Available options:
context,
batch

Response

Successful response with upload URL.

id
string

File ID

object
string

The kind of object. "file.upload" for this endpoint.

created
integer

Created epoch timestamp

upload_url
string<uri>

Pre-signed URL for uploading the file. Expires in 10 minutes.

expires_in
integer

Number of seconds until the upload URL expires (600 seconds = 10 minutes)