Spell Check
Check spelling and get correction suggestions. Returns a corrected version of the input text and a list of individual corrections with their positions.
Overview
Use Cases
- Writing assistants and text editors
- User-generated content quality checks
- Form validation and input sanitisation
- Educational platforms and grammar tools
Features
Detects misspelled words using an English dictionary
Provides the best correction suggestion per misspelled word
Returns character positions for each correction
Preserves original capitalisation in suggestions
Only ASCII letter sequences are spell-checked; non-ASCII characters are passed through unchanged
API Endpoints
Check Spelling
Checks the input text for spelling mistakes and returns a corrected version along with per-word corrections.
POST
https://api.requiems.xyz/v1/text/spellcheck
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| text | string |
Required | The text to spell-check. |
Try it out
Live DemoRequest
The text to spell-check.
Sending request...
Response Fields
| Field | Type | Description |
|---|---|---|
| corrected | string |
The full input text with all misspelled words replaced by their suggested corrections |
| corrections | array of objects |
List of individual corrections. Each item contains: original (the misspelled word), suggested (the correction), and position (0-based character offset in the original text) |
Code Examples
curl -X POST https://api.requiems.xyz/v1/text/spellcheck \
-H "requiems-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Ths is a smiple tset"}'
import requests
url = "https://api.requiems.xyz/v1/text/spellcheck"
headers = {
"requiems-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {"text": "Ths is a smiple tset"}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
const response = await fetch('https://api.requiems.xyz/v1/text/spellcheck', {
method: 'POST',
headers: {
'requiems-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ text: 'Ths is a smiple tset' })
});
const data = await response.json();
console.log(data.data.corrected);
console.log(data.data.corrections);
require 'net/http'
require 'json'
uri = URI('https://api.requiems.xyz/v1/text/spellcheck')
request = Net::HTTP::Post.new(uri)
request['requiems-api-key'] = 'YOUR_API_KEY'
request['Content-Type'] = 'application/json'
request.body = { text: 'Ths is a smiple tset' }.to_json
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']['corrected']
data['data']['corrections'].each { |c| puts "#{c['original']} -> #{c['suggested']}" }
Error Responses
validation_failed
The text field is missing or empty.
bad_request
The request body is missing or malformed.
internal_error
Unexpected server error.
Frequently Asked Questions
The spell checker currently supports English only.
Yes. The position field is a 0-based Unicode character (rune) offset in the original input string. This matches how Python, JavaScript, and Ruby index strings.
The corrected field will equal the input text and corrections will be an empty array: [].
No. Spell checking is case-insensitive. The suggested correction mirrors the capitalisation of the original word: a capitalised misspelling produces a capitalised suggestion.