PurposeAlthough the short-video-based application TikTok and its AI-enhanced technology have achieved enormous success and reshaped the user experience, few studies have focused on the user experience in the TikTok context. This study adopts a technology affordance theory lens to identify the main mechanisms contributing to the user experience in the short-video platform context while including user experience level and video length as moderating effects.Design/methodology/approachThis study collected 401 valid questionnaires from TikTok users and used the structural equation modeling approach to examine the proposed research model.FindingsThree technology affordances (perceived effortlessness, perceived recommendation accuracy, and perceived recommendation serendipity) contribute to TikTok users' optimal flow experience. Multi-group analysis results further indicate that individuals react differently to the same stimuli as their experience level increases. Finally, video length critically influences the impact of technology affordances on users' cognitive responses.Originality/valueAs a burgeoning industry, the mechanisms enabling short-video platforms to engage users remain unclear to practitioners and researchers. Thus, this study's technology affordance lens provides necessary insights into how TikTok's innovative and advanced technologies contribute to user flow experience from a context-dependent perspective. Furthermore, given that most existing studies have neglected possible variations in user preferences when investigating the effects of technology, this study enriches the existing literature by employing user experience level and video length as moderators.