Skip to content

Getting Started

Welcome to Algebras! This guide will help you get up and running quickly with either our CLI tool or API. Choose the path that works best for your workflow.

Before you begin, you’ll need:

  1. An Algebras account - Sign up here
  2. An API key - Create one here

CLI Quick Start

Perfect for developers who want to translate files locally and integrate with their build process.

API Quick Start

Ideal for developers building applications that need translation services programmatically.

The Algebras CLI is perfect for translating localization files in your project. Here’s how to get started:

Terminal window
pip install git+https://github.com/algebras-ai/algebras-cli.git
Terminal window
algebras init

This creates a .algebras.config file in your project root.

Terminal window
export ALGEBRAS_API_KEY=your_api_key_here
Terminal window
algebras add es fr de
Terminal window
algebras translate

🎉 Success! Your files are now translated. Check the generated language directories.

Make your first translation request in just a few lines of code:

Terminal window
export ALGEBRAS_API_KEY=your_api_key_here
Terminal window
curl -X POST "https://platform.algebras.ai/api/v1/translation/translate" \
-H "X-Api-Key: $ALGEBRAS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sourceLanguage": "auto",
"targetLanguage": "es",
"text": "Hello, world!"
}'

Response:

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": "¡Hola, mundo!"
}

🎉 Success! You’ve made your first translation!

Now that you have the basics working, explore these advanced features:

Solution: Run algebras init in your project directory.

”ALGEBRAS_API_KEY environment variable is not set”

Section titled “”ALGEBRAS_API_KEY environment variable is not set””

Solution: Export your API key: export ALGEBRAS_API_KEY=your_key

Solution: Add the language: algebras add xx

Solution: Check that your API key is correct and properly set in the X-Api-Key header.

Solutions:

  • Use --ui-safe flag for UI-constrained translations
  • Upload a glossary for consistent terminology
  • Use custom prompts for specific requirements

Ready to dive deeper? Check out our CLI documentation or API examples for more advanced usage patterns.