The development of generative artificial intelligence (AI) technologies has brought about a significant transformation in the world of education, especially in the creation of learning materials. However, the implementation of these technologies poses various legal challenges that require comprehensive regulation. This study analyzes the regulatory framework necessary to regulate the generative use of AI in the context of education, identifies emerging legal challenges, and proposes solutions for creating safe and legal learning environments. The methodology used was a descriptive analysis with a normative jurisprudential approach to existing regulations and a case study of the generative implementation of AI in educational institutions. The study results indicate that a regulatory framework is needed that covers aspects of copyright, data protection, accountability, and content quality standards. Proposed solutions include the development of AI ethics guidelines, content audit mechanisms, and certification systems for AI-generated learning material.