Text Chunker
Split long text into bounded overlapping chunks with stable offsets and SHA-256 hashes for RAG and agent pipelines.
1 credit per call · $0.001 USDC with x402
Sample input
{
"text": "One two three four five six seven eight nine ten. One two three four five six seven eight nine ten. One two three four five six seven eight nine ten.",
"chunk_chars": 128,
"overlap_chars": 16
}Worked sample output
{
"ok": true,
"mode": "text_chunker",
"input_chars": 149,
"chunk_count": 2,
"chunk_chars": 128,
"overlap_chars": 16,
"chunks": [
{
"index": 0,
"start_utf16": 0,
"end_utf16": 127,
"text": "One two three four five six seven eight nine ten. One two three four five six seven eight nine ten. One two three four five six",
"sha256": "32885d3ed2faf9ef13427870eaa245ec1db41662193b7e82c54184d5f6562c59"
},
{
"index": 1,
"start_utf16": 111,
"end_utf16": 149,
"text": "ee four five six seven eight nine ten.",
"sha256": "cf7ed180f6a6e9beb991ae31adf3c8862553c393e7ae13745d7420cdabd337eb"
}
],
"truncated": false
}Worked example using published sample data only. Own-data execution is paid.
Connect in curl
Set BOUNTY_API_KEY privately after your payment is verified. Change the retry key for each new logical request.
curl 'https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/text-chunker' \
-H "Authorization: Bearer $BOUNTY_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: workflow-request-001' \
-H 'X-Max-Credits: 1' \
--data '{"text":"One two three four five six seven eight nine ten. One two three four five six seven eight nine ten. One two three four five six seven eight nine ten.","chunk_chars":128,"overlap_chars":16}'Connect in n8n
Download the inactive n8n template. Import it, configure the private Header Auth credential, inspect the sample and run it manually. A new execution creates a new billable request; there is no automatic schedule.
Use an HTTP POST to https://bounty-engineer-x402-prod.onrender.com/v1/prepaid/text-chunker. Send JSON and these headers; store the Bearer token as a private credential.
{
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR_PRIVATE_API_KEY",
"Content-Type": "application/json",
"Idempotency-Key": "UNIQUE_PER_LOGICAL_REQUEST",
"X-Max-Credits": "1"
},
"body": {
"text": "One two three four five six seven eight nine ten. One two three four five six seven eight nine ten. One two three four five six seven eight nine ten.",
"chunk_chars": 128,
"overlap_chars": 16
}
}Reuse a retry key only for the same input. Failed execution returns reserved credits. Full integration and recovery guide · Machine-readable recipe