Skip to main content
GET
/
v2
/
upload
/
s3
/
params
Get S3 Upload Parameters
curl --request GET \
  --url https://api.lilt.com/v2/upload/s3/params \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://api.lilt.com/v2/upload/s3/params"

headers = {"Authorization": "Basic <encoded-value>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};

fetch('https://api.lilt.com/v2/upload/s3/params', 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/params",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.lilt.com/v2/upload/s3/params"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Basic <encoded-value>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.lilt.com/v2/upload/s3/params")
.header("Authorization", "Basic <encoded-value>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.lilt.com/v2/upload/s3/params")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
{
  "url": "https://storage.googleapis.com/bucket/uploads/user123/file456.json?...",
  "key": "uploads/user123/file456.json",
  "method": "PUT"
}
{
"message": "Internal server error."
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Query Parameters

filename
string
required

A file name including file extension.

Example:

"document.xliff"

type
string
required

The content-type or mime-type of the file to upload.

Example:

"video/mp4"

metadata.size
integer

The size of the file to upload in bytes.

Required range: x >= 0
Example:

1024

metadata.category
string

File category metadata.

Example:

"documents"

metadata.uuid
string

File UUID metadata.

Example:

"123e4567-e89b-12d3-a456-426614174000"

metadata.labels
string

Comma-separated list of label names to be added to the file after upload completes.

Example:

"important,review-needed"

Response

Upload initialization information.

url
string

Pre-signed URL for file upload

Example:

"https://storage.googleapis.com/bucket/uploads/user123/file456.json?..."

key
string

Upload key identifier

Example:

"uploads/user123/file456.json"

method
string

HTTP method to use for upload

Example:

"PUT"