POST
/
files
Upload a file
curl --request POST \
  --url https://api.chunkr.ai/api/v1/files \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'file_metadata=<string>' \
  --form file=@example-file
{
  "content_type": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "file_id": "<string>",
  "file_name": "<string>",
  "file_size": 123,
  "metadata": {},
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

Body

multipart/form-data

Multipart upload with file and optional metadata

Form model for typed multipart extraction

file
file
required

The file to upload

file_metadata
string | null

Arbitrary JSON metadata associated with the file.

Response

File uploaded successfully

Metadata describing an uploaded file in Chunkr.

Returned by POST /files and GET /files/{file_id}.

content_type
string
required

MIME type detected or provided for the file.

created_at
string<date-time>
required

Timestamp when the file was created.

file_id
string
required

Unique identifier for the file.

file_name
string
required

The original filename supplied by the client.

file_size
integer
required

Size of the stored file in bytes.

metadata
object
required

Arbitrary JSON metadata associated with the file.

url
string
required

Permanent Chunkr URL. Use directly with other chunkr API requests.