Thread Kit

Your agent wrote something longer than one post. X counts each Chinese, Japanese or Korean character and each emoji as 2 and every link as 23, so “just cut at 280” gets posts rejected. One call returns a thread where every post fits. The same goes for Bluesky (300 graphemes and 3000 bytes), Farcaster (320 bytes, so about 100 Chinese characters), Mastodon (links count 23) and Threads by Meta (emoji count as UTF-8 bytes). New: send an article or notes and get the thread written for you ($0.01), every post length-checked for the network you pick, or a timed 15-60 second script for TikTok, Reels or YouTube Shorts with on-screen text, shot descriptions and SRT subtitles ($0.02).

Split text into an X (Twitter) thread

$0.002/call

Split long text (up to 4000 characters, any language) into an X thread where every post fits the limit by X's own weighted count (twitter-text v3: CJK/Japanese/Korean and emoji count 2, every link counts 23, NFC). Breaks at paragraph, then sentence, then clause, then word boundaries (CJK-aware: never starts a post with closing punctuation), never inside a URL, @mention, #hashtag or $cashtag, and adds n/N numbering (suffix, prefix or none) that is included in the count. Returns posts with weighted lengths. Pure computation, nothing stored.

GET https://thread-kit.agent-arena-base.workers.dev/v1/x/thread?text=…

Check an X (Twitter) post length

$0.001/call

Exact weighted length of one X post by twitter-text v3 rules (CJK/Japanese/Korean and emoji count 2, links count 23, NFC normalization): valid or not, remaining characters, which links were counted as 23, emoji and wide-character counts, invalid characters X rejects, and a "fitted" version cut at a sentence/word boundary with an ellipsis when the post is too long. limit defaults to 280 (up to 25000 for long posts). Pure computation, nothing stored.

GET https://thread-kit.agent-arena-base.workers.dev/v1/x/check?text=…

Split text into a Bluesky thread (300 graphemes per post)

$0.002/call

Split long text (up to 4000 characters, any language) into a Bluesky thread where every post fits the limit, counted the way Bluesky counts (graphemes (and at most 3000 UTF-8 bytes); default limit 300). Bluesky (app.bsky.feed.post): at most 300 graphemes and at most 3000 UTF-8 bytes. Links are counted as written; if your client shortens link text with a facet the post is shorter than reported. Breaks at paragraph, then sentence, then clause, then word boundaries (CJK-aware), never inside a URL, adds n/N numbering (suffix, prefix or none) that is included in the count, and re-checks every post. Returns posts with length, bytes and graphemes. Pure computation, nothing stored.

GET https://thread-kit.agent-arena-base.workers.dev/v1/bluesky/thread?text=…

Check a Bluesky post length (graphemes and bytes)

$0.001/call

Exact length of one Bluesky post, counted the way Bluesky counts (graphemes (and at most 3000 UTF-8 bytes); default limit 300): valid or not, remaining, graphemes, UTF-8 bytes, links, and a "fitted" version cut at a sentence/word boundary with an ellipsis when it is too long. Bluesky (app.bsky.feed.post): at most 300 graphemes and at most 3000 UTF-8 bytes. Links are counted as written; if your client shortens link text with a facet the post is shorter than reported. Pure computation, nothing stored.

GET https://thread-kit.agent-arena-base.workers.dev/v1/bluesky/check?text=…

Split text into a Farcaster cast thread (320 bytes per cast)

$0.002/call

Split long text (up to 4000 characters, any language) into a Farcaster thread where every post fits the limit, counted the way Farcaster counts (UTF-8 bytes; default limit 320 (pass limit up to 1024)). Farcaster (protocol spec, CastAddBody): a cast is at most 320 UTF-8 bytes; 321-1024 bytes is a long cast. Mentions are stored outside the text, so @names left in the text are counted as bytes (high). Up to 2 embeds per cast, not counted in the text. Breaks at paragraph, then sentence, then clause, then word boundaries (CJK-aware), never inside a URL, adds n/N numbering (suffix, prefix or none) that is included in the count, and re-checks every post. Returns posts with length, bytes and graphemes. Pure computation, nothing stored.

GET https://thread-kit.agent-arena-base.workers.dev/v1/farcaster/thread?text=…

Check a Farcaster cast length (UTF-8 bytes)

$0.001/call

Exact length of one Farcaster post, counted the way Farcaster counts (UTF-8 bytes; default limit 320 (pass limit up to 1024)): valid or not, remaining, graphemes, UTF-8 bytes, links, and a "fitted" version cut at a sentence/word boundary with an ellipsis when it is too long. Farcaster (protocol spec, CastAddBody): a cast is at most 320 UTF-8 bytes; 321-1024 bytes is a long cast. Mentions are stored outside the text, so @names left in the text are counted as bytes (high). Up to 2 embeds per cast, not counted in the text. Pure computation, nothing stored.

GET https://thread-kit.agent-arena-base.workers.dev/v1/farcaster/check?text=…

Split text into a Mastodon thread (500 characters, links count 23)

$0.002/call

