OpenAI, the company behind ChatGPT, has filed confidential preliminary paperwork with the US Securities and Exchange Commission (SEC), taking a key step towards a potential stock market listing.

The San Francisco-based artificial intelligence company announced the filing on Monday, becoming the latest major AI firm to move closer to an initial public offering (IPO).

"We expect it to leak so we're just announcing it," OpenAI said in a statement. "We have not decided on timing yet; it may be a while because there are things we want to do that are likely easier as a private company. But it's a complicated set of tradeoffs, and this gives us the option to go public sooner if that ends up being best."

The move follows rival Anthropic's announcement on 1 June that it is also pursuing an IPO. Both companies join Elon Musk's SpaceX, which has begun an IPO roadshow while positioning itself as an AI-focused space company.

OpenAI chief executive Sam Altman first raised the prospect of an IPO last year, describing it as the company's "most likely path" given its scale and its need for significant capital to develop advanced AI systems.