Check the legal basis.
Section 180 StPO allows release against bail or surety only where flight risk is the sole detention ground. If the alleged offence is not punishable by more than five years, release against security is provided once the conditions are met. Section 181 StPO regulates release of security after final conclusion of the case or after sentence start where an unconditional prison sentence is imposed.