I personally like Liepāja. Town. Beach. And the road to Liepāja is pretty. The area itself.
But Ventspils might be better since You are with children. It would make a very nice trip along coast side - from Ventspils to Mazirbe to Kolka to Malnsils. And You also can take a one day trip to Liepāja. So basically Ventspils is the middle way.
Ventspils for children. It has several big kids playgrounds. The seaside park has steam locomotive train working which would take you to the kids leisure park. Friendly prices.
Liepaja is better for architecture but not for kids.
I would definitely say Ventspils. It is very clean, beach is really nice there and there is a lot of parks and playgrounds for kids. Liepaja is also nice, but in my opinion there is less to do and if you move out of the centre , it is pretty much dirty and unkempt.
If you're going to Ventspils by car, you can also stop in Kolkasrags (around 80 km from Ventspils) where the Baltic Sea meets the Gulf of Riga.