In 1414 a giraffe reached the Ming court, sent by way of Bengal from the East African coast, and the court received it as a qilin. A painting and an accompanying eulogy survive from the occasion. The animal was tall, gentle, spotted and unlike anything in the Chinese record, and the arrival of a qilin is the classic sign that the reigning emperor is virtuous, so the identification did political work for everyone involved.
The Yongle Emperor is reported to have declined the flattery, which is itself part of the convention: the correct response to being told one is a sage is to say one is not. The episode is often told as an error, as though the court failed to recognise a giraffe. That is unlikely to be the right reading. A court that received tribute from across the Indian Ocean was capable of describing an unfamiliar animal, and calling it a qilin was an interpretation of what its arrival meant.
The omen function is the qilin's main business in the classical sources. It appears at the birth of a sage and its capture or death signals the end of an age. The Spring and Autumn Annals close with the capture of a lin, and the tradition reads that ending as deliberate. A beast that appears when the world is well ordered is, in practice, a way of talking about whether it is.