Member API

Member API for millisecond TOC processing

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.txt

Try it online

Paste TOC text to instantly see the extracted structure, detected style, validation issues, and correction result.

Paste TOC text

This trial analyzes text TOC structure; PDF / Word processing can be connected through the backend API.

Trial result

Strictly based on the input text. No invented headings.

11 ms

Style

Numeric numbered TOC

Rules

Language + number + indent

Hallucination

No new titles

  • L1Chapter 1 Overview
    p.1100%
    • L31.1 Product Positioning
      p.2100%
    • L31.2 Core Rules
      p.3100%
      • L41.2.1 Millisecond Processing
        p.4100%
    • L31.3 No Hallucination Output
      p.5100%
  • L1Chapter 3 API Access
    p.6100%
    • L33.1 Membership Activation
      p.7100%
    • L33.3 API Usage Quota
      p.8100%

API capabilities

One API can extract structure, detect style, validate issues, and correct TOC problems.

API

format=tree

Compact nested TOC tree with only the fields needed to rebuild the TOC, read the same-line remainder, and express hierarchy.

API

format=doc

Full document object with number breakdown, level order, scores, and per-entry anomalies.

API

format=check

Validates only whether sibling numbering increments by 1, returning gap, duplicate, and regress issues.

API

format=md / csv

Indented Markdown TOC, or a flat CSV table for manual review.

API

Millisecond latency

Suitable as a synchronous tool in LLM calling chains.

API

No-hallucination boundary

No LLM involved; the same input yields deterministic, reproducible output without inventing headings.

Query params and body

formattree / doc / md / csv / check, default tree
paragraphstrue / false, treat non-heading lines as paragraphs under their parent
prettytrue / false, pretty-print JSON (format=tree/doc)
lines / textBody: line array or whole text; text/plain and multipart upload also accepted
optionsParameter patch, e.g. headingThreshold, paragraphWord; merged field by field

Response example (format=tree)

[
  {
    "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.

Membership rule

API access requires membership. Each upgrade level costs 1,000 CNY and grants 100,000 API calls. Upgrade again for more quota.