Count
Analyze text and return character, word, sentence, line, byte, and estimated token counts.
POST /api/count
Section titled “POST /api/count”Parameters
Section titled “Parameters”| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Text to analyze |
Response
Section titled “Response”| Field | Type | Description |
|---|---|---|
characters | integer | Total characters |
characters_no_spaces | integer | Characters excluding spaces |
words | integer | Word count |
sentences | integer | Sentence count |
lines | integer | Line count |
bytes | integer | Byte size |
token_estimate | integer | Estimated token count (bytes / 4) |
Example
Section titled “Example”curl -X POST https://morso.dev/api/count \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "Hello world. This is a test."}'{ "characters": 28, "characters_no_spaces": 23, "words": 6, "sentences": 2, "lines": 1, "bytes": 28, "token_estimate": 7}