Why an exact length helps a digit code
2026-02-24 · Numeric captchas
length throws away readings that cannot be the code, including ones that scored well internally.
Without length, a scratch that looks like an extra mark can become a seventh digit, or a faint digit can be dropped. With length: 6, those readings are illegal and the decoder picks the best legal one.
Set the length only when it is truly fixed. A portal that draws 5 or 6 at random will be hurt by a hard 6, because a real 5-digit code cannot be returned.
Count the digits on a dozen real images before you hard-code the option. The option is per request, so you can set it only when the page tells you the length.
length is an integer from 1 to 32. A value outside that range is a 422.
Ready to call it? Start with the quickstart, the API guide, or pricing.