If you're an American entrepreneur starting a company in Brazil, chances are you've heard of Kimball Thomas and Davis Smith.

Last October, the two cousins founded Baby.com.br, an e-commerce site that's often compared to Diapers.com in the United States. After just nine months in business, they might be considered newbies by Silicon Valley standards, but in São Paulo, Thomas and Smith are already becoming part of the old guard. With 115 employees and $21 million in funding, Baby is widely considered to be the poster child for American entrepreneurial success in this nascent tech start-up scene. 

As such, Thomas and Smith have become a valuable lifeline for other ex-pat entrepreneurs struggling to navigate the bureaucratic hell that is starting a business in Brazil.

"Down here," Thomas says, "relationships are currency."

Brazil is a notoriously difficult place to start a business. It is ranked No. 126 on the World Bank's list of best places to do business. By the World Bank's measure, it would be much easier to start a business in, say, Ethiopia (No. 111). In Brazil, business owners spend 2,600 hours each year preparing their taxes, and simply registering your business can take 119 days. Still, over the past few years, a rapidly expanding group of entrepreneurs and investors are finding that the opportunities for growth in Brazil are worth withstanding the bureaucratic migraine. As this ecosystem expands, launching a business in Brazil is becoming a much less scary prospect. In fact, it's quite an attractive one.

Add to that the fact that Brazil is now the second-biggest market for Facebook and Twitter, and is home to more mobile phones than people: Really, it's no wonder entrepreneurs are packing up and moving to São Paulo.

For starters, the Brazilian middle class now accounts for more than half the population of the country. Although just 40 percent of Brazilians currently use the Internet, Brazilians reportedly spend some $13 billion a year on e-commerce. Add to that the fact that Brazil is now the second-biggest market for Facebook and Twitter, and is home to more mobile phones than people: Really, it's no wonder entrepreneurs are packing up and moving to São Paulo.

The money's flowing in, too. A source close to Sequoia Capital reports the venture capital firm is currently setting up an office in Brazil, and last week, the global venture capital firms Redpoint and e.ventures made headlines when they closed a $130 million fund that will focus exclusively on Brazil.

"The country's at a really interesting inflection point," says Yann DeVries, who's heading up the Redpoint e.ventures fund. "Since there's a relative lack of experienced Internet entrepreneurs here, those who have built businesses in Silicon Valley and elsewhere now have the opportunity to bring their know-how to Brazil."

Thomas and Smith, in many ways, embody that blueprint. In 2010, they were both in M.B.A. programs at Ivy League schools--Thomas at Harvard and Smith at Wharton. Having previously founded one successful business called PoolTables.com (which sold, of all things, pool tables), they were itching to start something new. After a chance conversation with a Brazilian classmate about how tough it is to find baby products in Brazil, Smith called Thomas to ask what he thought about launching a baby-focused e-commerce site in Brazil. They spent a year researching the market, and in July of last year, Thomas and Smith moved to São Paulo, along with their wives and children, to launch Baby.

"At that point, we were still pretty early for expat entrepreneurs," Thomas says. "We didn’t really have a touch point in Brazil yet." Without a clearly defined model to follow, the two co-founders ran into obstacle after obstacle. For example, they launched Baby while still on tourist visas. According to Thomas, they were certain that their working visas would arrive before their six months as tourists were up. Not quite. Just three months after Baby.com.br went live, Thomas and Smith were forced to return to the United States and spend the entire month of January waiting for their visas to clear, thousands of miles from their brand-new business.

"We've had to learn the hard way how to get things done around here," Thomas says. "We’re trying to pass those lessons on to other newcomers."

Thomas and Smith have now turned Baby's São Paulo headquarters into something of an informal incubator. Since last year, it has provided free office space to seven new businesses, including three founded by Americans. In a city as expensive as São Paulo, free work space is valuable, and the advice Baby's staff freely offers to newcomers is priceless.

Florian Hagenbuch and Mate Pencz began working out of Baby's offices when they moved to São Paulo in May to co-found Printi, an online printing service. According to Hagenbuch, when he was transferring Printi's seed capital from the United States to Brazil, the Brazilian bank he'd been working with reneged on its offer to do business with Printi at the last minute. Afraid he wouldn't have enough money to pay Printi's suppliers and employees in time, Hagenbuch asked Baby's CFO for help. Within an hour, Baby's own bank manager arrived at the office. Three hours later, Printi's account was cleared.

"It was absolutely unbelievable," Hagenbuch says. "We were able to complete the transfer in time and would never have been able to pull it off without them."

Daniel Hatkoff, founder of Pitzi, a subscription repair service for mobile phones, agrees. "There are so many resources down here that didn't exist a couple years ago," says Hatkoff, who also launched his business out of Baby's headquarters. "There's a chain of knowledge now that makes it easier for newcomers to get off the ground."

Of course, Brazilian entrepreneurs are also a key part of that ecosystem. Rio de Janeiro is now home to an incubator called 21212, which is modeled after Y Combinator. Co-founded by an American, Benjamin White, along with Brazilian entrepreneur Marcelo Sales, 21212's mission is to bridge the gap between native and foreign business owners. According to White, there is no shortage of local talent within the country. What's lacking are connections to established investors.

The goal is to keep promising talent from leaving the country in search of those contacts, as was the case when São Paulo native Mike Krieger set off for Stanford in 2004, only to co-found Instagram a few years later. Instead, 21212 hopes to bring those contacts to Brazil, and part of that process will involve matching local entrepreneurs with talented expats.

"Trying to set up a company as a foreign entrepreneur is difficult stuff, so I think if you can team a Brazilian entrepreneur who can navigate the environment with a foreign entrepreneur with contacts in the U.S., it’s a perfect mix," White says.

In March, 21212 held its first demo day, and though the majority of the 19 companies had Brazilian founders, White says he expects to see many more Americans flock to the incubator in the coming year.

"As more capital gets deployed in the consumer Internet space, it'll have a dramatic impact on how quickly the ecosystem evolves," White says. "Everyone knows the wave is coming, and if you're not in the water, you're never going to catch it."