API ReferenceSplitting
Get Upload URL
Get a presigned URL to upload a file for splitting
GET
/api/v1/split/{splitterId}/get-urlReturns 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
| Name | Type | In | Required | Description |
|---|---|---|---|---|
splitterId | string | path | Yes | The splitter ID |
filename | string | query | Yes | Name 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"
}