Is there a random number generator c api for c extension?

Hello. I need to generate random number in c function, is there a c api doc?
Thanks!