← Catalog

Language detect

text · proxy · https://text-language-detect.fatstack.net/mcp

$0.0005
per call, USDC

Detects the language of a text sample and returns ranked ISO 639-3 candidates with confidence. Runs locally on n-gram models; no external service sees your text.

Payments are final. No refunds. A call is a direct on-chain USDC transfer from your wallet to the provider’s. Once settled, nobody — including Fatstack — can reverse it.

Measured performance, last 7 days

From on-chain payments and uptime probes. Never self-reported; there are no reviews.

Volume
Calls
Uptime
Error rate

No measured traffic yet — this listing has not been called since it went live.

Schema

Request

{
  "type": "object",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "type": "string",
      "maxLength": 100000
    },
    "topN": {
      "type": "integer",
      "default": 3,
      "maximum": 10
    },
    "minLength": {
      "type": "integer",
      "default": 10,
      "description": "Below this, detection is refused."
    }
  },
  "additionalProperties": false
}

Response

{
  "type": "object",
  "required": [
    "language",
    "candidates"
  ],
  "properties": {
    "language": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 639-3, or null when undetermined."
    },
    "candidates": {
      "type": "array"
    }
  },
  "additionalProperties": false
}

Call it

payFetch (TypeScript)

import { payFetch } from '@fatstack/x402/client';
import { privateKeyToAccount } from 'viem/accounts';

const res = await payFetch('https://text-language-detect.fatstack.net/mcp', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({ /* see the request schema */ }),
}, {
  wallet: privateKeyToAccount(process.env.AGENT_PRIVATE_KEY),
  guards: { maxPerCall: 0.01, maxPerDay: 1, allowedHosts: ['fatstack.net'] },
});

console.log(await res.json());

curl

# 1. Ask for the resource. You get a 402 with the price and where to pay.
curl -i -X POST 'https://text-language-detect.fatstack.net/mcp' \
  -H 'content-type: application/json' \
  -d '{ }'

# 2. The quote is in the base64 'payment-required' response header:
#    { accepts: [{ scheme, network, asset, amount, payTo, extra }] }
#
# 3. Signing the USDC authorisation needs a wallet, which curl cannot do.
#    Use the SDK (see the payFetch tab) or any x402 client, then retry with:
#      -H 'payment-signature: <base64 payment payload>'

Try it

Runs on Base Sepolia with a Fatstack-funded test wallet. Test USDC only — no real money moves. Capped at $0.05 per day per IP.