---
title: "Detect language(s) in text"
method: POST
path: "/api/v1/languagelabs/language-detection"
tags: ["Language Detection"]
---

# Detect language(s) in text

`POST /api/v1/languagelabs/language-detection`

## Request

- Base URL: `/` (relative, and the document’s source URL is not known)
- URL: `/api/v1/languagelabs/language-detection`
- Auth: one of:
  - none
  - API key in header `K-Customer-ID`
  - none
  - none
  - none
  - HTTP bearer
  - none
  - none
- TypeScript: <https://skmtc.dev/olakrutrim/apis/object-storage-bucket-api/docs/api/v1/languagelabs/language-detection/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- object
  - `query` string, required: Input text to analyze.

## Response `200`

Detected languages with confidences.

- object
  - `status` string
  - `data` object[]
    - `label` string
    - `value` string

## Other responses

- `400`: Bad Request — Invalid request format or parameters.
- `401`: Unauthorized — Invalid or missing API key.
- `404`: Not Found — The requested resource was not found.
- `422`: Unprocessable Entity — Validation failed.
- `429`: Too Many Requests — Rate limit exceeded.
- `500`: Internal Server Error.
- `502`: Bad Gateway — Upstream service error.
- `503`: Service Unavailable — Try again later.

---

[API](https://skmtc.dev/olakrutrim/apis/object-storage-bucket-api.md) - [All operations](https://skmtc.dev/olakrutrim/apis/object-storage-bucket-api/llms.txt) - [OpenAPI document](https://skmtc.dev/olakrutrim/apis/object-storage-bucket-api/revisions/01a982e59414?raw)
