Lilley, 39, says the party was the only research he did for Ja'mie: Private School Girl, his new six-part show which premieres on Comedy Central on Monday night.
"I wrote the show, I had all the ideas and I thought, 'I'd better just check a few details'. Instead of lurking around schools, I went to my niece's 16th birthday party and just hung out with the kids, getting ideas," Lilley told TimeOut.
"I knew I was going to have a party scene, so I noted down what they were wearing, what music they were listening to, what they were drinking. Just things I could [put into the show]."
Lilley didn't need to do much research because he's already put on Ja'mie's school dress twice before: On 2005's We Can Be Heroes: Finding The Australian of the Year, and again in 2007 hit Summer Heights High.
While both those shows contained multiple characters - all played by Lilley - his new show focuses on just one character: vile schoolgirl bully Ja'mie King.
"Some characters are harder to write than others for me and she's someone who comes really instinctively. I don't know why, I'm not a girl, I'm not a teenager," he says.
"I never listen to who the most popular characters are because probably Ja'mie is not one that I hear about as much as others. Jonah, and Nathan and Daniel, that's what people call out mostly when they see me, and Mr G. It became a massive undertaking - one Lilley found just as hard as his ambitious last show Angry Boys, a 10-part series which featured six different male characters, including twins Daniel and Nathan Sims.
"At first, I thought, 'I'm only doing one character and less episodes, this will be a walk in the park'," he says. "You forget that you have to fill in every single minute of screen time and the lead character is in every single scene and the supporting characters have to be interesting and have funny things to say.
"You don't have the luxury to jump to another world. You're in the same world the whole time."
Luckily, Ja'mie's surroundings are full of comedy potential, and the first episode is full of awkwardly hilarious moments. Most of those are based around the fact that Lilley is playing a flirty, aggressive and moody peer leader and prefect in her last year of high school.
In an early scene, Ja'mie performs an outrageously suggestive near-strip dance to school assembly - something Lilley admits he filmed in front of "a lot of people" - including real school students. You can tell he loved performing it - but it's the more intimate moments that Lilley finds most awkward.
"Ja'mie's really flirty with men in this series. She has a boyfriend and this African kid falls in love with her and she's ridiculously flirty with her dad for some reason.
"That stuff is the most uncomfortable, that's what makes me nervous. But when I feel awkward I think, 'At least you're doing something daring and brave' - that's what's exciting about it."
While New Zealand is getting the show late - it's already screened in Australia and the US, where it played on cable network HBO - Lilley says Ja'mie seemed to connect with audiences in ways he hadn't anticipated.
"For some reason America really connected with her. Maybe it's a more clear, obvious joke: it's a guy dressed up as a girl and high school stuff seems to go down well over there. There were a lot of celebrities tweeting about it and dressing up as Ja'mie."
It helps that Lilley's shows are so quotable, and Ja'mie is no different. Prepare to learn the meaning of expressions like "box gap"and "vagetarian".
But it's Ja'mie's use of the word "quiche" to describe something amazing that has really taken off: Katy Perry has used the expression in interviews, and former Australian prime minister Kevin Rudd used it in an Instagram hashtag.
Though Lilley admits Ja'mie isn't a likeable character - "you just don't like this girl," he says - the show is so hand-wringingly awkward it's hard to look away. And he promises that there are moments where viewers will say, "Okay, this girl's got a little bit of heart".
"I just thought if I could wrap it up and finish school and get her back in her element where she's back on top, she could start heading towards her downfall. It was an idea that grabbed me."
And what does Lilley's niece, the star of that birthday party, think about Lilley's show?
"She loves it. She said that every girl at school likes to decide which prefect they are and they name themselves after characters on the show. My niece was like, 'I'm the Madison of the group'. I was like, 'How are you not the Ja'mie? You look like me'."
What: Ja'mie: Private School Girl
Where: Comedy Central
When: Monday, 9.05pm
For fans of: We Can Be Heroes, Summer Heights High, Little Britain
- TimeOut