Shares of Nvidia (NVDA 6.18%) have nearly tripled so far in 2023 thanks to the growing adoption of artificial intelligence (AI) applications and the semiconductor stock has become quite expensive.

Nvidia is now trading at 42 times sales and its price-to-earnings ratio stands at 227. However, the company's forward earnings multiple of 55 -- using earnings estimates -- suggests that its bottom-line growth is set to accelerate rapidly over the next year. That wouldn't be surprising, given that Nvidia's hardware is playing a central role in helping companies train AI models and also run AI inference applications.

Nvidia reportedly controls between 80% and 95% of the market for AI chips. With the demand for AI chips expected to grow at an annual rate of 29% through the end of the decade, Nvidia is in a prime position to rapidly grow its revenue and earnings in the long run. Analysts expect the company's revenue to hit $74 billion in fiscal 2026, which would be a huge jump over fiscal 2023's revenue of $27 billion. Nvidia's fiscal year ends in late January.

However, not everyone may be comfortable paying such an expensive multiple for Nvidia. For those who find the stock too expensive, there is a cheaper alternative for investors looking to cash in on the AI boom: Cloudflare (NET 1.44%).

Cloudflare has started benefiting from the adoption of AI

Cloudflare, a cloud-based provider of internet infrastructure services, is already taking advantage of the growing proliferation of AI. For example, it seems that OpenAI's popular chatbot, ChatGPT, has been using Cloudflare's internet infrastructure since it gained popularity last year. Although Cloudflare has not named its customer, it said on its Q4 2022 earnings call in February that a "leading generative AI company" which was launched in late November 2022 and saw rapid adoption right off the bat, was having trouble "handling the massive load on their services from legitimate users, as well as keeping fraudulent users from exhausting their resources." That is presumably OpenAI and as Cloudflare's offerings keep internet connections safe and reliable, it seems like OpenAI may have turned toward it to tackle the heavy load that ChatGPT was experiencing.

And now, the company indicated on its latest earnings conference call with analysts that more generative AI companies are adopting Cloudflare's solutions. Management also said the company that presumably is OpenAI has expanded its relationship with Cloudflare, signing a bigger contract worth $1.7 million a year as compared to the earlier contract worth $1 million.

The size of these contracts may not be very big right now, but it won't be surprising to see them grow substantially. The company claims that it "is the most commonly used cloud provider across the leading AI start-ups," which are turning to its systems to protect their AI models. Cloudflare believes that it can "provide picks and shovels to enable AI companies to build the future," and that could translate into solid long-term gains for the company.

The company is already growing handsomely

Cloudflare released its second-quarter 2023 results on Aug. 2. The company's revenue shot up 32% year over year to $309 million. Cloudflare's revenue increased 34% in the first six months of the fiscal year to $599 million, driven by healthy growth in the customer base as well as an increase in customer spending.

For instance, the number of large customers that spend at least $100,000 on Cloudflare's services annually increased 34% year over year in the second quarter. The company's dollar-based net retention rate also stood at 115%. This metric compares the spending by Cloudflare's customers in a quarter to the spending by the same cohort of customers in the year-ago period. A reading of over 100% in this metric indicates that its existing customers are spending more money.

Cloudflare's guidance suggests that its terrific growth is here to stay. The company has estimated  $330 million in revenue in the current quarter at the midpoint of its guidance range, which would translate into a 32% gain over the prior year. So, Cloudflare is growing at a terrific pace already, and a potential increase in the number of AI-driven contracts could push up its growth rate.

Cloudflare expects its total addressable market to hit $146 billion this year, which means that it is just scratching the surface of a huge opportunity, which explains why Cloudflare's top line is expected to clock 30% annual growth over the next couple of years.

NET Revenue Estimates for Current Fiscal Year Chart.

NET Revenue Estimates for Current Fiscal Year data by YCharts.

The company expects annual revenue to hit $5 billion by 2027. Based on its 2022 revenue, Cloudflare's long-term forecast points toward an annual revenue growth rate of 38% for the next five years. With emerging catalysts such as AI coming into play, it won't be surprising to see Cloudflare hitting that mark.

That's why investors looking for an AI stock to add to their portfolios should consider this company. Cloudflare stock has surged 45% in 2023 and trades at 19 times sales. While that's expensive when compared to the S&P 500's price-to-sales ratio of 2.5, it is significantly lower than Nvidia's sales multiple.

What's more, analysts are expecting Cloudflare's bottom line to clock annual growth of 62% for the next five years, better than Nvidia's projected growth rate of 21%. All this indicates that investors would be getting a good deal on Cloudflare stock now.