Most recipes seem to add the flavors at the beginning of the boil. If you are boiling green peanuts for 1 to 4 hours that's probably fine. If you are boiling dried peanuts up to 24 hours, some spices may be best left for the last few hours, especially if they are very aromatic.
I personally prefer to add all my flavorings in the very late stages of boiling and soaking. That includes salt. The soaking is the key to getting all your flavors into the peanuts, not the boiling time. Boiling time is about softening the peanuts, and getting them wet, which allow the flavors to permeate the peanuts.
As to your question about how much, here is a simple spicy garlic boiled peanut recipe that I created:
For 1 gallon of water, 1 pound of dried Valencia peanuts, use 7 tablespoons table salt, 3 tablespoons freeze dried garlic, 3 tablespoons dried pepper flakes. They are delicious!
Start with less spices than you think you need, and add more as you taste the results after some simmer and soak time. You can add more spices after tasting them. Simmer and soak after adding seasoning. Soak them in the refrigerator overnight for the maximum flavor saturation.
People around the world add a great variety of flavors to boiled peanuts; salt, sea salt, dried pepper flakes, jalapeno peppers, old bay seasoning, shrimp and crawfish boil seasoning, sugar, jaggery, star anise, turmeric, Chinese 5 spice, cilantro, onion, lemon, fresh garlic, Szechuan peppercorn, chicken stock, pork stock, cayenne pepper, black pepper, white pepper, garlic powder. chili powder, thyme, sweet basil, bay leaf, Cajun spice mixes, Creole spice mixes, hot sauces, etc.