Use the FileToolz text tools from your own code.
Word and character counting, case conversion, and CSV conversion over plain HTTP. Keys are issued only to signed-in accounts, so every call runs as a real user.
401 invalid_api_key.
Quick start
Three steps, no SDK required.
- Sign in or create a FileToolz account.
- Open API keys and create a key. It is shown once โ store it somewhere safe.
- Send it on every request as
Authorization: Bearer <key>.
curl https://api.filetoolz.online/v1/word-count \
-H "Authorization: Bearer ftz_your_key_here" \
-H "Content-Type: application/json" \
-d '{"text":"Count the words in this sentence."}'
{
"ok": true,
"data": {
"characters": 33,
"charactersWithoutSpaces": 27,
"words": 6,
"lines": 1,
"paragraphs": 1
}
}
Authentication
Send the key either way; both are accepted.
| Header | Example |
|---|---|
| Authorization | Authorization: Bearer ftz_โฆ |
| x-api-key | x-api-key: ftz_โฆ |
Endpoints
Base URL https://api.filetoolz.online/v1. All responses are JSON with an ok flag; everything is POST apart from the health check. POST bodies accept JSON, or raw text/plain for the single-field endpoints.
Confirms a key works and returns the account it belongs to. Nothing is stored or changed.
curl https://api.filetoolz.online/v1/health \ -H "Authorization: Bearer ftz_your_key_here"
Counts characters, characters without spaces, words, lines and paragraphs. Words are split on whitespace; blank lines count as paragraphs separators, not paragraphs.
curl https://api.filetoolz.online/v1/word-count \
-H "Authorization: Bearer ftz_your_key_here" \
-H "Content-Type: application/json" \
-d '{"text":"Hello there."}'
Converts text to another case. Modes: upper, lower, title, sentence, slug. Defaults to upper.
curl https://api.filetoolz.online/v1/case-convert \
-H "Authorization: Bearer ftz_your_key_here" \
-H "Content-Type: application/json" \
-d '{"text":"hello world","case":"title"}'
Turns plain text into CSV. One line becomes one row; fields split on whitespace by default, or on the single character you pass as inputSeparator. Fields containing the output separator, quotes or newlines are quoted per RFC 4180.
curl https://api.filetoolz.online/v1/text-to-csv \
-H "Authorization: Bearer ftz_your_key_here" \
-H "Content-Type: application/json" \
-d '{"text":"a b c\nd e f","columns":["one","two","three"]}'
Parses CSV (quoted fields, doubled quotes, CRLF, newlines inside quotes) into tab-separated text, or into records with "format":"json".
curl https://api.filetoolz.online/v1/csv-to-text \
-H "Authorization: Bearer ftz_your_key_here" \
-H "Content-Type: application/json" \
-d '{"text":"name,role\n\"Doe, Jane\",\"writer\"","format":"json","header":true}'
Parameters
| Endpoint | Field | Meaning |
|---|---|---|
| word-count | text | Required. Up to 200,000 characters. |
| case-convert | text, case | Required text; optional mode, default upper. |
| text-to-csv | inputSeparator | whitespace (default), tab, or a single character. |
| text-to-csv | separator | Output column separator, default a comma. |
| text-to-csv | columns | Optional array of header names. |
| text-to-csv | eol | Row ending, \r\n (default) or \n. |
| csv-to-text | delimiter | Input delimiter, default a comma. |
| csv-to-text | outputSeparator | tab (default) or a single character. |
| csv-to-text | format, header | text (default) or json; header uses row 1 as keys. |
Errors
Failures use the same envelope, with ok: false and a machine-readable code.
{
"ok": false,
"error": {
"code": "invalid_api_key",
"message": "That API key is not valid or has been revoked."
}
}
| Status | Code | When |
|---|---|---|
| 400 | missing_field / invalid_field | A required field is missing or has the wrong type. |
| 400 | invalid_json | The JSON body could not be parsed. |
| 400 | empty_text | CSV input contained no data. |
| 401 | missing_api_key | No key was sent. |
| 401 | invalid_api_key | The key is unknown or has been revoked. |
| 405 | method_not_allowed | Wrong HTTP method for the endpoint. |
| 413 | payload_too_large / text_too_large | Body over 1 MB, or text over 200,000 characters. |
| 502 | auth_upstream_error | Key verification was temporarily unavailable. |
Need a tool that is not here yet? The file conversions (PDF, Word, images) still run in the browser at simtools.filetoolz.online.