Naar hoofdinhoud gaan
POST
/
v1
/
files
Maak Bestand 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
}

Autorisaties

Authorization
string
header
vereist

Bearer authenticatie header in de vorm Bearer , waarbij jouw auth token is.

Body

application/json
filename
string
vereist

De bestandsnaam voor het bestand. Moet eindigen met de .json-extensie.

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

Het doel van het bestand. Ondersteunde waarden: 'context' of 'batch'. Standaard is 'context'.

Beschikbare opties:
context,
batch

Respons

Succesvolle reactie met upload-URL.

id
string

Bestand ID

object
string

Het soort object. "file.upload" voor deze endpoint.

created
integer

Gemaakt epoch-tijdstempel

upload_url
string<uri>

Vooraf ondertekende URL voor het uploaden van het bestand. Verloopt na 10 minuten.

expires_in
integer

Aantal seconden totdat de upload-URL verloopt (600 seconden = 10 minuten)