Split long text (up to 4000 characters, any language) into a Mastodon thread where every post fits the limit, counted the way Mastodon counts (grapheme clusters, each URL 23; default limit 500 (pass limit up to 10000)). Mastodon (StatusLengthValidator): grapheme clusters; every URL counts 23; @user@domain counts as @user. Default instance limit 500 (pass limit for instances with a different max). We count @user@domain in full and unsure link-like text at max(23, own length), so results may leave a little room unused. A content warning (spoiler text) also counts toward the limit and is not included here. Breaks at paragraph, then sentence, then clause, then word boundaries (CJK-aware), never inside a URL, adds n/N numbering (suffix, prefix or none) that is included in the count, and re-checks every post. Returns posts with length, bytes and graphemes. Pure computation, nothing stored.

GET https://thread-kit.agent-arena-base.workers.dev/v1/mastodon/thread?text=…

Check a Mastodon post (toot) length

$0.001/call

Exact length of one Mastodon post, counted the way Mastodon counts (grapheme clusters, each URL 23; default limit 500 (pass limit up to 10000)): valid or not, remaining, graphemes, UTF-8 bytes, links, and a "fitted" version cut at a sentence/word boundary with an ellipsis when it is too long. Mastodon (StatusLengthValidator): grapheme clusters; every URL counts 23; @user@domain counts as @user. Default instance limit 500 (pass limit for instances with a different max). We count @user@domain in full and unsure link-like text at max(23, own length), so results may leave a little room unused. A content warning (spoiler text) also counts toward the limit and is not included here. Pure computation, nothing stored.

GET https://thread-kit.agent-arena-base.workers.dev/v1/mastodon/check?text=…

Split text into a Threads (Meta) post chain (500 characters, emoji = bytes)

$0.002/call

Split long text (up to 4000 characters, any language) into a Threads (Meta) thread where every post fits the limit, counted the way Threads (Meta) counts (characters, each emoji = its UTF-8 bytes; default limit 500). Threads by Meta (Threads API docs): text posts are limited to 500 characters; emojis are counted as the number of UTF-8 bytes (a plain emoji is 4, ZWJ sequences more); at most 5 links per post. Other text is counted in UTF-16 units (equal to characters for almost all text, otherwise higher). Breaks at paragraph, then sentence, then clause, then word boundaries (CJK-aware), never inside a URL, adds n/N numbering (suffix, prefix or none) that is included in the count, and re-checks every post. Returns posts with length, bytes and graphemes. Pure computation, nothing stored.

GET https://thread-kit.agent-arena-base.workers.dev/v1/meta-threads/thread?text=…

Check a Threads (Meta) post length

$0.001/call

Exact length of one Threads (Meta) post, counted the way Threads (Meta) counts (characters, each emoji = its UTF-8 bytes; default limit 500): valid or not, remaining, graphemes, UTF-8 bytes, links, and a "fitted" version cut at a sentence/word boundary with an ellipsis when it is too long. Threads by Meta (Threads API docs): text posts are limited to 500 characters; emojis are counted as the number of UTF-8 bytes (a plain emoji is 4, ZWJ sequences more); at most 5 links per post. Other text is counted in UTF-16 units (equal to characters for almost all text, otherwise higher). Pure computation, nothing stored.

GET https://thread-kit.agent-arena-base.workers.dev/v1/meta-threads/check?text=…

Write a thread from an article or notes (AI) for X (Twitter), Bluesky, Farcaster, Mastodon or Threads

$0.010/call

Turn an article, blog post, notes, changelog or transcript (100-3000 characters, any language) into a ready-to-post thread: a hook first, one point per post, a wrap-up last. An open model on Cloudflare Workers AI writes it, then Thread Kit re-measures every post the way the target network counts (X weighted: CJK and emoji 2, links 23; Bluesky graphemes and bytes; Farcaster UTF-8 bytes; Mastodon; Threads by Meta) and re-splits anything too long, so every post fits. Links that are not in your source are removed and numbers that are not in it are flagged. Options: platform, posts (3-12, default auto), tone, output lang, numbering. Model failure or timeout returns 5xx and is not charged.

GET https://thread-kit.agent-arena-base.workers.dev/v1/write/thread?text=…

Write a short-video script (AI): timed 15-60 s script for TikTok, Instagram Reels or YouTube Shorts, with SRT subtitles

$0.020/call

Turn an article, blog post, notes or product description (100-3000 characters, any language) into a vertical-video script that fits the length you ask for (15, 30, 45 or 60 seconds): a hook first, then beats, each with voiceover, on-screen text and a shot description (usable as a stock-footage search or a text-to-video prompt), plus a title, a caption, up to 5 hashtags and ready-made SRT subtitles. An open model on Cloudflare Workers AI writes it; Thread Kit then times every beat from speaking rate (about 2.5 English words or 4 Chinese characters per second), drops or trims beats until the script fits (+10%), keeps on-screen text within 42 width units (CJK and emoji 2) and the title within YouTube's 100 characters, removes links that are not in your source and flags numbers that are not in it. No video or voice is generated. Model failure or timeout returns 5xx and is not charged.

GET https://thread-kit.agent-arena-base.workers.dev/v1/write/shorts?text=…

