Overview

The Translation API provides fast, accurate translation between more than 100 languages. Designed for developers looking to build multilingual applications without complex setup, our translation service allows you to integrate language capabilities with just a few lines of code.

  • Support for 100+ languages
  • High-quality translations with context awareness
  • Automatic language detection
  • Batch translation support (translate multiple strings at once)
  • Specialized vocabulary handling

API Endpoint

POST /v1/ai/translate

Quick Start

JavaScript
import { JigsawStack } from 'jigsawstack';

const jigsaw = new JigsawStack('your-api-key');

const response = await jigsaw.ai.translate({
  text: "Hello, how are you today?",
  target_language: "es"
});

console.log(response);

Response Example

{
  "success": true,
  "translated_text": "Hola, ¿cómo estás hoy?",
  "detected_language": "en"
}

Supported Languages

The Translation API supports over 100 languages. Here are some of the most commonly used:

CodeLanguageCodeLanguageCodeLanguage
arArabicfrFrenchptPortuguese
bnBengalideGermanruRussian
zhChinesehiHindiesSpanish
enEnglishjaJapaneseswSwahili
fiFinnishkoKoreantrTurkish

For a complete list of supported languages, please visit our Language Codes Reference.

Example

You can translate multiple strings at once by passing an array:

Batch Translation Example
const response = await jigsaw.ai.translate({
  text: [
    "Hello, how are you?",
    "What is your name?",
    "Welcome to our service!"
  ],
  target_language: "fr"
});

console.log(response);
// {
//   success: true,
//   translated_text: [
//     "Bonjour, comment allez-vous ?",
//     "Comment vous appelez-vous ?",
//     "Bienvenue dans notre service !"
//   ],
//   detected_language: "en"
// }