N.Y. Education Law § 3202
4. a. Definitions. For purposes of this subdivision only, the following definitions shall apply.
6. Except as provided in subdivision five of this section or by article eighty-one of this chapter, children cared for in a hospital or other institution for the care, custody and treatment of children, other than a school and excepting children of the officers and employees of such hospital or institution, shall not, by reason of their presence in such hospital or institution, be deemed to be residents of the school district in which such hospital or institution is located. The trustees or board of education of the school district of their residence shall provide educational services for such children. Such services may be provided by a tutor employed by the district, by contract with a school connected with such hospital or institution, or by contract with the local public school district in which such hospital or institution is located. Such contracts shall be limited to the cost of educational services and shall not include maintenance or medical services. Provided, however, if such children are supported and maintained at the expense of a social services district, the cost of said instruction shall be paid by the social services district which is liable for payment of the cost of their support and maintenance. In the case of hospitals or institutions located in the state of New York, the trustees or board of education of a school district in which such a hospital or institution is located shall receive such children in the school or schools of the district for instruction for a compensation to be fixed by the trustee or board of education, unless such trustees or board of education shall establish to the satisfaction of the commissioner of education that there are valid and sufficient reasons for refusal to receive such children. * 6-a. Notwithstanding subdivision six of this section or any other law to the contrary, the commissioner of the office of children and family services shall be responsible for the secular education of youth under the jurisdiction of the office and may contract for such education with the trustees or board of education of the school district wherein a facility for the residential care of such youth is located or with the board of cooperative educational services at which any such school district is a component district for special education programs, related services and career and technical education services and music, art and foreign language programs in accordance with subparagraph eight of paragraph (h) of subdivision four of section nineteen hundred fifty of this chapter. A youth attending a local public school while in residence at such facility shall be deemed a resident of the school district where his parent or guardian resides at the commencement of each school year for the purpose of determining which school district shall be responsible for the youth's tuition pursuant to section five hundred four of the executive law. * NB Effective until June 30, 2021 * 6-a. Notwithstanding subdivision six of this section the director of the division for youth shall be responsible for the secular education of youth under the jurisdiction of the division and may contract for such education with the trustees or board of education of the school district wherein a facility for the residential care of division for youth is located. A youth attending a local public school while in residence at such facility shall be deemed a resident of the school district where his parent or guardian resides at the commencement of each school year for the purpose of determining which school district shall be responsible for the youth's tuition pursuant to section five hundred four of the executive law. * NB Effective June 30, 2021 * 6-b. The commissioner of mental health may meet his or her obligations under section 33.11 of the mental hygiene law by contracting pursuant to this subdivision for educational services for children between the ages of five and twenty-one who do not hold a high school diploma and who are hospitalized in hospitals operated by the office of mental health with the trustees or board of education of any school district for educational services or with a board of cooperative educational services for the provision of special education, related services and any alternative education programs approved by the commissioner pursuant to regulations promulgated under section one hundred twelve of this chapter where the board of cooperative educational services provides alternative education programs to component school districts to such children in accordance with their individualized education programs. The costs of such education shall not be a charge upon a school district pursuant to section 33.11 of the mental hygiene law.