The New York Times has filed a federal lawsuit against OpenAI and Microsoft, seeking to end the practice of using its stories to train chatbots.

In the suit filed on Wednesday in the Southern District of New York in Manhattan, the Times said OpenAI and Microsoft are advancing their technology through the “unlawful use of The Times’s work to create artificial intelligence products that compete with it” and “threatens The Times’s ability to provide that service”.

OpenAI and Microsoft did not immediately respond to requests for comment.

Media organisations have been pummelled by a migration of readers to online platforms and while many publications have carved out a digital space online as well, artificial intelligence technology has threatened to upend numerous industries, including media.

Artificial intelligence companies scrape information available online, including articles published by media organisations, to train generative AI chatbots.

Those companies have attracted billions in investments very rapidly.

The Times did not list specific damages that it is seeking, but said the legal action “seeks to hold them responsible for the billions of dollars in statutory and actual damages that they owe for the unlawful copying and use of The Times’s uniquely valuable works”.

In the complaint, the Times said Microsoft and OpenAI “seek to free-tide on The Times’s massive investments in its journalism” by using it to build products without payment or permission.

In July, OpenAI and The Associated Press announced a deal for the artificial intelligence company to license AP’s archive of news stories.

However, The New York Times said it has never given permission to anyone to use its content for generative AI purposes.

The lawsuit also follows what appears to be breakdowns in talks between the newspaper and the two companies.

The Times said it reached out to Microsoft and OpenAI in April to raise concerns about the use of its intellectual property and reach a resolution on the issue.

During the talks, the newspaper said it sought to “ensure it received fair value” for the use of its content, “facilitate the continuation of a healthy news ecosystem, and help develop GenAI technology in a responsible way that benefits society and supports a well-informed public”.

“These negotiations have not led to a resolution,” the lawsuit said.