According to the official document Google APIs - Global domain errors, the error you have obtained from the API has the following specification:
TOO_MANY_REQUESTS (429)
rateLimitExceeded
Too many requests have been sent within a given time span.
Thus the API is signaling you that you've issued too many API requests in a small amount of time.
An accustomed solution to this is to have your program catch these kind of errors for to implement exponential backoff retrying the culprit API call.
Addendum
According to Google staff, you have to wait for a while before you're allowed to create new playlists:
Status: Won't Fix (Intended Behavior)
Creating high volumes of playlists via the API in a short amount of time may result in this error. The length of time to wait is variable. You may wish to use a method such as exponential backoff or queuing for a retry later in cases where you're attempting to fulfill a request on behalf of a user.
Do note that you hit an undocumented limit of YouTube Data API. Unfortunately, this API has quite a few of them. Stackoverflow and Google's own issue tracker did uncovered some of those limits.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…