How to tell the shape of an Area Light

Hello. Is there a way to get the shape of the light from an area light in code? It seems a lot like there isn’t one. GPT says there’s no way, but obviously it could be wrong. Any suggestions?