---
updatedAt: 2026-04-07T15:57:51.000Z
agentTools:
  projectIndex: https://developers.laratranslate.com/llms.txt
---

# Quickstart

The Lara SDK gives developers direct, programmatic access to Lara’s translation capabilities, making it easy to build custom translation features into any application or workflow. 

## Step 1 - Check Requirements

The requirements for installing the SDK vary depending on the framework and language you use.

| Framework | Required Version |
| :-------- | :--------------- |
| Python    | ≥ 3.8            |
| NodeJS    | ≥ 12             |
| Java      | ≥ 1.8 (8)        |
| PHP       | ≥ 5.6            |
| Go        | ≥ 1.16           |
| .NET      | ≥ 8.0            |
| Swift     | ≥ 5.5            |

To check your currently installed version, use this command:

```python Python
python --version
```
```node Js / Ts - Node
node -v
```
```java Java
java --version
```
```php PHP
php -v
```
```go Go
go version
```
```csharp
dotnet --version
```
```swift
swift --version
```

## Step 2 - Install the SDK

```python Python
pip install lara-sdk
```
```javascript Js / Ts - Node
npm install @translated/lara
```
```java Java/Maven
<dependency>
	<groupId>com.translated.lara</groupId>
	<artifactId>lara-sdk</artifactId>
	<version>1.2.3</version>
</dependency>
```
```java Java/Gradle
// Project build.gradle

dependencies {
    configuration('com.translated.lara:lara-sdk:1.2.3')
}

// if you are using Gradle Kotlin DSL
// Project build.gradle.kts

dependencies {
    implementation("com.translated.lara:lara-sdk:1.2.3")
}
```
```php PHP
composer require translated/lara-sdk:1.0.1
```
```go Go
go get github.com/translated/lara-go/lara
```
```csharp
dotnet add package Lara.Sdk
```
```swift
// Add to your Package.swift dependencies:
.package(url: "https://github.com/translated/lara-swift.git", from: "1.0.0")
```

## Step 3 - Configure Your Credentials

