- Textese Compression: Converts text into aggressive textese abbreviations
- Token Reduction: Significantly reduces text length to save tokens in AI API calls
- Public API: Open REST API endpoint available on Vercel
- Serverless: Fast, scalable serverless function
- Modern UI: Clean, shadcn-inspired React interface
- No Authentication: Free to use, no API keys required
Textese is a form of written language that uses abbreviations and number substitutions to compress text, similar to SMS language. Examples:
greatโgr8mateโm8youโuareโrtodayโ2daytonightโ2nitelaugh out loudโloloh my godโomgto be honestโtbh
- AI Prompt Optimization: Reduce token usage in AI API calls
- Text Compression: Compress long messages while maintaining readability
- Cost Savings: Lower costs when using token-based AI services
- Character Limits: Fit more content in character-limited fields
Endpoint: https://sms-six-mocha.vercel.app/api/compress
Tip: Append
?format=toonto receive the response in TOON format for improved token efficiency.
curl -X POST https://sms-six-mocha.vercel.app/api/compress \
-H "Content-Type: application/json" \
-d '{"text": "Hello, how are you doing today?"}'Response:
{
"original": "Hello, how are you doing today?",
"compressed": "Hi, how r u doin 2day?",
"reduction": "25%"
}const response = await fetch('https://sms-six-mocha.vercel.app/api/compress?format=toon', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ text: 'Hello, how are you doing today?' })
});
const toon = await response.text();
console.log(toon);import requests
response = requests.post(
'https://sms-six-mocha.vercel.app/api/compress',
json={'text': 'Hello, how are you doing today?'}
)
print(response.json()['compressed']) # "Hi, how r u doin 2day?"- Node.js 18+
- npm or yarn
- Clone the repository:
git clone https://github.com/yourusername/textese-compressor.git
cd textese-compressor- Install dependencies:
# Frontend
cd frontend
npm install
# Backend (optional, for local testing)
cd ../backend
npm install- Run the frontend:
cd frontend
npm run dev- Run the backend locally (optional):
cd backend
npm start- Install Vercel CLI:
npm i -g vercel- Login and deploy:
vercel login
vercel --prodSee DEPLOYMENT.md for detailed instructions.
textese-compressor/
โโโ api/ # Vercel serverless functions
โ โโโ compress.js # Main compression endpoint
โ โโโ index.js # API info endpoint
โโโ frontend/ # React application
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โโโ services/ # API client
โ โ โโโ App.jsx # Main app component
โ โโโ package.json
โโโ lib/ # Shared utilities
โ โโโ compressor.js # Compression logic
โโโ backend/ # Express server (optional)
โโโ .github/ # GitHub templates
โโโ LICENSE # MIT License
โโโ CONTRIBUTING.md # Contribution guidelines
โโโ README.md # This file
Contributions are welcome! Please read our Contributing Guide for details on:
- Code of conduct
- How to submit bug reports
- How to suggest features
- How to submit pull requests
To add new textese abbreviations, edit lib/compressor.js:
const abbreviations = {
// Add your abbreviations here (longest first)
'your phrase': 'abbrev',
// ...
};Compresses text into textese format.
Request:
{
"text": "Your text here"
}Response:
{
"original": "Your text here",
"compressed": "Ur txt hr",
"reduction": "30%"
}Status Codes:
200- Success400- Bad Request (invalid input)405- Method Not Allowed500- Internal Server Error
Returns API information and usage examples.
- Some abbreviations may not compress as expected
- Very short words are preserved to maintain readability
- Add more abbreviation patterns
- Support for multiple languages
- Compression level options (aggressive vs moderate)
- Batch compression endpoint
- Compression statistics and analytics
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project useful, please consider giving it a star!
Made with โค๏ธ by the open source community