curl --request GET \
--url https://api.lilt.com/v2/translate \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lilt.com/v2/translate"
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/translate', 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/translate",
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/translate"
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/translate")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lilt.com/v2/translate")
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{
"untokenizedSource": "Authentication not required.",
"tokenizedSource": "Authentication not required .",
"sourceDelimiters": [
"",
" ",
" ",
"",
""
],
"translation": [
[
{
"score": 3.4936864e-8,
"align": "0-0 1-1 2-2 3-3",
"targetDelimiters": [
"",
" ",
" ",
"",
""
],
"targetWords": [
"Authentifizierung",
"nicht",
"erforderlich",
"."
],
"target": "Authentifizierung nicht erforderlich .",
"targetWithTags": "Authentifizierung nicht erforderlich.",
"isTMMatch": false,
"provenance": "0 0 0 0"
}
]
]
}"<string>"{
"message": "Internal server error."
}Translate a segment
Translate a source string.
Functionally identical to POST /v2/translate, with parameters passed
as query string parameters instead of a JSON request body. Useful for
simple integrations that prefer a GET request.
Setting the rich parameter to true will change the response format
to include additional information about each translation including a
model score, word alignments, and formatting information.
By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response.
The maximum source length is 50,000 characters. When a prefix is supplied (prefix-based translation), the maximum source length is 5,000 characters.
Word-alignment and formatting fields (targetWords, targetDelimiters, and provenance) are returned only for prefix or source_hash requests. Plain (non-prefixed) translations return target and targetWithTags only. The source-side fields tokenizedSource and sourceDelimiters are no longer returned.
Usage charges apply to this endpoint for production API keys.
curl --request GET \
--url https://api.lilt.com/v2/translate \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.lilt.com/v2/translate"
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/translate', 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/translate",
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/translate"
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/translate")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lilt.com/v2/translate")
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{
"untokenizedSource": "Authentication not required.",
"tokenizedSource": "Authentication not required .",
"sourceDelimiters": [
"",
" ",
" ",
"",
""
],
"translation": [
[
{
"score": 3.4936864e-8,
"align": "0-0 1-1 2-2 3-3",
"targetDelimiters": [
"",
" ",
" ",
"",
""
],
"targetWords": [
"Authentifizierung",
"nicht",
"erforderlich",
"."
],
"target": "Authentifizierung nicht erforderlich .",
"targetWithTags": "Authentifizierung nicht erforderlich.",
"isTMMatch": false,
"provenance": "0 0 0 0"
}
]
]
}"<string>"{
"message": "Internal server error."
}Authorizations
Query Parameters
Response
A TranslationList object.
An ranked list of translations and associated metadata.
Was this page helpful?