1. Go to the [Lara Translate website](https://laratranslate.com/pricing), subscribe any plan (including the free one)
2. Create a new pair of Lara credentials in the API section of your [account](https://laratranslate.com/account)

**Store them in a secure location. If lost they cannot be recovered, you will need to generate new ones.**

## Step 4 - Translate

With the SDK installed and the credentials got from the website, you are ready to perform your first translation with Lara.

```python
from lara_sdk import Translator, Credentials

LARA_ACCESS_KEY_ID = "ABC123..."      # Replace with your Access Key ID
LARA_ACCESS_KEY_SECRET = "aBc123..."  # Replace with your Access Key SECRET

if __name__ == '__main__':
    credentials = Credentials(access_key_id=LARA_ACCESS_KEY_ID, access_key_secret=LARA_ACCESS_KEY_SECRET)
    lara = Translator(credentials)

    # This translates your text from English ("en-US") to Italian ("it-IT").
    res = lara.translate("Hello, how are you? This text can be very long.",
                         source="en-US",
                         target="it-IT")

    # Prints the translated text: "Ciao, come stai? Questo testo può essere molto lungo."
    print(res.translation)
```
```typescript Javascript / Typescript
import {Credentials, Translator} from "@translated/lara";

const LARA_ACCESS_KEY_ID = "ABC123..."      // Replace with your Access Key ID
const LARA_ACCESS_KEY_SECRET = "aBc123..."  // Replace with your Access Key SECRET

const credentials = new Credentials(LARA_ACCESS_KEY_ID, LARA_ACCESS_KEY_SECRET);
const lara = new Translator(credentials);

async function main() {
  // This translates your text from English ("en-US") to Italian ("it-IT").
  const res = await lara.translate('Hello, how are you? This text can be very long.',
      'en-US', 'it-IT');

  // Prints the translated text: "Ciao, come stai? Questo testo può essere molto lungo."
  console.log(res.translation)
}

main().finally(() => console.log('Done!'))
```
```java
package mypackage.example

import com.translated.lara.Credentials;
import com.translated.lara.errors.LaraException;
import com.translated.lara.translator.TextResult;
import com.translated.lara.translator.Translator;

public class Main {

    // Replace with your Access Key ID
    private static final String LARA_ACCESS_KEY_ID = "ABC123...";
    // Replace with your Access Key SECRET
    private static final String LARA_ACCESS_KEY_SECRET = "aBc123...";

    public static void main(String[] args) throws LaraException {
        Credentials credentials = new Credentials(LARA_ACCESS_KEY_ID, LARA_ACCESS_KEY_SECRET);
        Translator lara = new Translator(credentials);

        // This translates your text from English ("en-US") to Italian ("it-IT").
        TextResult res = lara.translate("Hello, how are you? This text can be very long.",
                "en-US", "it-IT");
      
        // Prints the translated text: "Ciao, come stai? Questo testo può essere molto lungo."
        System.out.println(res.getTranslation());
    }
}
```
```php
<?php

require 'vendor/autoload.php';

use Lara\Translator;
use Lara\LaraCredentials;

$LARA_ACCESS_KEY_ID = "ABC123...";      // Replace with your Access Key ID
$LARA_ACCESS_KEY_SECRET = "aBc123...";  // Replace with your Access Key SECRET

$credentials = new LaraCredentials($LARA_ACCESS_KEY_ID, $LARA_ACCESS_KEY_SECRET);
$lara = new Translator($credentials);

// This translates your text from English ("en-US") to Italian ("it-IT").
$result = $lara->translate('Hello, how are you? This text can be very long.', 
    'en-US', 'it-IT');

// Prints the translated text: "Ciao, come stai? Questo testo può essere molto lungo."
echo $result->getTranslation();
```
```go Go
package main

import (
	"fmt"
	lara_sdk "github.com/translated/lara-go/lara"  // alias "lara_sdk", can be changed or removed
)

const (
    LARA_ACCESS_KEY_ID     = "ABC123..."      // Replace with your Access Key ID
    LARA_ACCESS_KEY_SECRET = "aBc123..."      // Replace with your Access Key SECRET
)

func main() {
    credentials := lara_sdk.NewCredentials(LARA_ACCESS_KEY_ID, LARA_ACCESS_KEY_SECRET)
    lara := lara_sdk.NewTranslator(credentials, nil)

    // This translates your text from English ("en-US") to Italian ("it-IT").
    result, _ := lara.Translate(
        "Hello, how are you? This text can be very long.",
        "en-US",
        "it-IT",
        lara_sdk.TranslateOptions{},
    )
    // Prints the translated text: "Ciao, come stai? Questo testo può essere molto lungo."
    fmt.Println(*result.Translation.String)
}
```
```kotlin
package mypackage.example

import com.translated.lara.Credentials
import com.translated.lara.errors.LaraException
import com.translated.lara.translator.TextResult
import com.translated.lara.translator.Translator

object Main {

    // Replace with your Access Key ID
    private const val LARA_ACCESS_KEY_ID = "ABC123..."
    // Replace with your Access Key SECRET
    private const val LARA_ACCESS_KEY_SECRET = "aBc123..."

    @JvmStatic
    @Throws(LaraException::class)
    fun main(args: Array<String>) {
        val credentials = Credentials(LARA_ACCESS_KEY_ID, LARA_ACCESS_KEY_SECRET)
        val lara = Translator(credentials)

        // This translates your text from English ("en-US") to Italian ("it-IT").
        val res: TextResult = lara.translate(
            "Hello, how are you? This text can be very long.",
            "en-US",
            "it-IT"
        )

        // Prints the translated text: "Ciao, come stai? Questo testo può essere molto lungo."
        println(res.translation)
    }
}
```
```csharp
using Lara.Sdk;

namespace Lara.NET.SDK.Example
{
    class Program
    {
        static async Task Main(string[] args)
        {
            const string LARA_ACCESS_KEY_ID = "ABC123...";      // Replace with your Access Key ID
            const string LARA_ACCESS_KEY_SECRET = "aBc123...";  // Replace with your Access Key SECRET

            var credentials = new Credentials(LARA_ACCESS_KEY_ID, LARA_ACCESS_KEY_SECRET);
            var lara = new Translator(credentials, null);

            // This translates your text from English ("en-US") to Italian ("it-IT").
            var result = await lara.Translate(
                "Hello, how are you? This text can be very long.",
                "en-US",
                "it-IT"
            );
            
            // Prints the translated text: "Ciao, come stai? Questo testo può essere molto lungo."
            Console.WriteLine(result.SingleTranslation);
        }
    }
}
```
```swift
import Lara

let LARA_ACCESS_KEY_ID = "ABC123..."      // Replace with your Access Key ID
let LARA_ACCESS_KEY_SECRET = "aBc123..."  // Replace with your Access Key SECRET

func main() async {
    let credentials = Credentials(accessKeyId: LARA_ACCESS_KEY_ID, accessKeySecret: LARA_ACCESS_KEY_SECRET)
    let lara = Translator(credentials: credentials)
    
    do {
        // This translates your text from English ("en-US") to Italian ("it-IT").
        let translation = try await lara.translate(text: "Hello, how are you? This text can be very long.", source: "en-US", target: "it-IT")
        
        // Prints the translated text: "Ciao, come stai? Questo testo può essere molto lungo."
        if let translations = try? translation.translation.getTranslations() {
            print(translations.first ?? "No translation")
        }
    } catch {
        print("Error: \(error.localizedDescription)")
    }
}

Task {
    await main()
}
```

Full documentation for the `translate` function can be found in the [SDK Reference](https://developers.laratranslate.com/docs/translator-class).

> 🚧 Git Security Recommendation
>
> If you are using git, always double-check before committing or pushing code to a Git repository to ensure that neither your key nor secret is included.
>
> We strongly recommend storing your credentials in a git-ignored `.env` within your project and relying on one of the many tools available to load credentials at runtime, such as `dotenv`.
>
> Exposing both the key and secret can lead to unauthorized access, security breaches, and potential financial losses.

<br />

### SDK Repositories

You can explore the source code or contribute to Lara's SDKs on GitHub:

[lara-python](https://github.com/translated/lara-python)

[lara-node](https://github.com/translated/lara-node)

[lara-java](https://github.com/translated/lara-java)

[lara-php](https://github.com/translated/lara-php)

[lara-go](https://github.com/translated/lara-go)

[lara-dotnet](https://github.com/translated/lara-dotnet)

[lara-swift](https://github.com/translated/lara-swift)

<br />

### Next Steps

With the SDK successfully set up and working, you’re ready to dive deeper into Lara. Explore the following pages and examples to discover its full capabilities.