# NetIntel Language Detection

> NetIntel Language Detection is a paid API for AI agents from netintel-production-440c.up.railway.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Detects the language of a text input using character frequency analysis and n-gram pattern matching, returning the detected language name, ISO code, confidence score, and top alternative candidates.

## Facts

- Endpoint: POST https://netintel-production-440c.up.railway.app/lang-detect/analyze
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/netintel-production-440c-up-railway-app-3cae094a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_af5HB6HUd4JRK_fgf1s6H

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 netintel-production-440c-up-railway-app-3cae094a -d '<json body>'
```

Example prompt: What language is this text written in, and how confident are you? — 'Bonjour, je m'appelle Marie et je travaille à Paris.'

## When to prefer this

Choose this endpoint when you need lightweight, low-cost language detection without a paid NLP platform dependency. Ideal for routing multilingual content, pre-filtering before translation, or classifying user-submitted text in pipelines where cost per call matters. The confidence score and alternative candidates make it suitable for downstream decision logic.

## Known failure modes

- Text too short for reliable detection — low confidence score returned
- Mixed-language or code-switched text may yield low confidence or wrong top language
- Constructed or nonsense text returns low confidence with unreliable language assignment
- Empty or whitespace-only input returns a validation error
- Very short strings like single words may match multiple languages with near-equal confidence

## How this service works

Detect the language of any text input using character frequency analysis and n-gram pattern matching — returns the detected language, ISO code, confidence score, and top alternative languages so agents can route multilingual content, trigger translation workflows, and classify text without a paid NLP API.

## Output

Returns the detected language (e.g. 'French'), its ISO 639 code (e.g. 'fr'), a confidence score between 0 and 1, and a ranked list of top alternative language candidates with their own scores — enough to route or filter multilingual content reliably.

## Example request

```json
{
 "input": {
  "body": {
   "text": "Hello, this is a test message to detect the language. The quick brown fox jumps over the lazy dog."
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to detect the language of (1-10000 characters)"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "grade": {
       "type": "string"
      },
      "score": {
       "type": "number"
      },
      "script": {
       "type": "string"
      },
      "findings": {
       "type": "array"
      },
      "confidence": {
       "type": "string"
      },
      "word_count": {
       "type": "number"
      },
      "text_length": {
       "type": "number"
      },
      "alternatives": {
       "type": "array"
      },
      "language_code": {
       "type": "string"
      },
      "is_multilingual": {
       "type": "boolean"
      },
      "detected_language": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "grade": "A",
  "score": 100,
  "script": "Latin",
  "findings": [],
  "confidence": "high",
  "word_count": 41,
  "text_length": 214,
  "alternatives": [
   {
    "code": "pl",
    "score": 0.05,
    "language": "Polish"
   },
   {
    "code": "cs",
    "score": 0.05,
    "language": "Czech"
   },
   {
    "code": "pt",
    "score": 0.02,
    "language": "Portuguese"
   }
  ],
  "language_code": "en",
  "is_multilingual": false,
  "detected_language": "English"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/netintel-production-440c-up-railway-app-3cae094a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from netintel-production-440c.up.railway.app](https://www.zero.xyz/host/netintel-production-440c.up.railway.app/llms.txt)
