You can apply for anticipatory bail at the Sessions Court if you have reason to be believe that the victim in question is likely to file an F.I.R. or a criminal complaint against you. The sooner the better. The offence of rape in question being cognizable, you may be arrested without a magistrate's warrant if you do not seek anticipatory bail through the assistance of an advocate. The court needs to ensure several conditions namely, you must not be a repeat offender, you're not likely to abscond etc before granting anticipatory bail etc, and an advocate who's even acquainted with simply the basics of law and can show up on hearings is likely to present your case well so you can seek bail on a timely basis.
Regular bail, on the other hand, can be sought once you have already been arrested. If the complainant has also included family members in her FIR/criminal complaint, they may be apprehended likewise, depending on the nature of their crimes.