Upload a File in any of the formats documented in our knowledge base. Request parameters should be passed in as query string parameters.
Example CURL command:
curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=en_US.json \
--header "Content-Type: application/octet-stream" \
--data-binary @en_US.json
Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score.
The language detection will complete asynchronously. Prior to completion, the detected_lang
value will be zxx
, the reserved ISO 639-2 code for “No linguistic content/not applicable”.
If the language can not be determined, or the detection process fails, the detected_lang
field will return und
, the reserved ISO 639-2 code for undetermined language, and the detected_lang_confidence
score will be 0
.
A file name.
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.
Flag indicating whether to perform language detection on the uploaded file. Default is false.
The project to associate the uploaded file with.
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.
Comma-separated list of labels to add to the uploaded document.
Specifies the job type when adding this file to a job.
TRANSLATION
, PROMPT_RESPONSE
The file contents to be uploaded. The entire POST body will be treated as the file.
The body is of type file
.
A SourceFile object.
A SourceFile is an unprocessed source file that can later be added to a project.