format=tree
Compact nested TOC tree with only the fields needed to rebuild the TOC, read the same-line remainder, and express hierarchy.
Member API
Use SUPTOC as a deterministic auxiliary tool for LLM products. API access requires membership; each 1,000 CNY membership level grants 100,000 API calls.
curl -X POST "https://api.suptoc.com/api/v1/toc?format=tree" \
-H "Content-Type: text/plain; charset=utf-8" \
--data-binary @doc.txtPaste TOC text to instantly see the extracted structure, detected style, validation issues, and correction result.
This trial analyzes text TOC structure; PDF / Word processing can be connected through the backend API.
Strictly based on the input text. No invented headings.
Style
Numeric numbered TOC
Rules
Language + number + indent
Hallucination
No new titles
One API can extract structure, detect style, validate issues, and correct TOC problems.
Compact nested TOC tree with only the fields needed to rebuild the TOC, read the same-line remainder, and express hierarchy.
Full document object with number breakdown, level order, scores, and per-entry anomalies.
Validates only whether sibling numbering increments by 1, returning gap, duplicate, and regress issues.
Indented Markdown TOC, or a flat CSV table for manual review.
Suitable as a synchronous tool in LLM calling chains.
No LLM involved; the same input yields deterministic, reproducible output without inventing headings.
formattree / doc / md / csv / check, default treeparagraphstrue / false, treat non-heading lines as paragraphs under their parentprettytrue / false, pretty-print JSON (format=tree/doc)lines / textBody: line array or whole text; text/plain and multipart upload also acceptedoptionsParameter patch, e.g. headingThreshold, paragraphWord; merged field by field[
{
"label": "第一章",
"title": "总则",
"level": 1,
"startLine": 1,
"endLine": 5,
"children": [
{
"label": "第一条",
"title": "为规范市场秩序,制定本办法",
"level": 2,
"startLine": 2,
"endLine": 5,
"children": []
},
{
"label": "(二)",
"title": "专项检查",
"rest": ";由监督检查部门每季度组织一次。",
"level": 3,
"startLine": 4,
"endLine": 5,
"children": []
}
]
}
]format=tree returns only 8 fields: label, title, shortName, rest, level, startLine, endLine, children. title may be empty — render shortName instead. Errors return {"error":"reason"} with status 400 / 404 / 413 / 500.
API access requires membership. Each upgrade level costs 1,000 CNY and grants 100,000 API calls. Upgrade again for more quota.