# Text Language Guesser

> Text Language Guesser is a paid API for AI agents from text-metrics.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-21).

Detects the language of a text snippet from 8 European languages and returns a ranked confidence score.

## Facts

- Endpoint: GET https://text-metrics.x402tookit.com/language-guess?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/text-language-guesser-54271e18
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7ppl9J9PQ_Y5MBaOpTA2o

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 text-language-guesser-54271e18
```

Example prompt: Can you figure out what language this text is written in and how confident you are? Here's the text: 'Le soleil se couche sur la mer, et les vagues murmurent doucement.'

## When to prefer this

Choose this endpoint when you need to classify text into one of 8 specific European languages (English, Spanish, French, German, Italian, Portuguese, Dutch, Swedish) with a confidence margin and ranked probabilities. It is best for short-to-medium text snippets (up to 3000 chars). Prefer it over generic NLP pipelines when you need a lightweight, pay-per-call language detection step without managing model infrastructure.

## Known failure modes

- Text too short to reliably detect (fewer than a sentence may return low confidence or degraded flag)
- Language not in the supported set of 8 returns no valid verdict
- Input text exceeds 3000 characters and is rejected
- Ambiguous bilingual or code-switched text may return low confidence scores across all candidates
- Network or payment failure returns no result

## How this service works

Guess whether text is English, Spanish, French, German, Italian, Portuguese, Dutch or Swedish, with a confidence margin.

## Output

Returns the top-guessed language name and code, a confidence level string, a ranked list of all candidate languages with numeric scores, a summary of the reasoning, an array of reason strings, word count analyzed, whether the result is degraded, and a disclaimer noting any limitations.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text, at least a sentence; up to 3000 characters"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "code": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "ranking": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "code": {
          "type": [
           "null",
           "string"
          ]
         },
         "score": {
          "type": [
           "null",
           "number"
          ]
         },
         "language": {
          "type": [
           "null",
           "string"
          ]
         }
        }
       }
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "language": {
       "type": [
        "null",
        "string"
       ]
      },
      "confidence": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "wordsAnalyzed": {
       "type": [
        "null",
        "number"
       ]
      }
     }
  
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/text-language-guesser-54271e18/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from text-metrics.x402tookit.com](https://www.zero.xyz/host/text-metrics.x402tookit.com/llms.txt)
