Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Bearer token authentication using your Perceptron API key

Body

multipart/form-data

Multipart form body for POST /v1/files. Send the file bytes in the file field and the file's intended purpose.

file
file
required

The file to upload. Must be one of: image/jpeg, image/png, image/webp, video/mp4, video/quicktime, video/webm, audio/wav, audio/mpeg, audio/flac.

purpose
enum<string>
required

File purpose.

Available options:
vision,
user_data
Example:

"vision"

Response

File uploaded.

bytes
integer<int64>
required

File size in bytes.

created_at
integer<int64>
required

Unix timestamp (seconds) when the file was created.

filename
string
required

Original file name.

id
string
required

File ID, e.g. file-abc123.

object
string
required

Always "file".

purpose
enum<string>
required

File purpose.

Available options:
vision,
user_data
Example:

"vision"