
Text Squasher API
Content
Squeeze your text to fit character/word limits while preserving meaning. Perfect for LinkedIn messages, tweets, and other constrained formats.
Authentication
All API requests require a valid API key passed in the Authorization header as a Bearer token.
Rate Limit
30 requests per minute
Endpoints
1 endpoint available
Overview
The Text Squasher API uses AI to condense your text to fit specific character or word limits while preserving the core meaning. Perfect for social media posts, email subjects, and other constrained formats.
Built-in Templates
Pre-configured templates with optimal constraints:
- LinkedIn Message - Under 200 characters
- Tweet (X) - Under 280 characters
- Email Subject - Under 100 characters
- SMS Message - Under 160 characters
- News Headline - Under 70 characters
- Social Media Caption - Under 2200 characters
- Bio/Profile - Under 160 characters
- Custom - Define your own constraints
How It Works
The AI intelligently rewrites your text by:
- Removing redundant words and phrases
- Simplifying complex sentences
- Preserving key information and tone
- Adapting style to the target platform
Use Cases
- Social media post optimization
- Email subject line crafting
- Marketing copy condensation
- Character-limited form fields
- Meta description optimization
Endpoints
POST
/v1/tools/text-squasherCondense text to fit specific constraints
Request Body
Content-Type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
| text | string | Required | The original text to condense |
| constraints | string | Required | The constraints to apply (e.g., "under 280 characters", "max 50 words") |
| useCase | string | Optional | The target platform or use case for context-aware rewritingDefault: general |
| template | string Enum: linkedin, tweet, email, sms, headline, caption, bio, custom | Optional | Use a pre-configured template (overrides constraints and useCase) |
Response Example
{
"success": true,
"original": {
"text": "I wanted to reach out and introduce myself because I noticed that we both work in the technology sector and share similar interests in artificial intelligence and machine learning applications for business.",
"wordCount": 34,
"charCount": 203
},
"result": {
"text": "Hi! I noticed we both work in tech with shared interests in AI/ML for business. Would love to connect!",
"wordCount": 18,
"charCount": 102
}
}Error Codes
400
Invalid request body or missing required parameters401
Missing or invalid API key429
Rate limit exceeded500
Internal server errorCode Examples
# Squash text for a LinkedIn message
curl -X POST https://api.opentools.ca/v1/tools/text-squasher \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "I came across your profile and was impressed by your extensive experience in product management. I would love to connect and potentially discuss opportunities for collaboration in the future.",
"constraints": "under 200 characters",
"useCase": "LinkedIn Connection Message"
}'
# Use a template
curl -X POST https://api.opentools.ca/v1/tools/text-squasher \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Your long text here...", "template": "tweet"}'