单词搜索 API 参考
单词搜索: 本参考直接读取 API 共用注册表与输入契约中的模式、预设、格式和字段。
请求示例
curl -X POST https://puzzlegenio.com/api/v1/puzzles \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Idempotency-Key: task-000000000001' \
-H 'Content-Type: application/json' \
-d '{ "type": "wordsearch", "preset": "word-search-for-kids", "title": "Animal word search", "input": { "words": [ "CAT", "DOG", "LION", "TIGER" ] }, "options": { "gridSize": 10, "allowDiagonal": false } }'模式
normal
页面预设
浏览器导出格式
pdf · answer-pdf
导出格式取决于题目配置和账户套餐。创建响应中的 viewUrl 与 exportPageUrl 用于浏览器下载,不包含 PDF、PNG 或 STL 文件内容。发布时确定导出权限,再次发布时重新检查。
通用请求字段
| 字段 | 允许的值 | 必填 |
|---|---|---|
| preset | 文本 | 否 |
| mode | 文本 | 否 |
| locale | 任选其一; en | zh | es | de | fr | pt | it | id | ja | ko | 否 |
| contentLanguage | 任选其一; en | zh | es | de | fr | pt | it | id | ja | ko | 否 |
| title | 文本 | 是 |
| retentionDays | 数字; 整数 | 否 |
| appearance.fontFamily | 任选其一; sans | serif | handwriting | playful | mono | 否 |
| appearance.themeColor | 文本 | 否 |
| appearance.footerText | 文本; 最大 200 | 否 |
| appearance.borderStyle | 任选其一; solid | dashed | dotted | 否 |
| appearance.layoutMode | 任选其一; default | worksheet | 否 |
| appearance.pillTitle | 是/否 | 否 |
| appearance.showWorksheetHeader | 是/否 | 否 |
| appearance.outerBorder | 是/否 | 否 |
| appearance.wordListPosition | 任选其一; bottom | right | 否 |
| appearance.showGridLines | 是/否 | 否 |
| appearance.showDirectionIcons | 是/否 | 否 |
| appearance.answerStyle | 任选其一; highlight | circle | strikethrough | 否 |
| appearance.titleScale | 数字; 最小 0.5; 最大 3 | 否 |
| appearance.letterCase | 任选其一; uppercase | lowercase | 否 |
| export.paperSize | 任选其一; A3 | A4 | A4-landscape | A5 | B5 | Letter | Letter-landscape | Legal | Half-Letter | Tabloid | custom | 否 |
| export.widthMm | 数字; 最小 50; 最大 2000 | 否 |
| export.heightMm | 数字; 最小 50; 最大 2000 | 否 |
| export.unit | 任选其一; mm | cm | in | px | 否 |
| export.quality | 任选其一; standard | high | print | 否 |
| input.words | 列表; 最小 1; 最大 200 | 否 |
| input.words[] | 文本; 最小 2; 最大 30 | 否 |
| input.templateId | 文本; 最小 1; 最大 100 | 否 |
| options.seed | 数字; 整数; 最小 0; 最大 2147483647 | 否 |
| options.gridSize | 数字; 整数; 最小 5; 最大 30 | 否 |
| options.allowDiagonal | 是/否 | 否 |
| options.allowBackward | 是/否 | 否 |
| options.fillLettersOnly | 是/否 | 否 |
模板与主题
查询 /api/v1/capabilities 获取当前可用的模板编号、主题与账户限额。选择模板后创建的结果同样占一个保存名额。
图片与文件
图片输入使用本账户预先上传或导入的 assetId。下载在浏览器结果页进行;结果页链接并不是文件直链。
失败情形
未知字段、冲突的 type、mode 与 preset 返回 422。无法生成完整谜题的输入也返回 422。实际可用格式取决于配置和账户权益。
