Text Translation API

Translate multiple texts between languages in a single request.

🟢 Endpoint

POST https://kubus.co.id/api/v1/text/translate/batch

Enable

🔐 Headers

Use your API key to authorize requests. Replace YOUR_API_KEY with your actual key.

                Authorization: Bearer YOUR_API_KEY
                Content-Type: application/json
            
Manage Your API Keys

📦 Request Body

Send a JSON object with a list of texts:


            {
            "source_language": "Indonesian",
            "target_language": "English",
            "texts": [
                "Apa kabar?",
                "Saya butuh bantuan dengan pesanan saya.",
                "Produk ini tidak sesuai dengan deskripsi."
            ]
            }

✅ Response

A successful request returns:


            {
            "results": [
                {
                "text": "Apa kabar?",
                "translation": "How are you?"
                },
                {
                "text": "Saya butuh bantuan dengan pesanan saya.",
                "translation": "I need help with my order."
                },
                {
                "text": "Produk ini tidak sesuai dengan deskripsi.",
                "translation": "This product does not match its description."
                }
            ],
            "status": "success"
            }
Notes
  • Supports various languages. Ensure language names are valid (e.g., English, Indonesian).
  • Maximum 10 texts per batch. Exceeding this will return an error.
  • Response will return original and translated text.
  • Ensure your API key is valid and not expired.