Limai Docs
API ReferenceSplitting

Get Upload URL

Get a presigned URL to upload a file for splitting

GET/api/v1/split/{splitterId}/get-url

Returns a presigned S3 URL to upload a file for splitting. The file record is created with UPLOADING status. Use the returned URL to upload the file via a PUT request, then call the split or split-async endpoint with the returned fileId.

Parameters

NameTypeInRequiredDescription
splitterIdstringpathYesThe splitter ID
filenamestringqueryYesName of the file being uploaded

Request

const res = await fetch(
"https://app.limai.io/api/v1/split/spl_abc123/get-url?filename=document.pdf",
{
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
  },
}
);
const { url, fileId } = await res.json();

await fetch(url, {
method: "PUT",
body: fileBuffer,
});

Response

Response200
{
  "url": "https://s3.amazonaws.com/...presigned-url...",
  "fileId": "cuid_file_123"
}