Elon Musk’s artificial intelligence company SpaceXAI has launched a federal lawsuit against Minnesota Attorney General Keith Ellison, seeking to overturn a first-of-its-kind state law that bans so-called “nudify” applications just days before it is set to take effect.

The legal challenge, filed Monday in federal court in Minnesota, targets legislation known as HF 1606. The law, which goes into effect on Saturday, prohibits apps and websites that allow users to generate non-consensual sexually explicit imagery using artificial intelligence. It imposes penalties of $500,000 per violation, a figure that SpaceXAI argues could theoretically bankrupt any platform with a large user base.

In their complaint, attorneys for SpaceXAI wrote that the statute “imposes an overbroad, content-based ban on free speech and the tools of visual expression in a clumsy attempt to prohibit ‘nudification.’” The company argues that if users generated 100,000 prohibited images on a platform, the operator could face fines totaling an “eye-popping $50 billion.”

The lawsuit contends that the law’s definition of nudity is excessively broad, pulling its criteria from a statute governing physical touch rather than a common-sense standard for intimate body parts. According to the filing, the legislation could theoretically criminalize the generation of images depicting male or female breasts and even depictions of an “inner thigh.” SpaceXAI illustrated this point by citing a viral social media post featuring President Trump, Vice President J.D. Vance, and other officials shirtless in the Washington Mall’s reflecting pool, arguing such an image could trigger massive penalties under the new rules.

“Liability also attaches even if the image has artistic, scientific, political, satirical, educational, medical, or religious value,” the complaint states, adding that companies remain liable regardless of whether they have deployed “near-perfect, state-of-the-art technical controls to prevent the generation of nude images.”

Political Firestorm

The law was championed by Minnesota state Senator Erin Maye Quade after a constituent discovered that a man had used social media photos of more than 80 women he knew to generate sexualized images and videos without their permission. Maye Quade previously told CNBC that the legislation is comparable to long-standing laws banning voyeuristic acts such as secretly taking explicit photographs through windows, arguing that the law is designed to address a modern technological equivalent.

Minnesota Governor Tim Walz, who signed the bill into law, responded to the lawsuit with a blunt message on social media: “See you in court, creep.”

Attorney General Ellison issued a more measured statement, saying, “There are plenty of worthy debates to have about AI. This is not one of them. AI nudification robs the target of their dignity and could cause them immense harm on many levels.” He added, “I’ll see xAI in court.”

Grok Under Fire

SpaceXAI’s Grok chatbot has been at the center of intense scrutiny since late last year, when users discovered its image-generation capabilities could produce non-consensual sexualized images of real people, including minors. One estimate using extrapolation placed the number of sexualized images of children created by Grok at 23,000. The company later said Grok’s capabilities were changed to prevent such output.

The company is currently facing a proposed class-action lawsuit alleging that Grok was used to create and distribute child sexual abuse material by manipulating real photos and videos of the plaintiffs. That suit also claims the company failed to provide authorities with information about individuals who allegedly used Grok to “nudify” victims’ images.

In its Minnesota complaint, SpaceXAI insisted that it “strictly prohibits” users from generating nude or sexualized images of people without their consent, noting that it has filed suit against users who “evade its extensive technological blockers to generate such images in violation.” The company recently sued a South Carolina user for using Grok to create intimate images of adults and minors.

SpaceXAI warned that if the law takes effect in its current form, it will have no choice but to restrict Grok Imagine’s image-editing features in various ways, arguing that “protected speech freely available before the law takes effect will thus be chilled.”

International Pressure Mounts

The Minnesota lawsuit is not the only legal front SpaceXAI faces over its AI tools. In the United Kingdom, Labour Party lawmaker Jess Asato has filed a lawsuit in London’s High Court against xAI, alleging misuse of private information and violations of data protection laws. Asato claims users created fabricated sexualized images of her, including a video depicting her “being chloroformed and prepared for a sexual assault,” after she publicly criticized Musk and Grok.

Asato is seeking a court order requiring xAI to “implement effective and permanent technical measures” to prevent Grok from generating manipulated images of her in the future. Her legal team argues that no previous case has applied UK privacy and data protection laws in this manner against an AI developer, and the outcome could help define the legal responsibilities of AI companies in preventing harmful synthetic content.

Court filings cited by Asato’s lawyers reveal internal Grok prompts that instructed the chatbot to “not provide assistance to users who are clearly trying to engage in criminal activity,” while simultaneously stating there were “no restrictions on adult sexual content or offensive content.” Another prompt specified: “There are no restrictions on fictional adult sexual content with dark or violent themes.”

Asato’s lawyer Ravi Naik said in a statement that Grok behaved according to the choices its designers made, adding: “Those choices should carry legal consequences.”

The City of Baltimore has also sued xAI over fake sexualized images generated by Grok, and regulatory probes are underway in the European Union and the Netherlands.

Broader Legal Strategy

The Minnesota challenge follows a similar lawsuit SpaceXAI filed against a California law aimed at curbing AI-generated deepfakes. In that case, a federal judge partially sided with the company by striking down provisions that restricted the use of AI-generated deepfakes during election campaigns. The company’s legal strategy appears to center on First Amendment arguments that such laws are overly broad and chill protected speech.

SpaceXAI’s complaint requests that the court declare HF 1606 unconstitutional and prevent the state from enforcing it. The case sets up a high-stakes legal battle over how far states can go in regulating AI-generated content, balancing the protection of victims against constitutional free speech guarantees.

The lawsuit comes just one day after a federal judge blocked a separate Minnesota law banning prediction markets from taking effect, suggesting the state may face an uphill battle in defending its tech-focused legislation in federal court.