Skip to main content
POST
/
v1
/
files
const file = new File([buffer], "catalog.pdf", { type: "application/pdf" });
const uploaded = await client.files.upload(file, "catalog.pdf");

console.log(uploaded.id);       // "file_abc123"
console.log(uploaded.filename); // "catalog.pdf"
console.log(uploaded.size);     // 1048576
{
  "id": "file_abc123",
  "filename": "catalog.pdf",
  "size": 1048576,
  "content_type": "application/pdf",
  "created_at": "2025-03-10T14:30:00.000Z"
}

Request body

Send the file as multipart/form-data with a file field.
file
file
required
The file to upload. Maximum size is 1 GB. Supported formats include PDF, CSV, XLSX, images, and more.

Response

id
string
Unique file identifier. Use this when creating tables.
filename
string
Original file name.
size
integer
File size in bytes.
content_type
string
MIME type of the file.
created_at
string
ISO 8601 timestamp.
const file = new File([buffer], "catalog.pdf", { type: "application/pdf" });
const uploaded = await client.files.upload(file, "catalog.pdf");

console.log(uploaded.id);       // "file_abc123"
console.log(uploaded.filename); // "catalog.pdf"
console.log(uploaded.size);     // 1048576
{
  "id": "file_abc123",
  "filename": "catalog.pdf",
  "size": 1048576,
  "content_type": "application/pdf",
  "created_at": "2025-03-10T14:30:00.000Z"
}
The TypeScript SDK accepts File or Blob objects. The Python SDK accepts a file path string and handles the multipart upload automatically.