Shorten text
A press release that has to fit a tweet, a product description fighting a 160-character limit, a paragraph that says in five sentences what it could say in two: the shorten text api exists for exactly those squeezes. It cuts words without cutting the point.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
The problem it's solving
Every content team eventually hits a hard character or word ceiling imposed by someone else: a marketplace listing field, an SMS gateway, a meta description, a print column. Manually trimming a paragraph down to size while keeping it coherent is slow and easy to botch; text.shorten automates that trim so the sentence still reads naturally at the shorter length instead of sounding hacked apart, and it does so without inventing a new claim just to fill space where a cut sentence used to be.
How the request flows
POST /text/shorten accepts your text, queues it, and returns a task_id right away since the endpoint is fully asynchronous. The engine identifies which words and clauses carry the actual meaning and which are padding, redundancy or filler, then produces a tighter version that preserves the core claims instead of just truncating the string at a character count. It works at the sentence level rather than the character level, which is why the result reads as an edit rather than a cutoff.
Compression is an old craft
Editors have been cutting copy to fit a column inch since the earliest newspapers, and headline writers have always worked under a stricter word budget than the story itself. This endpoint automates that same editorial instinct, so you don't need a human on standby every time a field somewhere has a character cap.
Getting the result back
Once the task completes, you're notified through a signed webhook, or you can retrieve the output from a signed link that remains valid for 24 hours. The response is plain shortened text, ready to paste directly into whatever field demanded the cut in the first place.
Fitting it into automated workflows
Because each call returns a task_id instead of blocking your request thread, text.shorten works well inside batch pipelines: shrink a catalog of five hundred product descriptions to fit a new template, or shorten a single article summary the instant it's published. It pairs naturally with expand or rewrite endpoints when content needs to flex between formats, and it plugs into the same webhook infrastructure you're likely already using for other tasks in the api.
What you can do with it
Marketplace listing limits
Trim a full product description down to the character cap a marketplace field enforces, without losing the key selling points.
Meta descriptions at scale
Shorten long article intros into meta descriptions that fit search result snippets across a whole content archive.
SMS and push notifications
Cut a paragraph-length update into a message short enough for an SMS gateway or push notification character limit.
Print or space-constrained layouts
Reduce copy to fit a fixed column width in a newsletter or print layout without a designer manually re-editing text.
FAQ
How much shorter can the shorten text api make my text?
It trims redundancy and filler while keeping the core meaning; the exact reduction depends on how much padding your original text has.
Is there a free tier?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
What does it cost?
$0.003 per request plus $0.0135 per 1,000 words processed, and only successful tasks are billed.
Am I charged for failed tasks?
No. Every task gets up to three automatic retries, and you're billed only on success; a persistent failure returns a clear error instead of a charge.
How do I retrieve results?
Through a signed webhook fired on completion, or a signed link valid for 24 hours if you prefer to poll.
Can I shorten a batch of texts at once?
Yes, submit as many POST /text/shorten calls as you need; each returns its own task_id so you can process large volumes in parallel.
Will it just truncate my text at a word count?
No, truncation cuts mid-thought; this endpoint rewrites for length, keeping sentences complete and the meaning intact.
Is my submitted text kept or used to train models?
It's retained only for the retention period needed to deliver your result, then deleted, and never used for training.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/text/shorten \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"…"}'const res = await fetch("https://api.kit.forhosting.com/text/shorten", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "…"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/text/shorten",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "…"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/text/shorten", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"…"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"…"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/text/shorten", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "…"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "text.shorten",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_tokens | 20000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
422 | task_failed | The task failed after 3 retries. You are never charged for it. |