{
"type": "sudoku",
"seed": 42,
"difficulty": "hard",
"clues": 28,
"uniqueSolution": true,
"puzzle": [
[
0,
0,
4,
0,
0,
2,
0,
3,
1
],
[
1,
6,
0,
0,
0,
0,
9,
0,
2
],
[
0,
0,
0,
0,
0,
4,
0,
0,
0
],
[
9,
7,
3,
0,
0,
0,
0,
0,
0
],
[
2,
0,
0,
6,
0,
9,
0,
0,
7
],
[
0,
0,
0,
0,
0,
0,
3,
8,
9
],
[
0,
0,
0,
5,
0,
0,
0,
0,
0
],
[
4,
0,
9,
0,
0,
0,
0,
7,
8
],
[
7,
3,
0,
2,
0,
0,
5,
0,
0
]
],
"solution": [
[
5,
8,
4,
9,
6,
2,
7,
3,
1
],
[
1,
6,
7,
8,
5,
3,
9,
4,
2
],
[
3,
9,
2,
1,
7,
4,
8,
6,
5
],
[
9,
7,
3,
4,
8,
5,
1,
2,
6
],
[
2,
1,
8,
6,
3,
9,
4,
5,
7
],
[
6,
4,
5,
7,
2,
1,
3,
8,
9
],
[
8,
2,
1,
5,
4,
7,
6,
9,
3
],
[
4,
5,
9,
3,
1,
6,
2,
7,
8
],
[
7,
3,
6,
2,
9,
8,
5,
1,
4
]
],
"puzzleString": "..4..2.3116....9.2.....4...973......2..6.9..7......389...5.....4.9....7873.2..5..",
"solutionString": "584962731167853942392174865973485126218639457645721389821547693459316278736298514"
}
curl --location --request GET 'https://zylalabs.com/api/14591/sudoku+and+maze+generator+api/37394/sudoku+with+exactly+one+solution?difficulty=hard&seed=42&svg=false&format=json&answers=false' --header 'Authorization: Bearer YOUR_API_KEY'
{
"type": "sudoku-solve",
"valid": true,
"solvable": true,
"uniqueSolution": true,
"solutionCount": 1,
"clues": 30,
"conflicts": [],
"solution": [
[
5,
3,
4,
6,
7,
8,
9,
1,
2
],
[
6,
7,
2,
1,
9,
5,
3,
4,
8
],
[
1,
9,
8,
3,
4,
2,
5,
6,
7
],
[
8,
5,
9,
7,
6,
1,
4,
2,
3
],
[
4,
2,
6,
8,
5,
3,
7,
9,
1
],
[
7,
1,
3,
9,
2,
4,
8,
5,
6
],
[
9,
6,
1,
5,
3,
7,
2,
8,
4
],
[
2,
8,
7,
4,
1,
9,
6,
3,
5
],
[
3,
4,
5,
2,
8,
6,
1,
7,
9
]
],
"solutionString": "534678912672195348198342567859761423426853791713924856961537284287419635345286179",
"rating": {
"level": "easy",
"techniques": {
"naked_single": 30,
"full_house": 21
},
"solvedByLogic": true
}
}
curl --location --request GET 'https://zylalabs.com/api/14591/sudoku+and+maze+generator+api/37395/solve+a+sudoku+and+check+it+has+one+solution?grid=530070000600195000098000060800060003400803001700020006060000280000419005000080079&svg=false&format=json' --header 'Authorization: Bearer YOUR_API_KEY'
{
"type": "sudoku-hint",
"solved": false,
"uniqueSolution": true,
"mistakes": [],
"hint": {
"technique": "hidden_single",
"name": "Hidden single",
"level": "medium",
"placement": {
"row": 0,
"col": 5,
"cell": "R1C6",
"digit": 8
},
"unit": {
"kind": "box",
"index": 1,
"name": "box 2"
},
"explanation": "In box 2, 8 fits only in R1C6."
},
"steps": [
{
"technique": "hidden_single",
"name": "Hidden single",
"level": "medium",
"placement": {
"row": 0,
"col": 5,
"cell": "R1C6",
"digit": 8
},
"unit": {
"kind": "box",
"index": 1,
"name": "box 2"
},
"explanation": "In box 2, 8 fits only in R1C6."
}
],
"stuck": false
}
curl --location --request GET 'https://zylalabs.com/api/14591/sudoku+and+maze+generator+api/37396/next+logical+step+named+and+explained?grid=530070000600195000098000060800060003400803001700020006060000280000419005000080079&candidates=false' --header 'Authorization: Bearer YOUR_API_KEY'
{
"type": "nonogram",
"seed": 42,
"width": 10,
"height": 8,
"density": "medium",
"uniqueSolution": true,
"lineSolvable": true,
"linePasses": 4,
"rows": [
[
3,
1
],
[
1,
4,
2
],
[
7
],
[
10
],
[
2,
5
],
[
3,
4
],
[
3,
1
],
[
4
]
],
"cols": [
[
1,
5
],
[
5
],
[
1,
3
],
[
3,
1
],
[
4
],
[
5
],
[
6
],
[
4
],
[
5
],
[
7
]
],
"solution": [
[
0,
0,
0,
0,
1,
1,
1,
0,
0,
1
],
[
1,
0,
0,
1,
1,
1,
1,
0,
1,
1
],
[
0,
0,
0,
1,
1,
1,
1,
1,
1,
1
],
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
],
[
1,
1,
0,
0,
0,
1,
1,
1,
1,
1
],
[
1,
1,
1,
0,
0,
0,
1,
1,
1,
1
],
[
1,
1,
1,
0,
0,
0,
0,
0,
0,
1
],
[
1,
1,
1,
1,
0,
0,
0,
0,
0,
0
]
],
"solutionStrings": [
"....###..#",
"#..####.##",
"...#######",
"##########",
"##...#####",
"###...####",
"###......#",
"####......"
],
"filled": 50
}
curl --location --request GET 'https://zylalabs.com/api/14591/sudoku+and+maze+generator+api/37397/nonogram+picture+logic+with+exactly+one+solution?w=10&h=8&density=medium&seed=42&svg=false&format=json&answers=false' --header 'Authorization: Bearer YOUR_API_KEY'
{
"type": "kakuro",
"seed": 42,
"size": "small",
"width": 7,
"height": 7,
"uniqueSolution": true,
"layout": [
"#######",
"###...#",
"##....#",
"#...###",
"#..####",
"#...###",
"##..###"
],
"whiteSquares": 17,
"clues": [
{
"row": 0,
"col": 3,
"across": null,
"down": 6
},
{
"row": 0,
"col": 4,
"across": null,
"down": 4
},
{
"row": 0,
"col": 5,
"across": null,
"down": 5
},
{
"row": 1,
"col": 2,
"across": 8,
"down": 33
},
{
"row": 2,
"col": 1,
"across": 11,
"down": 13
},
{
"row": 3,
"col": 0,
"across": 16,
"down": null
},
{
"row": 4,
"col": 0,
"across": 14,
"down": null
},
{
"row": 4,
"col": 3,
"across": null,
"down": 11
},
{
"row": 5,
"col": 0,
"across": 7,
"down": null
},
{
"row": 6,
"col": 1,
"across": 16,
"down": null
}
],
"runs": [
{
"direction": "across",
"sum": 8,
"length": 3,
"clue": {
"row": 1,
"col": 2
},
"cells": [
[
1,
3
],
[
1,
4
],
[
1,
5
]
]
},
{
"direction": "across",
"sum": 11,
"length": 4,
"clue": {
"row": 2,
"col": 1
},
"cells": [
[
2,
2
],
[
2,
3
],
[
2,
4
],
[
2,
5
]
]
},
{
"direction": "across",
"sum": 16,
"length": 3,
"clue": {
"row": 3,
"col": 0
},
"cells": [
[
3,
1
],
[
3,
2
],
[
3,
3
]
]
},
{
"direction": "across",
"sum": 14,
"length": 2,
"clue": {
"row": 4,
"col": 0
},
"cells": [
[
4,
1
],
[
4,
2
]
]
},
{
"direction": "across",
"sum": 7,
"length": 3,
"clue": {
"row": 5,
"col": 0
},
"cells": [
[
5,
1
],
[
5,
2
],
[
5,
3
]
]
},
{
"direction": "across",
"sum": 16,
"length": 2,
"clue": {
"row": 6,
"col": 1
},
"cells": [
[
6,
2
],
[
6,
3
]
]
},
{
"direction": "down",
"sum": 13,
"length": 3,
"clue": {
"row": 2,
"col": 1
},
"cells": [
[
3,
1
],
[
4,
1
],
[
5,
1
]
]
},
{
"direction": "down",
"sum": 33,
"length": 5,
"clue": {
"row": 1,
"col": 2
},
"cells": [
[
2,
2
],
[
3,
2
],
[
4,
2
],
[
5,
2
],
[
6,
2
]
]
},
{
"direction": "down",
"sum": 6,
"length": 3,
"clue": {
"row": 0,
"col": 3
},
"cells": [
[
1,
3
],
[
2,
3
],
[
3,
3
]
]
},
{
"direction": "down",
"sum": 11,
"length": 2,
"clue": {
"row": 4,
"col": 3
},
"cells": [
[
5,
3
],
[
6,
3
]
]
},
{
"direction": "down",
"sum": 4,
"length": 2,
"clue": {
"row": 0,
"col": 4
},
"cells": [
[
1,
4
],
[
2,
4
]
]
},
{
"direction": "down",
"sum": 5,
"length": 2,
"clue": {
"row": 0,
"col": 5
},
"cells": [
[
1,
5
],
[
2,
5
]
]
}
],
"solution": [
[
0,
0,
0,
0,
0,
0,
0
],
[
0,
0,
0,
3,
1,
4,
0
],
[
0,
0,
5,
2,
3,
1,
0
],
[
0,
7,
8,
1,
0,
0,
0
],
[
0,
5,
9,
0,
0,
0,
0
],
[
0,
1,
4,
2,
0,
0,
0
],
[
0,
0,
7,
9,
0,
0,
0
]
]
}
curl --location --request GET 'https://zylalabs.com/api/14591/sudoku+and+maze+generator+api/37398/kakuro+sum+cross+with+exactly+one+solution?size=small&seed=42&svg=false&format=json&answers=false' --header 'Authorization: Bearer YOUR_API_KEY'
{
"type": "cages",
"seed": 42,
"size": 4,
"ops": "all",
"uniqueSolution": true,
"givens": 2,
"cages": [
{
"cells": [
[
0,
0
],
[
0,
1
]
],
"operation": "/",
"target": 4,
"label": "4÷"
},
{
"cells": [
[
0,
2
],
[
1,
0
],
[
1,
1
],
[
1,
2
]
],
"operation": "*",
"target": 24,
"label": "24×"
},
{
"cells": [
[
0,
3
],
[
1,
3
]
],
"operation": "+",
"target": 5,
"label": "5+"
},
{
"cells": [
[
2,
0
],
[
2,
1
]
],
"operation": "*",
"target": 12,
"label": "12×"
},
{
"cells": [
[
2,
2
],
[
2,
3
]
],
"operation": "/",
"target": 2,
"label": "2÷"
},
{
"cells": [
[
3,
0
]
],
"operation": "=",
"target": 3,
"label": "3"
},
{
"cells": [
[
3,
1
]
],
"operation": "=",
"target": 2,
"label": "2"
},
{
"cells": [
[
3,
2
],
[
3,
3
]
],
"operation": "-",
"target": 3,
"label": "3−"
}
],
"solution": [
[
1,
4,
3,
2
],
[
2,
1,
4,
3
],
[
4,
3,
2,
1
],
[
3,
2,
1,
4
]
]
}
curl --location --request GET 'https://zylalabs.com/api/14591/sudoku+and+maze+generator+api/37399/math+cage+puzzle+latin+square+with+arithmetic+cages?size=4&ops=all&seed=42&svg=false&format=json&answers=false' --header 'Authorization: Bearer YOUR_API_KEY'
{
"type": "maze",
"seed": 42,
"width": 6,
"height": 5,
"entrance": {
"row": 0,
"col": 0,
"side": "top"
},
"exit": {
"row": 4,
"col": 5,
"side": "bottom"
},
"wallBits": {
"top": 1,
"right": 2,
"bottom": 4,
"left": 8
},
"cells": [
[
12,
3,
13,
1,
3,
11
],
[
11,
12,
5,
6,
12,
2
],
[
8,
7,
9,
1,
3,
10
],
[
8,
3,
10,
10,
14,
10
],
[
14,
12,
6,
12,
5,
2
]
],
"solution": [
[
0,
0
],
[
0,
1
],
[
1,
1
],
[
1,
2
],
[
1,
3
],
[
0,
3
],
[
0,
4
],
[
1,
4
],
[
1,
5
],
[
2,
5
],
[
3,
5
],
[
4,
5
]
]
}
curl --location --request GET 'https://zylalabs.com/api/14591/sudoku+and+maze+generator+api/37400/perfect+maze+with+one+solution+path?w=6&h=5&seed=42&svg=false&format=json&answers=false&markers=true' --header 'Authorization: Bearer YOUR_API_KEY'
{
"wordsearch": [
{
"id": "in-the-garden",
"name": "In the Garden",
"language": "en",
"words": 18
},
{
"id": "in-the-kitchen",
"name": "In the Kitchen",
"language": "en",
"words": 18
},
{
"id": "baking-day",
"name": "Baking Day",
"language": "en",
"words": 18
},
{
"id": "breakfast-table",
"name": "Breakfast Table",
"language": "en",
"words": 18
},
{
"id": "at-the-beach",
"name": "At the Beach",
"language": "en",
"words": 18
}
],
"crossword": [
{
"id": "in-the-garden",
"name": "In the Garden",
"language": "en",
"entries": 16
},
{
"id": "in-the-kitchen",
"name": "In the Kitchen",
"language": "en",
"entries": 17
},
{
"id": "baking-day",
"name": "Baking Day",
"language": "en",
"entries": 16
},
{
"id": "breakfast-table",
"name": "Breakfast Table",
"language": "en",
"entries": 15
},
{
"id": "at-the-beach",
"name": "At the Beach",
"language": "en",
"entries": 13
}
]
}
curl --location --request GET 'https://zylalabs.com/api/14591/sudoku+and+maze+generator+api/37401/built-in+themes+our+own+word+lists' --header 'Authorization: Bearer YOUR_API_KEY'
注册后,每个开发者都会被分配一个个人 API 访问密钥,这是一个唯一的字母和数字组合,用于访问我们的 API 端点。要使用 数独和迷宫生成器 API 进行身份验证,只需在 Authorization 标头中包含您的 bearer token。
| 标头 | 描述 |
|---|---|
授权
|
必需
应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。
|
每个端点返回与请求的谜题类型相关的JSON数据。例如,数独端点提供带有线索和唯一解的网格,而非ogram端点返回行和列线索以及可解决的图像
关键字段因端点而异,但通常包括“类型”、“唯一解”、“线索”和谜题网格或线索。例如,数独响应包括“难度”和“谜题”,而跨字谜响应包括“布局”和“线索”
参数因终端而异 对于数独,您可以指定“难度”(简单、中等、困难)和“种子”以实现可重复性 非ogram 端点允许您设置“密度”(低、中、高)以影响谜题的复杂性
响应数据以 JSON 格式结构化,包含嵌套对象和数组。例如,数独响应包括一个用于谜题网格的数组和一个用于元数据的对象,如“seed”和“difficulty”,使其易于解析和利用
典型的用例包括为游戏、教育工具或娱乐活动生成谜题 开发人员可以集成API来创建互动谜题应用程序或网站,为用户提供各种逻辑谜题
数据的准确性是通过耗时的求解算法来确保的,这些算法在返回难题之前会检查唯一性和可解性 每个端点会验证生成的难题以确认它们符合指定的标准
用户可以期待一致的数据模式,例如拼图的网格格式和非ogram及卡库罗的结构化线索。每种拼图类型都有明确的布局,使其在应用程序中实现变得简单
用户可以通过解析 JSON 响应来利用返回的数据,在他们的应用程序中显示谜题。例如,数独网格可以在用户界面中呈现,同时来自卡库罗的线索可以指导用户解决谜题