cURL
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 }
Generate a pre-signed URL for uploading a JSON file. After uploading, you must call the complete endpoint to finalize the upload.
Bearer authentication header of the form Bearer , where is your auth token.
The filename for the file. Must end with .json extension.
\.json$
The purpose of the file. Supported values: 'context' or 'batch'. Defaults to 'context'.
context
batch
Successful response with upload URL.
File ID
The kind of object. "file.upload" for this endpoint.
Created epoch timestamp
Pre-signed URL for uploading the file. Expires in 10 minutes.
Number of seconds until the upload URL expires (600 seconds = 10 minutes)
Was this page helpful?