Skip to main content
POST
/
v1
/
files
Upload a file
curl --request POST \
  --url https://api.perceptron.inc/v1/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
{
  "bytes": 123,
  "created_at": 123,
  "filename": "<string>",
  "id": "<string>",
  "object": "<string>"
}
Upload a file as multipart/form-data (file + purpose) to reference by id in later requests. Compatible with OpenAI’s Upload file endpoint. The response returns the file’s id (e.g. file-abc123). See Working with files for how to reference it in a chat completion.

Limits

LimitValue
Maximum file size512 MiB
Total storage per organization100 GiB
Need higher limits? Contact us. Rate limit: 60 requests/min.

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.

purpose
enum<string>
required

File purpose.

Available options:
vision,
user_data

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