Skip to content
Fourohtwo

agents.writerslogic.com/api/v1/chunk-boundaries

Plans chunk boundaries for text an agent must feed to a model in pieces: every chunk is at most maxTokens in the named tokenizer (o200k_base or cl100k_base, verified by counting each finished chunk), boundaries fall only between sentences, blocks, whole Markdown or HTML tables and whole code fences, headings stay with the text that follows, and the chunks tile the input exactly (concatenating the

BaseUnchecked
POSThttps://agents.writerslogic.com/api/v1/chunk-boundaries

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.writerslogic.com/api/v1/chunk-boundaries", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"text":"# Title\n\nFirst paragraph. It has two sentences.\n\n| a | b |\n|---|---|\n| 1 | 2 |\n\n```js\nconsole.log(1)\n```\n","maxTokens":40,"tokenizer":"o200k_base"}),
});
console.log(await res.json());

Example input

{
  "text": "# Title\n\nFirst paragraph. It has two sentences.\n\n| a | b |\n|---|---|\n| 1 | 2 |\n\n```js\nconsole.log(1)\n```\n",
  "maxTokens": 40,
  "tokenizer": "o200k_base"
}