Yes, OpenAI encourages you to build with the OpenAI API at Hackathons. OpenAI requires you to comply with OpenAI's release and sharing policies when sharing what you build during a Hackathon.
If you are a Hackathon organizer and would like to request credits for your event participants, please visit OpenAI's Hackathon support page. https://platform.openai.com/docs/hackathons