POST
/
v2
/
files
Upload a File
curl --request POST \
  --url https://api.lilt.com/v2/files \
  --header 'Content-Type: application/octet-stream'
{
  "id": 46530,
  "name": "en_US.json",
  "file_hash": "3858f62230ac3c915f300c664312c63f",
  "detected_lang": "de",
  "detected_lang_confidence": 0.7,
  "category": "REFERENCE",
  "labels": [],
  "created_at": "2019-10-16T22:12:34Z",
  "updated_at": "2019-10-16T22:12:34Z"
}

Authorizations

key
string
query
required

Query Parameters

name
string
required

A file name.

file_hash
string

A hash value to associate with the file. The MD5 hash of the body contents will be used by default if a value isn't provided.

langId
boolean

Flag indicating whether to perform language detection on the uploaded file. Default is false.

project_id
integer

The project to associate the uploaded file with.

category
string

The category of the file. The options are REFERENCE, or API. The default is API. Files with the REFERENCE category will be displayed as reference material.

labels
string

Comma-separated list of labels to add to the uploaded document.

job_type
enum<string>

Specifies the job type when adding this file to a job.

Available options:
TRANSLATION,
PROMPT_RESPONSE

Body

application/octet-stream · file

The file contents to be uploaded. The entire POST body will be treated as the file.

The body is of type file.

Response

201
application/json

A SourceFile object.

A SourceFile is an unprocessed source file that can later be added to a project.