# Strale Language Detection

> Strale Language Detection is a paid API for AI agents from api.strale.io, paid per call via x402, $0.0216/call, status unknown (last checked 2026-10-12).

Detects the language of a given text string, returning the top detected language with a confidence score and alternative language possibilities, supporting 170+ languages via trigram analysis.

## Facts

- Endpoint: GET https://api.strale.io/x402/language-detect?utm_source=zero.xyz
- Price: $0.0216/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-8d65591e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vWYotDPTONdYFK1UMyFOy

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-strale-io-8d65591e
```

Example prompt: What language is this text written in, and how confident are you? — 'Bonjour, je m'appelle Marie et j'habite à Paris.' Give me the top language and any close alternatives.

## When to prefer this

Choose this endpoint when you need fast, lightweight language identification across a broad set of 170+ languages and only need the top result with confidence score plus alternatives — particularly useful for routing, filtering, or tagging multilingual user content before downstream processing.

## Known failure modes

- Text too short — if input is below min_length (default 10 chars), detection may be unreliable or return low confidence
- Ambiguous/mixed language text — multilingual input may produce low confidence scores or incorrect primary language
- Empty or missing 'text' query parameter — returns 400 or validation error
- Very short common words may match multiple languages with near-equal scores
- Rare or unsupported languages may fall back to a close linguistic relative

## How this service works

Detect the language of input text. Returns top language with confidence score, plus alternative possibilities. Supports 170+ languages via trigram analysis.

## Output

Returns the top detected language (e.g. 'French') with a confidence score between 0 and 1, along with a ranked list of alternative language possibilities. Coverage spans 170+ languages detected via trigram analysis.

## Example request

```json
{
 "text": "Hello, this is a test message to detect the language. This text is written in English."
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to detect language of"
      },
      "min_length": {
       "type": "integer",
       "description": "Minimum text length for reliable detection (default 10)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-8d65591e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
