Sam Altman is scheduled to testify in a California court on Tuesday and Wednesday as the high-profile legal battle between Elon Musk and OpenAI enters a crucial stage.

The closely watched trial, now in its third week, could have major implications for the future leadership and structure of OpenAI at a time when the company is rapidly expanding its artificial intelligence infrastructure and attracting massive investments from major technology firms and global investors.

Musk’s lawsuit claims that Altman and other OpenAI executives persuaded him to contribute nearly $38 million when the organisation was still operating as a nonprofit focused on developing AI for the benefit of humanity.

According to Musk, OpenAI later abandoned that original mission and shifted toward becoming a profit-driven company.

OpenAI has denied the allegations and argued that Musk was aware of discussions surrounding a potential for-profit structure from the early stages. The company also claims the billionaire entrepreneur later became frustrated after failing to gain control over the organisation.

The courtroom battle has generated widespread attention across Silicon Valley because it offers a rare inside look into the power struggle behind one of the world’s most influential artificial intelligence companies.

Former OpenAI chief scientist Ilya Sutskever testified on Monday that he spent nearly a year gathering information for the board regarding what he described as a “consistent pattern of lying” by Altman.

Several current and former OpenAI executives have already appeared during the trial, including OpenAI President Greg Brockman, former chief technology officer Mira Murati and former board member Shivon Zilis.

Musk, who is seeking the removal of Altman and Brockman from their leadership positions, told the court that OpenAI was originally envisioned as a charitable organisation rather than a corporate AI giant.

The billionaire entrepreneur testified that his financial backing for OpenAI was “specifically meant to be for a charity.”

Musk also claimed that although he knew about early conversations regarding a for-profit transition, Altman repeatedly reassured him that the nonprofit mission of OpenAI would remain protected.

The testimony from Altman is expected to become one of the most closely followed moments of the trial as tensions between the two tech billionaires continue to dominate discussions across the artificial intelligence industry.