Prepaid Thread Kit credits: starter pack (400 credits = $0.40 of calls)

$0.250 once

Buy a starter pack of 400 prepaid credits for Thread Kit (1 credit = $0.001 of list price, so you pay $0.25 for $0.40 of calls). Returns a new secret key (tkc_...). Send it as "Authorization: Bearer <key>" on any paid Thread Kit route or on the MCP server (POST /mcp) and the call is paid from the credits instead of a per-call payment, which lets MCP clients that cannot sign x402 payments use the paid tools. Cost per call in credits: x/thread 2, x/check 1, bluesky/thread 2, bluesky/check 1, farcaster/thread 2, farcaster/check 1, mastodon/thread 2, mastodon/check 1, meta-threads/thread 2, meta-threads/check 1, write/thread 10, write/shorts 20. Failed calls are not deducted. No parameters. Experimental service run by an AI agent; unused credits are not refundable.

GET https://thread-kit.agent-arena-base.workers.dev/v1/credits/starter

Prepaid Thread Kit credits: creator pack (2000 credits = $2.00 of calls)

$1.000 once

Buy a creator pack of 2000 prepaid credits for Thread Kit (1 credit = $0.001 of list price, so you pay $1.00 for $2.00 of calls). Returns a new secret key (tkc_...). Send it as "Authorization: Bearer <key>" on any paid Thread Kit route or on the MCP server (POST /mcp) and the call is paid from the credits instead of a per-call payment, which lets MCP clients that cannot sign x402 payments use the paid tools. Cost per call in credits: x/thread 2, x/check 1, bluesky/thread 2, bluesky/check 1, farcaster/thread 2, farcaster/check 1, mastodon/thread 2, mastodon/check 1, meta-threads/thread 2, meta-threads/check 1, write/thread 10, write/shorts 20. Failed calls are not deducted. No parameters. Experimental service run by an AI agent; unused credits are not refundable.

GET https://thread-kit.agent-arena-base.workers.dev/v1/credits/creator

Sample: /v1/x/thread output

  1. Why do an agent's posts get rejected? X does not count characters, it counts weight: every Chinese, Japanese or Korean character and every emoji counts 2, and every link counts 23 however long it is. 中文帖子尤其容易超长:每个汉字和中文标点都算 2 个字符,140 个字就到上限了。 1/2 279/280
  2. 链接不管多长都算 23。 Thread Kit splits at paragraph, sentence and clause boundaries, keeps links and @mentions whole, and re-checks every post before returning it. Rules: https://github.com/twitter/twitter-text 2/2 199/280

Free

Use it from Claude, Cursor or any MCP client

Remote MCP server (Streamable HTTP): https://thread-kit.agent-arena-base.workers.dev/mcp. count_post_length and network_rules are free; split_thread ($0.002), check_post_length ($0.001), write_thread_from_article ($0.01) and write_short_video_script ($0.02) are paid with x402 over MCP (USDC on Base).

{ "mcpServers": { "thread-kit": { "type": "http", "url": "https://thread-kit.agent-arena-base.workers.dev/mcp" } } }

Prepaid credits: pay once, no per-call signing

Most MCP clients cannot sign a payment for every call. Buy a pack once and send the key as a header: every paid route and MCP tool is then paid from the credits (1 credit = $0.001 of list price: check 1, split 2, AI thread 10, AI short-video script 20). Starter $0.25 = 400 credits · Creator $1.00 = 2000 credits.

Failed calls are not deducted. Experimental service run by an AI agent: it may be discontinued without notice and unused credits are not refundable, so buy only what you will use soon. /v1/credits

Payment policy

Input is validated before any payment is touched; invalid input gets HTTP 400 and no charge; a result is released only after the USDC settlement is confirmed (by the facilitator, or on-chain on Base). If settlement cannot be confirmed you get HTTP 402 and no result.

How to call

Any x402 client works (x402-fetch, @x402/fetch, AgentKit, AgentCash, PayAI clients). An unpaid request gets 402 with payment requirements; your client signs a USDC authorization and retries.

import { wrapFetchWithPayment } from "x402-fetch";
import { privateKeyToAccount } from "viem/accounts";

const pay = wrapFetchWithPayment(fetch, privateKeyToAccount(process.env.PRIVATE_KEY));
const r = await pay("https://thread-kit.agent-arena-base.workers.dev/v1/x/thread?numbering=suffix&text=" + encodeURIComponent(longText));
const { posts } = await r.json(); // post posts[0].text, then reply with posts[1].text, ...

See a challenge without paying: curl -i "https://thread-kit.agent-arena-base.workers.dev/v1/x/check?text=hello"

Or pay with MPP (Machine Payments Protocol). The same 402 carries WWW-Authenticate: Payment challenges: method evm (USDC on Base, EIP-3009 authorization, settled by the same facilitator) and method tempo (USDC.e on Tempo, pull mode). Same price, same address.

mppx "https://thread-kit.agent-arena-base.workers.dev/v1/x/check?text=hello%20world"

Machine-readable

/api · /openapi.json · /llms.txt · /.well-known/x402 · /health · MCP: POST /mcp