Skip to main content
POST
/
v2
/
upload
/
s3
/
params
Initiate File Upload to Cloud Storage
curl --request POST \
  --url 'https://api.lilt.com/v2/upload/s3/params?key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "document.xliff",
  "type": "video/mp4",
  "metadata": {
    "size": 1024,
    "category": "documents",
    "uuid": "123e4567-e89b-12d3-a456-426614174000",
    "labels": [
      "important",
      "review-needed"
    ]
  }
}
'
{
  "url": "https://storage.googleapis.com/bucket/uploads/user123/file456.json?...",
  "key": "uploads/user123/file456.json",
  "method": "PUT"
}

Authorizations

key
string
query
required

Body

application/json

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).

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
object

Optional file metadata.

Response

Upload initialization information. Returns a single object for single file requests, or an array of objects for bulk requests.

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"