---
title: "Translate text via Azure Translator"
method: POST
path: "/api/lia/translate"
tags: ["Lia"]
---

# Translate text via Azure Translator

`POST /api/lia/translate`

## Request

- Base URL: `https://api.leapsurgebi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.leapsurgebi.com/api/lia/translate`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/token`
- TypeScript: <https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/docs/api/lia/translate/post.ts> (a function with typed inputs; its response is checked against the schema)

Translate text from one language to another.

Examples:
    {"text": "ಶುಭೋದಯ", "to": "en"}                       # auto-detect → English
    {"text": "Good morning", "from": "en", "to": "hi"}    # explicit

## Request body

- TranslateRequest
  - `text` string, required: Text to translate
  - `to` string: Target language code (e.g. 'en', 'hi', 'kn')
  - `from` string, nullable: Source language code (omit for auto-detect)

## Response `200`

Successful Response

- TranslateResponse
  - `translated_text` string, required
  - `detected_language` string, nullable
  - `confidence` number, nullable
  - `from_lang` string, nullable
  - `to_lang` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `23b42df3193a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/changes/api/lia/translate/post.md)

---

[API](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi.md) - [All operations](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/llms.txt) - [OpenAPI document](https://skmtc.dev/leapsurgebi/apis/leapsurgeapi/revisions/13653cb8ee76?raw)
