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.
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<xliff xmlns=\"urn:oasis:names:tc:xliff:document:1.2\">\n...\n</xliff>"
A SourceFile object.
A SourceFile is an unprocessed source file that can later be added to a project.
A unique number identifying the SourceFile.
46530
The file name.
"en_US.json"
A unique hash value associated with the file. An MD5 hash of the file content will be used by default.
"3858f62230ac3c915f300c664312c63f"
Language associated with the file.
"de"
Confidence score for the language associated with the file.
0.7
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.
"REFERENCE"
The list of labels associated with the file.
[]Time at which the object was created.
"2019-10-16T22:12:34Z"
Time at which the object was created.
"2019-10-16T22:12:34Z"