Ball pits designed and made specifically for babies by reputable manufacturers are safe for babies when used correctly.
Larger ball pits, designed for older children, are not safe for babies.