Skip to main content
POST
/
tasks
/
language_id
Language Id
curl --request POST \
  --url https://api.sunbird.ai/tasks/language_id \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>"
}
'
{
  "language": "<string>"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json

Request model for language identification.

This model validates language identification requests with text input.

Attributes: text: The text to identify the language of (3-200 characters).

Example: >>> request = LanguageIdRequest(text="Oli otya?")

text
string
required

The text to identify the language of

Required string length: 3 - 200

Response

Successful Response

Response model for language identification.

This model represents the response from language identification operations.

Attributes: language: The identified language code (e.g., 'lug', 'eng', 'ach').

Example: >>> response = LanguageIdResponse(language="lug")

language
string
required

The identified language code