For developers

API errors

Every error answers JSON with a code in detail, like {"detail": "auth.unauthorized"}. A few codes add fields beside it.

StatusCodeMeaningAlso returned
400assess.unsupportedLanguagelanguage (or source_language or target_language) is not one of the API’s language codes, spelled exactly.—
400request.bodyNotJsonThe JSON body could not be read as JSON.—
400request.unknownAudioFormataudio_format is neither mp3 nor wav.—
400assess.noAudioThe audio file is empty.—
400assessment.audioUnreadableThe uploaded file is not audio Spelly can read.—
401auth.unauthorizedThe X-API-Key header is missing, wrong or revoked.—
401widget.keyInvalidThe widget key is unknown or revoked.—
402operator.trialExhaustedYour units are used up.remaining and requested (units), upgrade_url (null while plans are not sold)
403auth.endpointNotAllowedYour key may not call this route; the routes it may call are under All endpoints.—
403operator.inactiveThe account that owns the key is paused or deleted.—
404request.notFoundThere is no such route.—
405request.methodNotAllowedThe route exists, but not with this method.—
413assess.recordingTooLongThe recording is over the size limit.—
413request.tooLargeThe request body is too large.—
422assessment.nothingHeardThe recording holds no speech: it is silent, or the microphone picked up nothing. Nothing is charged.—
422request.invalidA field is missing, is one the call does not take, or has a value it does not take; or the body is not a JSON object.errors: one {"field", "problem"} per wrong field, with a value for some problems; problem is a type such as missing, extra_forbidden (a field the call does not take), string_too_long, no_letters (a text with no letters to read), dict_type (the body is not a JSON object), unknown_sound or literal_error
429request.tooManyRequestsToo many requests: from your address (see Rate limits), or over your key’s own per-minute limit when one is set.Header Retry-After: seconds to wait
500server.failedSomething failed on Spelly’s side.—
503service.busySpelly is busy: requests are waiting their turn.Header Retry-After: seconds to wait
503service.unavailableSpelly’s scoring and voice service is not answering right now. Spelly’s status says whether it is down.Header Retry-After: seconds to wait
503service.maintenanceSpelly is being updated, usually for a minute or two. Every call is refused until it is back, so nothing is half done. Spelly’s status shows it too.Header Retry-After: seconds to wait