Introduction #️⃣
Get your token To generate a token, go to the Developer Console in Localazy and create a token under Access Tokens.
Find your project ID
Call /projects endpoint and retrieve your project id that is needed for most endpoints.
curl --request GET \
--url 'https://api.localazy.com/projects' \
--header 'Authorization: Bearer <project-token>'- Learn more about token types and Localazy API authentication.
Management API #️⃣
You can upload strings into the project using our API to manage them over time
With your project id, you can import content as following:
curl --request POST \
--url 'https://api.localazy.com/projects/<project-id>/import' \
--header 'Authorization: Bearer <project-token>' \
--header 'Content-Type: application/json' \
--data '{
"files": [
{
"name": "file.json",
"content": {
"en": {
"hello_world": "Hello World!"
},
"fr": {
"hello_world": "Salut tout le monde!"
}
}
}
]
}'- For more import options, check the API Import article.
- Learn how to download your files in the API Files article.
Localazy AI Translation API #️⃣
The AI Translation API lets you translate strings programmatically using Localazy AI. These strings won’t be uploaded into your project.
This feature is currently in beta and not yet available during trial. Please contact us if you need help trying it out at team@localazy.com
For this use case, a translation token is recommended — it has a narrower scope and is safer to use in application code.
Credits #️⃣
Each request consumes Localazy credits based on the number of words translated. You can check your balance and top up new credits in the Localazy dashboard under Organization billing → Services.
Set up your context (style guide & glossary) #️⃣
The API automatically picks up your project’s style guide and glossary when generating translations. No extra parameters needed, just make sure they’re configured in your Localazy project before you start sending requests.
- Style guide defines tone, formality, and writing rules (e.g., avoid passive voice, use informal register).
- Glossary locks specific terms to their approved translations (e.g., “Dashboard” always translates as “Dashboard”, not “Tableau de bord”).
If your project already has these configured, the AI uses them automatically. If not, this is a good moment to set them up, they make a noticeable difference in consistency.
Send a translation request #️⃣
curl --request POST \
--url https://api.localazy.com/projects/{projectId}/ai \
--header 'Authorization: Bearer {your_token}' \
--header 'Content-Type: application/json' \
--data '{
"from": "en",
"to": "de",
"items": [
{
"key": "btn_submit",
"source": "Submit",
"comment": "Button label for form submission"
},
{
"key": "welcome_message",
"source": "Welcome back, %s!",
"lengthLimit": 50
}
]
}'from and to are locale codes (e.g. en, de, cs, ja). items is an array of strings to translate — you can send up to 32 per request.