The Grok AI tool on Elon Musk's X will no longer be able to undress pictures of real people, the company has announced.
"We have implemented technological measures to prevent the Grok account from allowing the editing of images of real people in revealing clothing such as bikinis," said a statement.
"This restriction applies to all users, including paid subscribers."
It comes amid mounting condemnation in the UK and US of the chatbot's image editing capabilities, with British government ministers threatening the platform with action.
Sir Keir Starmer has described nonconsensual sex images produced by Grok as "disgusting" and "shameful", and media regulator Ofcom has launched an investigation.
The statement from X came hours after California announced its own state-level probe into the spread of sexualised images created by Grok, including of children.
Speaking at PMQs on Wednesday, Sir Keir had suggested action by the company may be imminent, telling MPs: "I have been informed this morning that X is acting to ensure full compliance with UK law.
"If so, that is welcome, but we're not going to back down, and they must act."
The controversy had seen X, which was bought by Mr Musk in 2022 when it was called Twitter, threatened with a potential fine or even ban in the UK.
Mr Musk, the billionaire owner of SpaceX and Tesla who has previously called for Sir Keir to be voted out of office, has claimed - along with Reform leader Nigel Farage - that a ban would be an attack on free speech.
Musk defends Grok safety measures
After the prime minister's comments at PMQs, Mr Musk wrote on X he was "not aware of any naked underage images generated by Grok".
"Obviously, Grok does not spontaneously generate images, it does so only according to user requests," he said.
"When asked to generate images, it will refuse to produce anything illegal, as the operating principle for Grok is to obey the laws of any given country or state.
"There may be times when adversarial hacking of Grok prompts does something unexpected. If that happens, we fix the bug immediately."
X had already announced in an earlier response to the political pressure that image creation and editing would be restricted to paid subscribers.
Technology Secretary Liz Kendall dismissed the move as merely "monetising abuse" and said the government would support Ofcom in whatever action it decides to take.
Ofcom's powers fall under the Online Safety Act, which states that online platforms have to make sure they're not hosting illegal content.
If X is found to not comply with the Online Safety Act, Ofcom can issue a fine of up to 10% of its worldwide revenue or £18m, and if that is not enough, can go as far as getting a court approval to block the site.
(c) Sky News 2026: X to block Grok AI from undressing images of real people
I'm ashamed of Sir Keir Starmer, says rebel MP - as row over justice reforms escalates
Counterterrorism police battle ferry gunmen in major training exercise
South East Water supply crisis is familiar tale for customers
Sadiq Khan: AI could usher in new era of mass unemployment
Police share video of burglar repeatedly falling while trying to escape petrol station raid