In California it's actually based on how powerful the scooter is. Under 150cc doesn't require a motorcycle endorsement.
https://www.dmv.ca.gov/portal/dmv/detail/motorcycles/motorcy...
https://www.dmv.ca.gov/portal/dmv/detail/motorcycles/motorcy...
For electric mopeds, it's based on horsepower, not engine size.
A motor-driven cycle has 149cc or less engine size. CVC §405 A motor-driven cycle has to be registered and the driver must have a motorcycle license (M1).