OpenAI has fired back at Elon Musk's lawsuit alleging the artificial intelligence company violated its founding mission, publishing emails from the billionaire that appear to show him urging a radical money-raising strategy and corporate shift in OpenAI's early days.

In a blog post Tuesday night, the creator of ChatGPT included emails from 2015 to 2018 in which Mr. Musk argued OpenAI needed to raise at least $1 billion to have any chance of achieving its goals around artificial general intelligence, or AGI. He promised in 2015 to cover any funding shortfall beyond $100 million.

"This needs billions per year immediately or forget it," Mr. Musk wrote to OpenAI's founders in one December 2018 email included in the post. "I really hope I'm wrong."

The emails appear to undercut some of the key claims in Mr. Musk's lawsuit filed last week in California state court alleging the company he co-founded breached its founding mission of pursuing AGI as a nonprofit. In that complaint, Mr. Musk accused OpenAI of chasing profit ahead of safety and technological ambitions by closely partnering with Microsoft and creating for-profit and nonprofit corporate structures.

"We're sad that it's come to this with someone whom we've deeply admired-someone who inspired us to aim higher, then told us we would fail, started a competitor, and then sued us when we started making meaningful progress towards OpenAI's mission without him," OpenAI said in its blog response.

Mr. Musk didn't immediately respond to a request for comment on the emails published by OpenAI. His lawsuit alleges the "true motivations" of the company's restructuring "were to start capitalizing on that technology, including by securing billion-dollar-plus funding from Microsoft, in violation of OpenAI's foundational principles."

The Tesla and SpaceX CEO co-founded OpenAI in 2015 before departing as an active board member a few years later amid tensions with the nascent startup. He has since launched his own AI firm called xAI as a potential competitor.

In one November 2015 email, Mr. Musk told OpenAI's current CEO Sam Altman that the fledgling AI research group needed to raise far more than $100 million to "avoid sounding hopeless." He suggested a $1 billion funding commitment, and said "I will beg, borrow or take it from Tesla if need be."

OpenAI said Mr. Musk never followed through on his billion-dollar funding promise, committing $45 million while other donors raised $90 million. By late 2018, Mr. Musk was urgently pressing OpenAI's leaders to dramatically boost investment and resources or risk becoming "not relevant" compared to rivals like Google's DeepMind AI unit.

"My probability assessment of OpenAI being relevant to DeepMind/Google without a dramatic change in execution and resources is 0%. Not 1%," he wrote them. "Even raising several hundred million won't be enough."

OpenAI in 2019 launched a for-profit entity alongside its nonprofit research to rapidly scale up investment and compute power for developing AI systems like ChatGPT. Microsoft has since committed $13 billion toward the effort through a close commercial partnership.

The stark contrast between Mr. Musk's past prodding and his recent lawsuit alleging a betrayal of OpenAI's principles hints at the tensions simmering between the brash billionaire and the startup he helped found but became estranged from as it achieved major breakthroughs without him. OpenAI said Mr. Musk had sought majority equity, board control and to be CEO before leaving.

Mr. Musk's suit seeks to recoup profits and block OpenAI from closed-source releases, which the company rejected by saying transparency remains a priority balanced against safety precautions. It also contests the notion that contracts were violated, arguing its for-profit shift aligned with Mr. Musk's own proposed strategy before their split.

"The emails show that both Elon and others at OpenAI wanted to secure significant funding, start being less open with our research than we previously had been, and take steps towards product development and deployment," the company wrote. "We intend to move to dismiss all of Elon's claims."

OpenAI says it hasn't strayed from its founding AGI mission, but is pursuing that audacious goal through the profit-generating model Mr. Musk himself pushed for before their acrimonious breakup. Now the two are poised for an AI-fueled court battle between the mercurial billionaire and the startup he once claimed would fail unless it pursued the strategy he endorsed.