Image best practices

Accepted input

Requirement Details
Encoding Standard base64 (RFC 4648 alphabet A–Z a–z 0–9 + / with = padding). Line breaks and surrounding whitespace are ignored.
Data-URI prefix v2 only: a prefix such as data:image/jpeg;base64, is accepted and stripped. v1: do not send a prefix.
URL-safe base64 (-, _) Not accepted by v2 (returns 400 invalid_image). Convert to standard base64.
Formats Common 8-bit formats: JPEG and PNG recommended. WebP, BMP, TIFF, and GIF (first frame only) are also decoded.
Colour Converted to RGB. Transparency is discarded.
Bit depth 8 bits per channel. 16-bit, 32-bit, and floating-point images are rejected (400 invalid_image).
Images per request One.
Size See Limits. Recommended: keep files under ~4 MB, and resize so the longest side is roughly 1000–2000 px.

For the best results

  • One cat, clearly visible, filling a good part of the frame. If there are several cats, only the most confidently detected one is analysed.

  • Face visible, in focus, and well lit. Avoid heavy blur, strong backlighting, and extreme angles.

  • Appropriate for cats 2 months and older.

  • Standard features read most accurately.

  • Most accurate for domestic shorthairs.

  • Upright orientation. Apply EXIF rotation before uploading:

    from PIL import Image, ImageOps
    img = ImageOps.exif_transpose(Image.open("cat.jpg")).convert("RGB")
    img.thumbnail((2000, 2000))           # optional: cap size to reduce upload time
    img.save("cat_upright.jpg", quality=90)