In California, an unwed parent can file one of two actions to obtain custody of children -- 1 is a Petition to Establish Parental Relationship under the Uniform Parentage Act; 2 is a Petition for Custody and Support of Minor Children. The first is used primarily where it might be necessary to establish parentage of one of the parents (who, for example, may not be on the birth certificate, or who may be denying parentage). The second is used to determine custody and support without either affecting a marital relationship or legally establishing a parental relationship.If you have been the primary caretaker of the children, you sghould be a prime candidate to be given physical custody of the children. I'd need more facts to comment further.
The fact of your marital status is irrelevant to the question of custody of your child. You are the mother of this child and thus have parental rights that can and will be determined by the court if need be, and assuming there exists a need to do so. By that, I mean if the father tries to fight your right to raise the child, the court is there to help the two of you sort it out. It is your child, however, and you not only have the right but the responsibility as well to love it, give it a home, and help it become a great person. You also have the right to receive child support form the child's father, and if you are unable to afford a lawyer the county will help you collect child suport. As for custody, you already have it: you are the child's mom. Good luck.