Skip to main content

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

MicroSkills Reference

Classify Text Length

text.classify_text_length

ProductionBounded custom (Class B)Deterministicstrictfastv1.0.0
No network

Overview

You pass text and a channel profile; we measure length in code points, grapheme clusters, and UTF-8 bytes, then classify it as too_short, optimal, acceptable, or too_long against versioned built-in limits (SMS, SEO/meta, social) or your customLimits. Do not treat built-in thresholds as live platform guarantees — pass customLimits when exact compliance matters.

Length limits are grapheme- and byte-sensitive — naive character counts mislead you.

Reliability

STRICT and deterministic. Classification: too_short (< minChars), optimal (≤ optimalMax), acceptable (≤ maxChars), too_long (> maxChars). Built-in profile thresholds are versioned (2026-05) and echoed in output.limits — editorial guidance, not a live mirror of any platform. Input validation (not retryable): missing text or profile; text too long; invalid profile or countMode; customLimits missing when profile=custom.

Context footprint

Returns classification, counts, applied limits, and overflow. A successful call costs 1 execution credit.

When to use it

When you check whether text fits a channel's length budget before publishing.

When you need exact live platform limits — pass customLimits instead.

Scope

Note
Classifies text length against channel or custom limits with grapheme awareness.

Non-goals

  • Does not rewrite or truncate text
  • Does not guarantee current external platform limits

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysistext-processing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input195.3 KB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • 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.
  • The response does not contain submitted content.
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
textstringYesBounded text whose length is classified.
profilestringYesLength-budget profile.
customLimitsobjectNoClosed custom threshold object with minChars and maxChars properties; omit it to use the limits selected by a built-in profile.
countModestringNoClassification unit; omit it for graphemes.

Output schema

FieldTypeRequiredDescription
okbooleanYesAlways true for a successful classification.
classificationstringYesLength-budget verdict.
countsobjectYesClosed measurement object with bounded codePoints, graphemes, and utf8Bytes properties.
limitsobjectYesClosed resolved-limit object with profile, minChars, maxChars, countMode, and optional optimalMax and profileVersion properties.
overflowByintegerYesUnits beyond the maximum. This non-negative total is bounded by the documented input limit.

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.classify_text_length","input":{"text":"Hi","profile":"sms"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("text.classify_text_length", {"profile":"seo_title","text":"My great page title"});

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.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not rewrite or truncate text
  • Does not guarantee current external platform limits
  • Exact platform compliance without passing customLimits

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "text.classify_text_length",
  "input": {
    "profile": "seo_title",
    "text": "My great page title"
  }
}

Examples

SEO title too short

Inputjson
{
  "profile": "seo_title",
  "text": "My great page title"
}
Expected outputjson
{
  "ok": true,
  "classification": "too_short",
  "overflowBy": 0,
  "counts": {
    "graphemes": 19,
    "utf8Bytes": 19,
    "codePoints": 19
  },
  "limits": {
    "minChars": 30,
    "profileVersion": "2026-05",
    "profile": "seo_title",
    "optimalMax": 60,
    "countMode": "graphemes",
    "maxChars": 70
  }
}

SMS within budget

Inputjson
{
  "profile": "sms",
  "text": "Hi"
}
Expected outputjson
{
  "ok": true,
  "classification": "optimal",
  "overflowBy": 0,
  "counts": {
    "graphemes": 2,
    "utf8Bytes": 2,
    "codePoints": 2
  },
  "limits": {
    "minChars": 1,
    "profileVersion": "2026-05",
    "profile": "sms",
    "optimalMax": 160,
    "countMode": "graphemes",
    "maxChars": 160
  }
}
  • Validate SEO titles/descriptions
  • Check SMS/social post length

Avoid for

  • Exact platform compliance without passing customLimits

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

textanalysisvalidation