While the need to foster critical AI literacy (CAIL) among L2 writers has gained increasing recognition, research offering empirically grounded models for integrating CAIL into L2 writing remains limited. To contribute to the ongoing research in AI-assisted L2 writing and CAIL, we designed the current study to understand how students used ChatGPT, a popular generative AI technology, to support their writing and to uncover their CAIL in their writing practices in two first-year writing classes in the US. Adopting a qualitative case study design, we analyzed students' interview data, written reflections, AI logs, and screencasts of students' interactions with AI. Findings show that students utilized AI in various ways, including topic selection and brainstorming, outlining, revising, editing, and sourcing. We propose an APSE model based on four dimensions identified in students' CAIL while using ChatGPT: (1) critical awareness of AI (A), (2) critical positionality (P), (3) critical strategies for interacting with AI (S), and (4) critical evaluation of AI affordances (E). The model highlights the distinct yet overlapping components of CAIL and addresses specific concerns that L2 writers face to leverage generative AI's linguistic and rhetorical resources critically. Pedagogical implications include explicit instruction on CAIL, developing students' AI feedback literacy, fostering meta-skills in communication and evaluation, and enhancing their AI-assisted self-directed learning skills.