# Foundry Language Detection

> Foundry Language Detection is a paid API for AI agents from minty-sprout.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-01).

Detects the language of any input text, returning the identified language with a confidence score and ranked alternative candidates.

## Facts

- Endpoint: POST https://minty-sprout.onrender.com/v1/language-detect?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/foundry-language-detection-0b0c1b74
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5-SzLGTK_8IW2tLkjSKQD

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 foundry-language-detection-0b0c1b74 -d '<json body>'
```

Example prompt: What language is this text written in: 'Bonjour, comment allez-vous aujourd'hui ?'

## When to prefer this

Choose this endpoint when you need fast, structured language identification with confidence scores and ranked alternatives — especially in preprocessing pipelines for translation, routing, or content moderation. It pairs naturally with the sibling translation endpoint on the same host. Prefer it over embedding-based approaches when you need an explicit ISO language code rather than a vector similarity result.

## Known failure modes

- Empty or whitespace-only input may return low confidence or ambiguous results
- Very short texts (single words) may produce low confidence scores with multiple competing candidates
- Highly mixed-language text may result in split probabilities across candidates
- Text exceeding 8000 characters will be rejected by the input schema
- Ambiguous scripts shared across languages (e.g. Latin script for many European languages) may yield lower confidence

## How this service works

Language detection: the language of a text with confidence and alternatives. Input: any text.

## Output

Returns a JSON object with the detected language code (e.g. 'fr'), the full language name (e.g. 'French'), a confidence score (0–1), and an ordered list of candidate languages each with their name, ISO code, and probability score.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "maxLength": 8000,
   "description": "Any text"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "language": "fr",
  "candidates": [
   {
    "name": "French",
    "language": "fr",
    "probability": 1
   }
  ],
  "confidence": 1,
  "language_name": "French"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/foundry-language-detection-0b0c1b74/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from minty-sprout.onrender.com](https://www.zero.xyz/host/minty-sprout.onrender.com/llms.txt)
