The old saying "an ounce of prevention is worth a pound of cure" was never more true than in learning how to properly sex your pets. With guinea pigs, once you really know what you are looking for, it is fairly easy, but it can be a little tricky.
No matter where you obtained your guinea pigs from, you should confirm the sex of your guinea pigs, ideally before you go home with them, but certainly as soon as possible. Pet stores frequently sell missexed guinea pigs, so if you obtained your guinea pigs from a pet store, be sure and confirm its sex. You do not want to be in a position of a high-risk pregnancy or having to rehome guinea pigs yourself. It is not easy.
Can you sex babies?
Yes. You don't need to wait for weeks to sex newborns. This photo is of a 12-hour old baby male (you can still see the umbilical cord). Just be sure to confirm your decision over time, but especially at 3 weeks old, when males should be separated from their mother.
... more to come ...