Developer documentation ⌄
Generate Sudoku puzzles
Get unique Sudoku puzzles and their solutions for your own app or website. Every generated grid is independently verified before it is returned.
/api/v1/generateRequest body
Send a JSON object. Unknown fields are rejected.
countintegeroptional · default 1- Number of distinct puzzles in this batch. Integer from 1 to 20.
difficultystringoptional · default beginner- Measured technique level: beginner uses naked singles; easy requires hidden singles; medium requires locked candidates; hard requires naked pairs; expert remains unsolved by this ladder. No solve-time or specific expert-technique claim.
beginnereasymediumhardexpert seedstringoptional- Optional 1–128 character seed. The same seed, difficulty, count and generatorVersion reproduce puzzle content. Not secret; do not put personal data here. Omit for fresh random generation.
generatorVersionstringoptional- Optional reproducibility contract; currently seed-v1. Pin this with seed and retain returned puzzle content for archival use. Download tokens and PDF metadata are not reproducible.
seed-v1
Response fields
200 OK · application/json
generationobject- Present for seeded requests: seed and generatorVersion (seed-v1).
engineVersionstring- Version of the shared generator and verifier.
puzzles[].puzzlestring- 81 cells; digits 1–9 are givens and - is a blank. Render this in your game UI.
puzzles[].solutionstring- 81 digits containing the unique answer. Keep this on your server if players should not see it.
puzzles[].requestedDifficultystring- Requested technique level; guaranteed to match analysis.difficulty. The legacy analysis.rating remains a separate singles-only summary.
puzzles[].analysisobject- clueCount, rating, method, techniques, solvedWithSupportedTechniques, remainingCells, explanation, puzzle, unique and engineVersion. See Analyze difficulty for all definitions.
Show 13 properties
puzzlestring- Normalized 81-cell grid; blanks are -.
engineVersionstring- Version of the shared Sudoku engine.
uniqueboolean- Always true for a successful analysis. Ambiguous or unsolved inputs receive HTTP 422.
clueCountinteger- Number of given digits in the original puzzle.
ratingstring- beginner: solved with supported singles; beyond-singles: further techniques needed; complete: no blank cells.
difficultystring- Measured level: beginner=naked singles, easy=hidden singles, medium=locked candidates, hard=naked pairs, expert=beyond this ladder. Generated puzzles always match requestedDifficulty. Completed grids return beginner here and rating=complete.
techniqueCountsobject- Counts of nakedSingles and hiddenSingles placements, plus productive lockedCandidates and nakedPairs elimination steps in the full technique ladder.
techniqueRemainingCellsinteger- Unfilled cells after the full ladder. Greater than zero for expert; zero for the other levels.
methodstring- techniques-v2. Deterministic order: naked singles, hidden singles, locked candidates, naked pairs. The legacy rating/techniques/remainingCells fields still describe singles only.
techniquesobject- nakedSingles and hiddenSingles: number of placements made using each technique.
Show 2 properties
nakedSinglesinteger- Placements where a cell had one remaining candidate.
hiddenSinglesinteger- Placements where a digit had only one possible position in a row, column or box.
solvedWithSupportedTechniquesboolean- Whether naked and hidden singles completed the grid.
remainingCellsinteger- Cells left blank after supported techniques are exhausted.
explanationstring- Human-readable explanation of the rating and its limits.
puzzles[].attributionobject- Mandatory Sudokumax credit for this puzzle.
Show 6 properties
requiredboolean- Always true. Attribution is a condition of free access.
textstring- Visible credit: Created with Sudokumax.
urlstring (URL)- Canonical credit destination: https://sudokumax.com.
htmlstring- Ready-to-use HTML link. Keep it visible alongside the puzzle.
offlineTextstring- Credit and website address to print on each published item.
termsUrlstring (URL)- Full API attribution terms.
attributionobject- Required credit: required=true, text, url, html, offlineText and termsUrl. Display a visible hyperlink online and a legible website address on printed outputs.
Show 6 properties
requiredboolean- Always true. Attribution is a condition of free access.
textstring- Visible credit: Created with Sudokumax.
urlstring (URL)- Canonical credit destination: https://sudokumax.com.
htmlstring- Ready-to-use HTML link. Keep it visible alongside the puzzle.
offlineTextstring- Credit and website address to print on each published item.
termsUrlstring (URL)- Full API attribution terms.
Behavior
- Fresh randomized grids replace the old seed bank. Within a batch, invariant clue-pattern counts certify that no pair can be related by row, column, band, stack, digit permutations or transposition. Separate calls are freshly generated, but global never-repeat uniqueness is not guaranteed.
- This endpoint does not create hosted links or a PDF. Use /publish for playable links or /packs for the complete worksheet workflow.
- Build your own player UI and store progress in your app. Use /validate and /hint for board feedback and singles hints. This API does not manage player accounts, scoring, timers or saved games.
Errors
503 GENERATION_LIMIT
The bounded generator could not complete the requested batch. Retry later or request fewer puzzles.
All endpoints also return structured errors for invalid input, missing keys, revoked access and rate limits.
Full error reference →Attribution
Every published output must credit Sudokumax. Use a visible hyperlink online; print the website address offline.
<a href="https://sudokumax.com">Created with Sudokumax</a>Request
Set SUDOKUMAX_API_KEY in your server environment. Examples never include your secret key.
curl https://sudokumax.com/api/v1/generate \
-H "Authorization: Bearer $SUDOKUMAX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"count": 1,
"difficulty": "beginner"
}'Try this endpoint
Get an API key ↗Runs a real request. Calls are free.
The request example above updates as you edit these fields.
Response
Illustrative 200 response for one known puzzle. Send a request to inspect your own result.
{
"engineVersion": "1.2.0",
"puzzles": [
{
"puzzle": "53--7----6--195----98----6-8---6---34--8-3--17---2---6-6----28----419--5----8--79",
"solution": "534678912672195348198342567859761423426853791713924856961537284287419635345286179",
"requestedDifficulty": "beginner",
"analysis": {
"engineVersion": "1.2.0",
"puzzle": "53--7----6--195----98----6-8---6---34--8-3--17---2---6-6----28----419--5----8--79",
"unique": true,
"clueCount": 30,
"rating": "beginner",
"method": "techniques-v2",
"difficulty": "beginner",
"techniqueCounts": {
"nakedSingles": 51,
"hiddenSingles": 0,
"lockedCandidates": 0,
"nakedPairs": 0
},
"techniqueRemainingCells": 0,
"techniques": {
"nakedSingles": 51,
"hiddenSingles": 0
},
"solvedWithSupportedTechniques": true,
"remainingCells": 0,
"explanation": "The legacy rating describes singles only. difficulty reports the hardest technique used by the deterministic technique ladder; it is not a solve-time estimate."
},
"attribution": {
"required": true,
"text": "Created with Sudokumax",
"url": "https://sudokumax.com",
"html": "<a href=\"https://sudokumax.com\">Created with Sudokumax</a>",
"offlineText": "Created with Sudokumax · sudokumax.com",
"termsUrl": "https://sudokumax.com/developers/terms"
}
}
],
"attribution": {
"required": true,
"text": "Created with Sudokumax",
"url": "https://sudokumax.com",
"html": "<a href=\"https://sudokumax.com\">Created with Sudokumax</a>",
"offlineText": "Created with Sudokumax · sudokumax.com",
"termsUrl": "https://sudokumax.com/developers/terms"
}
}