curl --request POST \
--url https://api.lilt.com/v2/upload/s3/multipart \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"filename": "large-file.zip",
"type": "application/zip",
"metadata": {
"size": 104857600,
"category": "documents",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"labels": [
"important",
"review-needed"
]
}
}
'import requests
url = "https://api.lilt.com/v2/upload/s3/multipart"
payload = {
"filename": "large-file.zip",
"type": "application/zip",
"metadata": {
"size": 104857600,
"category": "documents",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"labels": ["important", "review-needed"]
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filename: 'large-file.zip',
type: 'application/zip',
metadata: {
size: 104857600,
category: 'documents',
uuid: '123e4567-e89b-12d3-a456-426614174000',
labels: ['important', 'review-needed']
}
})
};
fetch('https://api.lilt.com/v2/upload/s3/multipart', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lilt.com/v2/upload/s3/multipart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filename' => 'large-file.zip',
'type' => 'application/zip',
'metadata' => [
'size' => 104857600,
'category' => 'documents',
'uuid' => '123e4567-e89b-12d3-a456-426614174000',
'labels' => [
'important',
'review-needed'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lilt.com/v2/upload/s3/multipart"
payload := strings.NewReader("{\n \"filename\": \"large-file.zip\",\n \"type\": \"application/zip\",\n \"metadata\": {\n \"size\": 104857600,\n \"category\": \"documents\",\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"labels\": [\n \"important\",\n \"review-needed\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lilt.com/v2/upload/s3/multipart")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"filename\": \"large-file.zip\",\n \"type\": \"application/zip\",\n \"metadata\": {\n \"size\": 104857600,\n \"category\": \"documents\",\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"labels\": [\n \"important\",\n \"review-needed\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lilt.com/v2/upload/s3/multipart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filename\": \"large-file.zip\",\n \"type\": \"application/zip\",\n \"metadata\": {\n \"size\": 104857600,\n \"category\": \"documents\",\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"labels\": [\n \"important\",\n \"review-needed\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"uploadId": "abc123def456",
"key": "uploads/user123/large-file.zip"
}{
"message": "Internal server error."
}Initiate Multipart Upload
Initiate a multipart upload for large files. This endpoint provides the necessary information to start a multipart upload process.
Supports both single file and bulk upload requests. For bulk uploads, pass an array of upload objects (maximum 100 items). The response format matches the request format - a single object for single file requests, or an array for bulk requests.
Example CURL command (single file):
curl -X POST https://lilt.com/v2/upload/s3/multipart?key=API_KEY \
--header "Content-Type: application/json" \
--data-raw '{
"filename": "large-file.zip",
"type": "application/zip",
"metadata": {
"size": 104857600
}
}'
Example CURL command (bulk upload):
curl -X POST https://lilt.com/v2/upload/s3/multipart?key=API_KEY \
--header "Content-Type: application/json" \
--data-raw '[
{
"filename": "large-file1.zip",
"type": "application/zip",
"metadata": { "size": 104857600 }
},
{
"filename": "large-file2.zip",
"type": "application/zip",
"metadata": { "size": 209715200 }
}
]'
curl --request POST \
--url https://api.lilt.com/v2/upload/s3/multipart \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"filename": "large-file.zip",
"type": "application/zip",
"metadata": {
"size": 104857600,
"category": "documents",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"labels": [
"important",
"review-needed"
]
}
}
'import requests
url = "https://api.lilt.com/v2/upload/s3/multipart"
payload = {
"filename": "large-file.zip",
"type": "application/zip",
"metadata": {
"size": 104857600,
"category": "documents",
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"labels": ["important", "review-needed"]
}
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
filename: 'large-file.zip',
type: 'application/zip',
metadata: {
size: 104857600,
category: 'documents',
uuid: '123e4567-e89b-12d3-a456-426614174000',
labels: ['important', 'review-needed']
}
})
};
fetch('https://api.lilt.com/v2/upload/s3/multipart', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lilt.com/v2/upload/s3/multipart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filename' => 'large-file.zip',
'type' => 'application/zip',
'metadata' => [
'size' => 104857600,
'category' => 'documents',
'uuid' => '123e4567-e89b-12d3-a456-426614174000',
'labels' => [
'important',
'review-needed'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lilt.com/v2/upload/s3/multipart"
payload := strings.NewReader("{\n \"filename\": \"large-file.zip\",\n \"type\": \"application/zip\",\n \"metadata\": {\n \"size\": 104857600,\n \"category\": \"documents\",\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"labels\": [\n \"important\",\n \"review-needed\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lilt.com/v2/upload/s3/multipart")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"filename\": \"large-file.zip\",\n \"type\": \"application/zip\",\n \"metadata\": {\n \"size\": 104857600,\n \"category\": \"documents\",\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"labels\": [\n \"important\",\n \"review-needed\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lilt.com/v2/upload/s3/multipart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filename\": \"large-file.zip\",\n \"type\": \"application/zip\",\n \"metadata\": {\n \"size\": 104857600,\n \"category\": \"documents\",\n \"uuid\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"labels\": [\n \"important\",\n \"review-needed\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"uploadId": "abc123def456",
"key": "uploads/user123/large-file.zip"
}{
"message": "Internal server error."
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
Information about the file(s) to be uploaded. Can be a single object or an array of objects (max 100).
Single file request: { "filename": "...", "type": "...", "metadata": {...} }
Bulk request: [{ "filename": "...", "type": "...", "metadata": {...} }, ...]
A single upload request object, or an array of upload request objects (max 100).
Was this page helpful?

