For developers
API quickstart
Send a recording and the text it should match. Get back five scores and a breakdown of every word and every sound. It is the same scoring Spelly’s own apps use.
Your app sends
The recording, the text it should match and its language.
Spelly scores
Each sound is compared with the sound the word needs.
You get JSON back
Six scores, each word and each sound, ready to display.
Quickstart
Every path on this page follows https://spelly.ch: /api/assess is https://spelly.ch/api/assess. Send your key in the X-API-Key header. Two complete calls to start from:
Score a recording saved as recording.wav
curl https://spelly.ch/api/assess \
-H 'X-API-Key: YOUR_KEY' \
-F 'reference_text=The weather is lovely' \
-F language=en-GB \
-F audio=@recording.wavGet the model voice with the timing of each sound and letter
curl https://spelly.ch/api/tts/aligned \
-H 'X-API-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{
"text": "hello",
"language": "en-GB",
"audio_format": "mp3"
}'Your API key
Send your key in an X-API-Key header with every request. You find it in the operator console. Keep it on your server, never in a web page.
Browsers cannot call the API from your pages: it accepts cross-origin requests only from Spelly’s own sites, and a key in a page could be copied. Call it from your server; to let learners practise in a web page, use the widget.
Each recording scored uses 1 unit and each model voice (/api/tts, /api/tts/aligned, /api/assess/synthesize) 0.5; every other call is free. Only calls that succeed use units: a refused or failed call uses nothing. Recordings and voices in the widget use the same units. A free trial has 100 units; once they are used up, calls answer 402 with operator.trialExhausted in detail, and remaining and requested beside it.
Rate limits
Each address may send the API 50 requests a second on average, and up to 300 more at once. Beyond that, calls answer 429 request.tooManyRequests. A free trial key may send 60 requests a minute. If your key has its own per-minute limit, calls over it answer 429 too.
429 and 503 answers carry a Retry-After header: the seconds to wait before sending the same request again.
Next
- API reference — every endpoint, with its parameters, its response and a curl example.
- API errors — every error code and what to do about it.