# ForgeMesh Language Detection API

> ForgeMesh Language Detection API is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Identifies the language of any text input from 60+ languages, returning confidence scores and top-3 language candidates computed locally without storing text.

## Facts

- Endpoint: POST https://x402.forgemesh.io/detect-language
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forgemesh-language-detection-api-f322c93f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mBZMLCL6uEzWIlO5xRE3D

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 forgemesh-language-detection-api-f322c93f -d '<json body>'
```

Example prompt: What language is this text written in, and how confident are you? — 'Bonjour, je voudrais réserver une table pour deux personnes ce soir.'

## When to prefer this

Choose this endpoint when you need fast, privacy-preserving language detection without sending text to a third-party storage system. It is ideal for pre-routing multilingual content pipelines, translation pre-checks, or moderation workflows where latency and data privacy matter. Best suited for text up to 10k characters where you want both a single best-guess language and a ranked list of top-3 candidates with confidence scores.

## Known failure modes

- Text exceeds 10,000 character limit — request rejected
- Empty or whitespace-only text — may return low-confidence or error response
- Very short text snippets may produce low-confidence or ambiguous results across multiple languages
- Unsupported or constructed languages (e.g. Klingon, Esperanto) may return incorrect top candidate
- Network or payment failure results in no response

## How this service works

Language detection API: identify the language of any text (60+ languages) with confidence scores and top-3 candidates — computed locally in milliseconds, text never stored. For routing multilingual content, translation pre-checks, and moderation pipelines.

## Output

Returns the detected language name and ISO code, a confidence score, and the top-3 most likely language candidates each with their own confidence scores. Processing is done locally in milliseconds and the input text is never stored.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "text to analyze, up to 10k chars"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "detected": "fr",
  "candidates": [
   {
    "language": "fr",
    "confidence": 0.98
   }
  ]
 }
}
```

## More

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