Sudoku
Generate Sudoku puzzles of varying difficulty levels. Each response includes the puzzle grid (with 0 for empty cells) and the complete solution.
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
Get Sudoku Puzzle
Returns a randomly generated Sudoku puzzle and its solution. Difficulty defaults to medium when not specified.
GET
https://api.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 DemoRequest
Puzzle difficulty level. One of: easy, medium, hard. Defaults to medium.
Sending request...
Response Fields
| Field | Type | Description |
|---|---|---|
| difficulty | string |
The difficulty level of the returned puzzle (easy, medium, or hard) |
| puzzle | array[array[integer]] |
9Γ9 grid representing the puzzle β 0 means an empty cell to be filled in |
| solution | array[array[integer]] |
9Γ9 grid containing the complete, valid solution |
Code Examples
curl "https://api.requiems.xyz/v1/entertainment/sudoku?difficulty=hard" \
-H "requiems-api-key: YOUR_API_KEY"
import requests
url = "https://api.requiems.xyz/v1/entertainment/sudoku"
headers = {"requiems-api-key": "YOUR_API_KEY"}
params = {"difficulty": "hard"}
response = requests.get(url, headers=headers, params=params)
data = response.json()
print(data["data"]["puzzle"])
const response = await fetch(
'https://api.requiems.xyz/v1/entertainment/sudoku?difficulty=hard',
{ headers: { 'requiems-api-key': 'YOUR_API_KEY' } }
);
const { data } = await response.json();
console.log(data.puzzle);
require 'net/http'
require 'json'
uri = URI('https://api.requiems.xyz/v1/entertainment/sudoku')
uri.query = URI.encode_www_form(difficulty: 'hard')
request = Net::HTTP::Get.new(uri)
request['requiems-api-key'] = 'YOUR_API_KEY'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
data = JSON.parse(response.body)
puts data['data']['puzzle'].inspect
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
A value of 0 represents an empty cell β the cell the solver needs to fill in to complete the puzzle.
Yes. The solution satisfies all standard Sudoku constraints β each row, column, and 3Γ3 box contains the digits 1β9 exactly once.
No. Each request produces a freshly shuffled puzzle using a random seed, so results vary between calls.
Three levels are supported: easy (45 given cells), medium (35 given cells), and hard (29 given cells). When the difficulty parameter is omitted, medium is used.