Skip to content

Languages

Retrieve a list of all supported languages for translation.

Endpoint: GET /translation/languages

Success Response (200)

Returns an object containing the list of supported languages:

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": [
{
"language": "en",
"name": "English"
},
{
"language": "de",
"name": "German"
}
]
}

Each language object contains:

  • language: Language code
  • name: Human-readable language name

Error Response (400)

Invalid request error structure:

{
"status": "error",
"timestamp": "2025-01-12T22:31:48.856Z",
"error": {
"message": "Invalid request parameters."
}
}
Terminal window
curl -X GET "https://platform.algebras.ai/api/v1/translation/languages" \
-H "X-Api-Key: your_api_key_here"

Detect the language of the provided text.

Endpoint: POST /translation/languages/detect

{
"text": "Hello, World! How are you today?"
}

Parameters:

  • text: Text to detect language from

Success Response (200)

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": {
"language": "en",
"confidence": 0.98
}
}
Terminal window
curl -X POST "https://platform.algebras.ai/api/v1/translation/languages/detect" \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, World! How are you today?"
}'