Skip to main content
POST
/
upload
Upload File
curl --request POST \
  --url https://{base_url}/upload \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-API-Key: <api-key>' \
  --form file='@example-file' \
  --form expires_in=86400
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"bytes": 120000,
"created_at": "2023-11-07T05:31:56Z",
"filename": "document.pdf",
"expires_at": "2023-11-07T05:31:56Z",
"pages": 5
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Body

multipart/form-data
file
file
required

The document file to upload

expires_in
integer

Expiration time in seconds (omit for permanent storage)

Example:

86400

Response

File uploaded successfully

id
string<uuid>

Unique file identifier

Example:

"123e4567-e89b-12d3-a456-426614174000"

bytes
integer

File size in bytes

Example:

120000

created_at
string<date-time>

Upload timestamp in ISO 8601 format

filename
string

Original filename

Example:

"document.pdf"

expires_at
string<date-time> | null

Expiration timestamp (null if permanent storage)

pages
integer

Number of pages detected in document

Example:

5