---
title: "Detect language"
method: POST
path: "/translate/v1/detect"
tags: ["Translation"]
---

# Detect language

`POST /translate/v1/detect`

Detect the language of text. Returns the most likely language code and confidence score. Supports batch detection for multiple texts.

## Request body

- object
  - `q` union, required — Text to detect language for. Can be a single string or an array for batch detection.
    - string
    - string[]

## Response `200`

Language detection successful

- object
  - `data` object
    - `detections` array[]
      - object[]
        - `language` string — Detected language code (ISO 639-1)
        - `confidence` number — Confidence score (0-1)
        - `isReliable` boolean — Whether the detection is reliable

## Other responses

- `400` — Invalid request - missing text
- `401` — Authentication failed - invalid API key
- `403` — Permission denied - API key lacks translation access

---

[API](https://skmtc.net/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.net/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casemark/case-dev-api/revisions/5b7e64e6d6f9/schema)
