Importance: Although prescription opioids are the most common way adolescents and young adults initiate opioid use, many studies examine population-level risks following the first opioid prescription. There is currently a lack of understanding regarding how patterns of opioid prescribing following the first opioid exposure may be associated with long-term risks. Objective: To identify distinct patterns of opioid prescribing following the first prescription using group-based trajectory modeling and examine the patient-, clinician-, and prescription-level factors that may be associated with trajectory membership during the first year. Design, Setting, and Participants: This cohort study examined Pennsylvania Medicaid enrollees' claims data from 2010 through 2016. Participants were aged 10 to 21 years at time of first opioid prescription. Data analysis was performed in March 2020. Main Outcomes and Measures: This study used group-based trajectory modeling and defined trajectory status by opioid fill. Results: Among the 189477 youths who received an initial opioid prescription, 107562 were female (56.8%), 81915 were non-Latinx White (59.6%), and the median age was 16.9 (interquartile range [IQR], 14.6-18.8) years. During the subsequent year, 47477 (25.1%) received at least one additional prescription. Among the models considered, the 2-group trajectory model had the best fit. Of those in the high-risk trajectory, 65.3% (n = 901) filled opioid prescriptions at month 12, in contrast to 13.1% (n = 6031) in the low-risk trajectory. Median age among the high-risk trajectory was 19.0 years (IQR, 17.1-20.0 years) compared with the low-risk trajectory (17.8 years [IQR, 15.8-19.4 years]). The high-risk trajectory received more potent prescriptions compared with the low-risk trajectory (median dosage of the index month for high-risk trajectory group: 10.0 MME/d [IQR, 5.0-21.2 MME/d] vs the low-risk trajectory group: 4.7 MME/d [IQR, 2.5-7.8 MME/d]; P <.001). The trajectories showed persistent differences with more youths in the high-risk trajectory going on to receive a diagnosis of opioid use disorder (30.0%; n = 412) compared with the low-risk group (10.1%; n = 4638) (P <.001). Conclusions and Relevance: This study's results identified 2 trajectories associated with elevated risk for persistent opioid receipt within 12 months following first opioid prescription. The high-risk trajectory was characterized by older age at time of first prescription, and longer and more potent first prescriptions. These findings suggest even short and low-dose opioid prescriptions can be associated with risks of persistent use for youths.