The S-type AGB star π1 Gru has a known companion at a separation of 400 AU. The molecular line emission from the circumstellar envelope shows strong deviations from spherical symmetry. The envelope structure is interpreted as a system of a slowly expanding equatorial torus and a fast bipolar outflow. It is believed that the gravitation effect of the companion is not strong enough to significantly influence the envelope. A closer, undetected companion has been suggested, but the evidence is not conclusive. We have observed the J=3-2 line emission from 12CO and 13CO using the Atacama Large Millimeter/submillimeter Array (ALMA). The data analysis clearly confirms the torus-bipolar structure. The observational results constrain a 3D radiative transfer model to investigate the morphology and the kinematic structure. The momentum of the fast (up to 100 km/s) outflow is in excess (by a factor of about 20) of what could be generated by radiation pressure alone, in agreement with recent findings for more evolved sources. The best-fit model also determines the 12CO/13CO abundance ratio and the mass-loss rate during the creation of the torus. Based on the results, some possible shaping scenarios for the gas envelope will be discussed.