API endpoint for create API endpoints

What can be way to access stream key ?
Can you elaborate the flow of how and where the stream key generated and where to use?