Skip to main content

Tool Chain Endpoint

Run a pipeline of text transformations in a single request. Chain processors like base64-encode, uppercase, sha256, find-replace, and 30+ more.

Chain Request​

POST /api/v1/tool-chain

Parameters​

NameTypeRequiredDescription
inputstringYesInput text for the chain
stepsarrayYesArray of { processorId, options? }. Max 20 steps.

Example​

curl -X POST https://www.toolbox-kit.com/api/v1/tool-chain \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"input": "Hello World", "steps": [{"processorId": "uppercase"}, {"processorId": "base64-encode"}]}'
{
"result": "SEVMTE8gV09STEQ=",
"steps": [
{ "step": 1, "processorId": "uppercase", "output": "HELLO WORLD" },
{ "step": 2, "processorId": "base64-encode", "output": "SEVMTE8gV09STEQ=" }
]
}

Available Processors​

Encoding​

Processor IDDescription
base64-encodeEncode text to Base64
base64-decodeDecode Base64 to text
url-encodeURL-encode text
url-decodeURL-decode text
html-encodeEncode HTML entities
html-decodeDecode HTML entities

Case Conversion​

Processor IDDescription
uppercaseConvert to UPPERCASE
lowercaseConvert to lowercase
title-caseConvert to Title Case
camel-caseConvert to camelCase
pascal-caseConvert to PascalCase
snake-caseConvert to snake_case
kebab-caseConvert to kebab-case
constant-caseConvert to CONSTANT_CASE

Formatting​

Processor IDDescription
json-prettifyPretty-print JSON
json-minifyMinify JSON
trimTrim whitespace
remove-blank-linesRemove empty lines
sort-linesSort lines alphabetically
reverse-linesReverse line order
unique-linesRemove duplicate lines

Transform​

Processor IDDescription
reverseReverse the string
rot13Apply ROT13 cipher
number-linesAdd line numbers

Manipulate​

Processor IDDescription
find-replaceFind and replace text (requires options.find and options.replace)
prefixAdd prefix to each line (requires options.prefix)
suffixAdd suffix to each line (requires options.suffix)
wrap-linesWrap each line (requires options.before and options.after)
join-linesJoin all lines with separator (requires options.separator)

Hashing​

Processor IDDescription
sha1Generate SHA-1 hash
sha256Generate SHA-256 hash
sha512Generate SHA-512 hash

Chaining with Options​

Some processors accept options. Pass them in the step object:

{
"input": "Hello World\nFoo Bar",
"steps": [
{ "processorId": "uppercase" },
{ "processorId": "find-replace", "options": { "find": "WORLD", "replace": "EARTH" } },
{ "processorId": "prefix", "options": { "prefix": "> " } }
]
}