mnapis

准备拆书任务包

Body {topicid, bookmd5, segments[{startPage,endPage,title}](PDF 页序,非连续可,实际页数≤60), preset(book-breakdown|source-structure|exam-general|dictionary), anchorMode(page_text|block), title?, cardStyle{defaultFillIndex -1..2}?, async?}。>~10 页必 async:true(202 {jobId,bundleId,bundlePath,state:preparing} + 轮询 GET /bundles;参数错同步 404/422)。单飞(429 PREPARE_BUSY 看 details.runningJob/retryAfterSeconds)。exam-general 必须配 block(含 role 标注),否则静默退化;错配 0.18+ 回 warnings(停下改组合重 prepare)。同步小包阻塞到完工(curl ≥300s)。

POST
/bundles/prepare

Body {topicid, bookmd5, segments[{startPage,endPage,title}](PDF 页序,非连续可,实际页数≤60), preset(book-breakdown|source-structure|exam-general|dictionary), anchorMode(page_text|block), title?, cardStyle{defaultFillIndex -1..2}?, async?}。>~10 页必 async:true(202 {jobId,bundleId,bundlePath,state:preparing} + 轮询 GET /bundles;参数错同步 404/422)。单飞(429 PREPARE_BUSY 看 details.runningJob/retryAfterSeconds)。exam-general 必须配 block(含 role 标注),否则静默退化;错配 0.18+ 回 warnings(停下改组合重 prepare)。同步小包阻塞到完工(curl ≥300s)。

Authorization

bearerAuth
AuthorizationBearer <token>

安装脚本写入 ~/.config/mn-bridge/token,或环境变量 MN_BRIDGE_TOKEN。不要带 Origin 头。

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/bundles/prepare" \  -H "Content-Type: application/json" \  -d '{    "topicid": "string",    "bookmd5": "string",    "segments": [      {}    ]  }'
Empty