It happened in the Bushwick section.
Five people were treated for possible exposure, including two young children who were transported to the hospital.
One of the children is in serious but stable condition. The other child's condition is not known.
Fire officials say the building's boiler had been shut off and may have been the cause.