Translate a JSON input into any localized file
curl --request POST \
--url https://api.acedata.cloud/localization/translate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "# Title 1\n\nThis is a paragraph.\n\n## Title 2\n\nThis is another paragraph.",
"locale": "en",
"extension": "json"
}
'import requests
url = "https://api.acedata.cloud/localization/translate"
payload = {
"input": "# Title 1
This is a paragraph.
## Title 2
This is another paragraph.",
"locale": "en",
"extension": "json"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: '# Title 1\n\nThis is a paragraph.\n\n## Title 2\n\nThis is another paragraph.',
locale: 'en',
extension: 'json'
})
};
fetch('https://api.acedata.cloud/localization/translate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"message.clickButton": {
"message": "Please click button to apply",
"description": "Localization Translate Response 200 Example Data Message Clickbutton"
}
},
"locale": "zh-CN"
}{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}API Reference
Translate a JSON input into any localized file
POST
/
localization
/
translate
Translate a JSON input into any localized file
curl --request POST \
--url https://api.acedata.cloud/localization/translate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "# Title 1\n\nThis is a paragraph.\n\n## Title 2\n\nThis is another paragraph.",
"locale": "en",
"extension": "json"
}
'import requests
url = "https://api.acedata.cloud/localization/translate"
payload = {
"input": "# Title 1
This is a paragraph.
## Title 2
This is another paragraph.",
"locale": "en",
"extension": "json"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: '# Title 1\n\nThis is a paragraph.\n\n## Title 2\n\nThis is another paragraph.',
locale: 'en',
extension: 'json'
})
};
fetch('https://api.acedata.cloud/localization/translate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"message.clickButton": {
"message": "Please click button to apply",
"description": "Localization Translate Response 200 Example Data Message Clickbutton"
}
},
"locale": "zh-CN"
}{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}Autorisations
API token from https://platform.acedata.cloud
En-têtes
Localization Translate Param Accept
Options disponibles:
application/json Corps
application/json
Localization Translate Input
Exemple:
"# Title 1\n\nThis is a paragraph.\n\n## Title 2\n\nThis is another paragraph."
Localization Translate Locale
Options disponibles:
en, de, pt, es, fr, zh-CN, zh-TW, it, ko, ja, ru, pl, fi, sv, el, uk, ar, sr Localization Translate Extension
Options disponibles:
json, md Localization Translate Model
Options disponibles:
gpt-3.5, gpt-4 Cette page vous a-t-elle été utile ?

