Classify Text Length
text.classify_text_length
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
Non-goals
- Does not rewrite or truncate text
- Does not guarantee current external platform limits
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
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.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | Bounded text whose length is classified. |
| profile | string | Yes | Length-budget profile. |
| customLimits | object | No | Closed custom threshold object with minChars and maxChars properties; omit it to use the limits selected by a built-in profile. |
| countMode | string | No | Classification unit; omit it for graphemes. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| ok | boolean | Yes | Always true for a successful classification. |
| classification | string | Yes | Length-budget verdict. |
| counts | object | Yes | Closed measurement object with bounded codePoints, graphemes, and utf8Bytes properties. |
| limits | object | Yes | Closed resolved-limit object with profile, minChars, maxChars, countMode, and optional optimalMax and profileVersion properties. |
| overflowBy | integer | Yes | Units beyond the maximum. This non-negative total is bounded by the documented input limit. |
API contract
POST /v1/executecurl -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"}}'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
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 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)
{
"skillKey": "text.classify_text_length",
"input": {
"profile": "seo_title",
"text": "My great page title"
}
}Examples
SEO title too short
{
"profile": "seo_title",
"text": "My great page title"
}{
"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
{
"profile": "sms",
"text": "Hi"
}{
"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
}
}Recommended use cases
- Validate SEO titles/descriptions
- Check SMS/social post length
Avoid for
- Exact platform compliance without passing customLimits
Related skills
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.