“How do I gain custody of both of my children even though their father and I are not divorced yet?”

In California the procedure is to file an order to show cause or a noticed motion for custody and visitation. If you do not have an ongoing divorce, legal separation or domestic violence action then you would need to file one of those to get a case started under which to file the request for a custody designation.