Skip to main content
POST
/
v1
/
files
Create File Upload
curl --request POST \
  --url https://api.olostep.com/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "purpose": "context"
}
'
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "upload_url": "<string>",
  "expires_in": 123
}

Authorizations

Authorization
string
header
required

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

Body

application/json
filename
string
required

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

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)