Summarize
Premium · 5 creditsSummarize text in paragraph, bullet, or TL;DR format with optional length limits and compression ratio reporting.
POST /api/summarize
Section titled “POST /api/summarize”Parameters
Section titled “Parameters”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | Yes | — | Text to summarize |
style | string | No | paragraph | paragraph, bullets, or tldr |
max_length | integer | No | 0 | Max summary length in words. 0 = no limit |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
summary | string | Generated summary |
style | string | Style used |
original_words | integer | Word count of the original |
summary_words | integer | Word count of the summary |
compression_ratio | number | Compression ratio (0.0–1.0) |
Examples
Section titled “Examples”Paragraph summary
Section titled “Paragraph summary”curl -X POST https://morso.dev/api/summarize \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "Morso is a developer toolkit API that provides a wide range of utilities. It includes text processing tools like hashing, encoding, and formatting. It also offers document conversion between formats like Markdown, HTML, and PDF. Image optimization, QR code generation, and DNS lookups round out the feature set. The API uses simple REST endpoints with JSON payloads and API key authentication."}'{ "summary": "Morso is a REST API offering developer utilities including text processing, document conversion, image optimization, QR codes, and DNS lookups, all accessed via JSON with API key auth.", "style": "paragraph", "original_words": 62, "summary_words": 27, "compression_ratio": 0.56}Bullet points
Section titled “Bullet points”curl -X POST https://morso.dev/api/summarize \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "The quarterly report shows revenue increased 15% year-over-year. Customer retention improved to 94%. Three new enterprise clients were onboarded. Engineering shipped the v2 API ahead of schedule. The main risk is increasing infrastructure costs, up 22% due to higher traffic.", "style": "bullets"}'{ "summary": "- Revenue up 15% YoY\n- Customer retention at 94%\n- 3 new enterprise clients\n- v2 API shipped ahead of schedule\n- Infrastructure costs up 22% (risk)", "style": "bullets", "original_words": 44, "summary_words": 25, "compression_ratio": 0.43}TL;DR with length limit
Section titled “TL;DR with length limit”curl -X POST https://morso.dev/api/summarize \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "A long article about software architecture...", "style": "tldr", "max_length": 20}'{ "summary": "TL;DR: Start with a monolith, extract services only when you have clear domain boundaries.", "style": "tldr", "original_words": 350, "summary_words": 15, "compression_ratio": 0.96}