---
title: "Detect language"
method: POST
path: "/v1/apple/nlp/language"
tags: ["Apple"]
---

# Detect language

`POST /v1/apple/nlp/language`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/apple/nlp/language`
- Auth: HTTP bearer

Identifies the dominant language of text with confidence scores.

## Request body

- object
  - `text` string, required: Input text to analyze
  - `max_hypotheses` integer

## Response `200`

Detected language

- object
  - `language` string, nullable
  - `confidence` number
  - `hypotheses` object[]
    - `language` string
    - `confidence` number

## Other responses

- `400`: Invalid request

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
