Sudoku

Generate Sudoku puzzles of varying difficulty levels. Each response includes the puzzle grid (with 0 for empty cells) and the complete solution.

Get API Key

Overview

Use Cases

  • Puzzle and brain-training apps
  • Educational platforms
  • Games and entertainment widgets
  • Daily challenge features

Features

Three difficulty levels β€” easy, medium, and hard
Solution always included in the response
Each request produces a freshly shuffled, unique puzzle
Standard 9Γ—9 grid format

API Endpoints

Batch Generate Sudoku Puzzles

Generate up to 20 Sudoku puzzles in a single request. Results are returned in the same order as the input array. Each puzzle in the batch counts as one unit of API usage.

POST
https://requiems.xyz/v1/entertainment/sudoku/batch

Parameters

Name Type Required Description
puzzles array<string> Required Array of difficulty levels to generate (min: 1, max: 20). Each must be one of: easy, medium, hard.

Try it out

Live Demo
Request

Array of difficulty levels to generate (min: 1, max: 20). Each must be one of: easy, medium, hard.

Response Fields

Field Type Description
results array<object> Generated puzzles in the same order as the input array. Each item has the same fields as the single-puzzle endpoint.
results[].difficulty string The difficulty level of the puzzle (easy, medium, or hard)
results[].puzzle array<object> 9Γ—9 grid as an array of 9 rows, each row an array of 9 integers β€” 0 means an empty cell to be filled in
results[].solution array<object> 9Γ—9 grid as an array of 9 rows, each row an array of 9 integers β€” complete, valid solution
total integer Number of puzzles returned. Matches the length of the input array.

Code Examples

curl -X POST "https://requiems.xyz/v1/entertainment/sudoku/batch" \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"puzzles":["easy","medium","hard"]}'

Error Responses

bad_request

The request body is missing or contains malformed JSON.

validation_failed

The puzzles array is missing, empty, exceeds 20 items, or contains a value other than easy, medium, or hard.

unauthorized

Missing API key

forbidden

Invalid or revoked API key

Get Sudoku Puzzle

Returns a randomly generated Sudoku puzzle and its solution. Difficulty defaults to medium when not specified.

GET
https://requiems.xyz/v1/entertainment/sudoku

Parameters

Name Type Required Description
difficulty string Optional Puzzle difficulty level. One of: easy, medium, hard. Defaults to medium.

Try it out

Live Demo
Request

Puzzle difficulty level. One of: easy, medium, hard. Defaults to medium.

Response Fields

Field Type Description
difficulty string The difficulty level of the returned puzzle (easy, medium, or hard)
puzzle array<object> 9Γ—9 grid as an array of 9 rows, each row an array of 9 integers β€” 0 means an empty cell to be filled in
solution array<object> 9Γ—9 grid as an array of 9 rows, each row an array of 9 integers β€” complete, valid solution

Code Examples

curl "https://requiems.xyz/v1/entertainment/sudoku?difficulty=hard" \
  -H "requiems-api-key: YOUR_API_KEY"

Error Responses

bad_request

The difficulty parameter is not one of easy, medium, or hard

unauthorized

Missing API key

forbidden

Invalid or revoked API key

Frequently Asked Questions