How can I avoid error 429, "Too many requests. Please wait and resend your request"?
When you receive this response, wait some time and try again. If you get the same error again, please wait longer between retries (e.g., double the wait time). Repeat this until the request succeeds. You can then gradually reduce the wait time again.
Sending less text in a single request may reduce the likelihood of this error.