Some actors do 10 auditions before they land a role, others get the part because they’re friends with a producer — but in Claire Unabia’s case, she got a part on “Westworld” because she appeared in a Getty stock image she forgot about.

HBO’s robot-Western drama is set in a luxury park populated by human-looking robots, where the wealthy can pay exorbitant fees to murder, assault and even seduce them in historical settings such as the Wild West. Soon, however, the robots begin malfunctioning. In the show’s pilot, Peter Abernathy (Louis Herthun) is the first to malfunction when he looks at a picture of a woman in Times Square that a park visitor dropped on the ground. Unabia is that woman.

“It is a small role,” she says, “But such a pivotal part of the show in that it sets off Abernathy and going down the line to eventually all the robots rebelling.”

Unabia posed for the Times Square photo on a cold day four years before “Westworld” premiered in 2016. At the time, she thought it was for a tech company.

“I don’t know that they actually told me the name [of the company]. It’s always secretive with shoots. I didn’t think about it at all [after taking it].”

She found out that her image was a plot point on “Westworld” when a HuffPost reporter contacted her during Season 1’s run.

“At first I was in disbelief, I thought maybe this was a fake person trying to contact me or something, so I had to actually see for myself. I was so amazed and thrilled, it was just so surprising,” she says.

Unabia, who grew up in Oahu, Hawaii, and currently lives with her husband in Crown Heights, Brooklyn, was previously best known for appearing on Cycle 10 of “America’s Next Top Model.”

She says she’s taken this experience with “Westworld” as a “sign from God to get back into acting.”

As Season 1 reveals, Unabia’s character is Juliet, daughter of James Delos (Peter Mullan), sister to Logan (Ben Barnes) and wife of William (who’s played by both Jimmi Simpson and Ed Harris). Delos is the park’s parent company. Juliet commits suicide off-screen by the time William ages into Harris. But since the show frequently features flashbacks, Unabia appears in Season 2’s episode “Reunion,” which aired April 30.

“It was after Season 1 that I was contacted in regards to bringing that character from the photo to life,” she says. “And I was really excited and just wanted to make sure it wasn’t a prank [since HBO reached out via Instagram].”

HBO then flew her out to LA to film the “Reunion” episode. It was a day’s work, Unabia had one line and she remains coy about whether Juliet will return this season. “I can’t say at this point.” She still marvels at how it all came about from a stock image she didn’t know they used.

“I don’t think this has ever happened to anyone as far as I know — to end up on a TV show this way,” she says. “It’s very surreal but I feel like it’s very fitting with the show.”

“Westworld” 9 p.m. Sunday on HBO