Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Language Detector

text.detect_language

ProductionHeuristic (Class C)Deterministicbest-effortfastv1.0.0
File inputNo network

Overview

Detects the likely language of text using offline statistical analysis. Returns ISO 639-1 code, confidence score, alternatives, and reliability indicator. Accepts file input via file_ref — no need to extract file content first.

LLMs can guess languages but waste tokens and may hallucinate ISO codes. We return a confidence-scored, offline answer with zero reasoning overhead.

Reliability

BEST_EFFORT — deterministic on this deployment but statistical, not guaranteed correct. Lingua light mode; counts may shift after a library upgrade. Only the first 4096 characters are analyzed (_meta.truncated when longer). LANGUAGE_DETECTION_LOW_CONFIDENCE_LIGHT — trigger: you set requireReliable and the best score stayed under minConfidence, so we refuse to hand you a guess; retryable: not as-is, the same text scores the same; next: send more text, narrow candidateLanguages, lower minConfidence, or escalate to a fuller detector.

Context footprint

Accepts inline text up to 1,048,576 chars or file_ref (up to 2 MB). Upload files via POST /v1/files/upload before passing file_ref. A successful call costs 2 execution credits.

When to use it

Before routing text to language-specific processing when metadata is missing or untrusted. Works best with 120+ characters of natural text.

Do not use when the language is already known, when you need translation or encoding detection, or for very short single-word inputs.

Powered by Lingua, a highly accurate offline language-detection engine that classifies text locally without sending it anywhere.

Scope

Note
Detects the likely language of your text using offline statistical analysis (Lingua). Returns an ISO 639-1 code, confidence score, reliability flag, and ranked alternatives. Only the first 4096 characters are analyzed.

Non-goals

  • Does not translate text
  • Does not detect byte or character encoding
  • Does not identify writing script (Latin, Cyrillic, CJK)
  • Does not distinguish regional dialects (e.g. Brazilian vs European Portuguese)

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysistext-processing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call2 credits

File handling

Accepts file_refProduces file_refMax input1 MBMax file size1.9 MB

File limits

Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.

LimitValueLimited by
Maximum size per input file1.9 MiBSkill maximum

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify using a self-contained open-source component
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Self contained open source component
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • Output may reveal sensitive derived information
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
textstringNoBounded inline text source. Required unless file_ref is provided.
file_refstringNoTenant-scoped opaque text-file reference. Omit it to use the required inline text; never send both.
candidateLanguagesarrayNoBounded optional array of candidate ISO language codes; omit it to consider every supported language. The item shape is defined by the nested schema and the array contains from 0 through 100 items.
minConfidencenumberNoMinimum accepted confidence; omit it for zero.
maxAlternativesintegerNoAlternative-language cap; omit it for five.
requireReliablebooleanNoWhether an unreliable result is refused; omit it for false.

Output schema

FieldTypeRequiredDescription
languagestringYesDetected lowercase ISO language code.
confidencenumberYesDetector confidence score.
reliablebooleanYesWhether detector reliability meets the requested policy.
alternativesarrayYesBounded array of candidate receipts ordered by descending confidence. The item shape is defined by the nested schema and the array contains from 0 through 100 items.
_metaobjectYesClosed bounded-sampling receipt with sampleLength, originalLength, and truncated properties.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"text.detect_language","input":{"text":"The quick brown fox jumps over the lazy dog near the riverbank."}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("text.detect_language", {"text":"The quick brown fox jumps over the lazy dog near the riverbank."});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
LANGUAGE_DETECTION_LOW_CONFIDENCE_LIGHT412NoThe input is valid but cannot be processed as-is.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not translate text
  • Does not detect byte or character encoding
  • Does not identify writing script (Latin, Cyrillic, CJK)
  • Does not distinguish regional dialects (e.g. Brazilian vs European Portuguese)
  • Translating text between languages
  • Detecting file or byte-stream encoding
  • Classifying very short text (1–3 words) where statistical signal is weak
  • Script identification without language classification

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "text.detect_language",
  "input": {
    "text": "The quick brown fox jumps over the lazy dog near the riverbank."
  }
}

Examples

Detect English prose

Inputjson
{
  "text": "The quick brown fox jumps over the lazy dog near the riverbank."
}
Expected outputjson
{
  "language": "en",
  "_meta": {
    "originalLength": 63,
    "truncated": false,
    "sampleLength": 63
  },
  "confidence": 1,
  "reliable": true,
  "alternatives": [
    {
      "confidence": 1,
      "language": "en"
    },
    {
      "confidence": 0.8071,
      "language": "da"
    },
    {
      "confidence": 0.8045,
      "language": "tl"
    },
    {
      "confidence": 0.7994,
      "language": "cy"
    },
    {
      "confidence": 0.7947,
      "language": "yo"
    }
  ]
}

Restrict detection to candidate languages

Inputjson
{
  "candidateLanguages": [
    "fr",
    "es",
    "it"
  ],
  "text": "Bonjour le monde"
}
Expected outputjson
{
  "language": "fr",
  "_meta": {
    "originalLength": 16,
    "truncated": false,
    "sampleLength": 16
  },
  "confidence": 1,
  "reliable": true,
  "alternatives": [
    {
      "confidence": 1,
      "language": "fr"
    },
    {
      "confidence": 0.7004,
      "language": "it"
    },
    {
      "confidence": 0.6811,
      "language": "es"
    }
  ]
}
  • Route text to the correct language-specific pipeline
  • Select locale-aware formatting or segmentation rules
  • Validate declared language metadata against actual content

Avoid for

  • Translating text between languages
  • Detecting file or byte-stream encoding
  • Classifying very short text (1–3 words) where statistical signal is weak
  • Script identification without language classification

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

analysistext