NEW YORK — The meal kit business has expanded rapidly in the past four years, shipping boxes of raw meat, seafood, fresh vegetables and other ingredients to busy city folk who want to skip the supermarket and still cook at home.

Now they want to tempt even more people to give them a try.

But the companies face several challenges as they grow. They need to hold onto customers they already have, figure out how to ship uncooked food farther outside of cities and continue luring funds from increasingly tight-fisted investors. The industry is growing quickly in the U.S., after first gaining popularity in Europe, and competition is heating up as more players join the fray.

Because of that, meal kit companies are doing all they can to stand out. Blue Apron started to ship wine last year to pair with its meals. HelloFresh began airing TV commercials in November featuring celebrity chef Jamie Oliver. Gobble promises that its meals can be cooked in one pan within 15 minutes. And Purple Carrot, which ships vegan meals, brought on cookbook author Mark Bittman to come up with recipes like tofu fries and onion-stuffed crepes.

Even Martha Stewart wants in. The CEO of Sequential Brands, the brand management company that bought Martha Stewart Living last year, said in December that the company is considering a meal kit by the home goods mogul that would be similar to the “Blue Apron model.”

Meal kits are shipped to people’s doorsteps, and the raw ingredients come in an insulated cardboard box. Customers then cook the meals using included step-by-step recipes. Each kit comes with enough food to make several meals, which average about $10 each. Subscribers can get a new box every week.

People around the world spent $1.5 billion on these kits last year, with less than half of that coming from the U.S., according to the Technomic research group. It was the first time the company measured spending on meal kits.

The market in the U.S. is expected to grow faster than in any other country in the next five years, to as much as $6 billion by 2020, Technomic says.

“We don’t know how the market will shake out in five years, but there’s going to be some big winners and there will be some folks that won’t make it,” said Erik Thoresen, a principal at Technomic.

Holding on to customers may prove to be particularly challenging. Jumping from one meal kit service to the next is tempting because many offer free meals or heavily discounted boxes for new subscribers, Thoresen said.

To help fund their expansions, the companies also depend on investor cash, which has showed signs of tightening. Venture capitalists raised $28.2 billion last year from clients to invest in startups across all industries, down 9.5 percent from the year before, according to the National Venture Capital Association.

Shipping raw food isn’t easy, either. Currently, many customers live in cities, where it’s easier to get boxes delivered, said Darren Seifer, a food and beverage industry analyst at NPD Group. But expanding into more suburban areas may be tough because homes are more spread apart, he said.

“I don’t believe we’ll see mainstream adoption of home meal kits,” Seifer said.

Keith and Sharon Robinson in Evanston, Illinois, began using meal kits from Blue Apron and Plated about two years ago after finding discounts at daily deals websites Groupon and Gilt City. The kits let the high school vice principal and his pediatrician wife cook healthy meals for their two daughters without having to shop at the grocery store.

“It literally comes to the door,” Keith Robinson said. “Everything is right there; the little baggies of seasoning and spices, the meat, all the vegetables.”

Some meal-kit sellers have shaken up their businesses to get the attention of potential customers and venture capitalists, too.

Gobble, based in San Francisco, started in 2010 by delivering already-cooked meals that needed only to be heated in a microwave. But growth slowed, and after talking to customers, founder and CEO Ooshma Garg realized that people actually want to cook.

“They felt guilty feeding their kids out of a microwave,” she said.

So she came up with a different concept: sending raw ingredients that people can cook in one pan in 15 minutes. Company workers slice and chop vegetables, marinate meats and simmer sauces at Gobble’s kitchens before shipping them to subscribers.

The change was a hit with customers, boosting subscribers twentyfold in the first year. Investors in Silicon Valley also liked the new concept, giving Gobble nearly $11 million to help it hire more people and ship its meals in more cities around the country.

New York’s Purple Carrot, meanwhile, last year brought in Bittman, whose cookbooks and articles focused on eating plant-based foods for part of the day. Purple Carrot, founded in 2014, shipped 100,000 meals in its first year. That’s small potatoes compared with Blue Apron and HelloFresh, which say they ship millions of meals in a month. But Purple Carrot has big plans with Bittman, who is now a part owner, and the service has since expanded to the West Coast.

Other kits go beyond dinner, sending ingredients to make chocolate cake pops, vanilla loaf cakes and other desserts (Foodstirs) or smoothies with vegetables, fruit, nuts and seeds (Green Blender).

“It’s really cool that customers have become comfortable getting ingredients and food in the mail,” said Green Blender co-founder Jenna Tanenbaum.