---
title: "Language Identification"
method: POST
path: "/text-lid"
tags: ["text"]
---

# Language Identification

`POST /text-lid`

Identifies the language (e.g., en-IN, hi-IN) and script (e.g., Latin, Devanagari) of the input text, supporting multiple languages.

## Headers

- `api-subscription-key` string, required

## Request body

- SarvamModelAPILanguageIdentificationRequest
  - `input` string, required — The text input for language and script identification. Max Input Limit is 1000 characters

## Response `200`

Successful Response

- SarvamModelAPILanguageIdentificationResponse
  - `request_id` string, nullable, required
  - `language_code` string, nullable — The detected language code of the input text. Available languages: - **`en-IN`**: English - **`hi-IN`**: Hindi - **`bn-IN`**: Bengali - **`gu-IN`**: Gujarati - **`kn-IN`**: Kannada - **`ml-IN`**: Malayalam - **`mr-IN`**: Marathi - **`od-IN`**: Odia - **`pa-IN`**: Punjabi - **`ta-IN`**: Tamil - **`te-IN`**: Telugu
  - `script_code` string, nullable — The detected script code of the input text. Available scripts: - **`Latn`**: Latin (Romanized script) - **`Deva`**: Devanagari (Hindi, Marathi) - **`Beng`**: Bengali - **`Gujr`**: Gujarati - **`Knda`**: Kannada - **`Mlym`**: Malayalam - **`Orya`**: Odia - **`Guru`**: Gurmukhi - **`Taml`**: Tamil - **`Telu`**: Telugu

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `422` — Unprocessable Entity
- `429` — Quota Exceeded
- `500` — Internal Server Error

---

[API](https://skmtc.dev/sarvam/apis/endpoints.md) · [All operations](https://skmtc.dev/sarvam/apis/endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sarvam/endpoints/revisions/2b7f7955b147/schema)
