Hello,
Thank you for reaching out to us. We’re sorry to hear that you’re facing issues with using Content AI on your articles.
The error message “is not a valid JSON response” typically indicates a problem with the data being returned from the server. To resolve this, we recommend refreshing the Content AI credits. Please head over to WordPress Dashboard → Rank Math → General Settings → Content AI and refresh the credits. Here’s a screenshot for reference:

After refreshing the credits, please try using Content AI again, and it should work without any issues.
We hope this helps! If you need further assistance, please don’t hesitate to let us know.
Sources:
Eliminate Errors: How to Use Content AI for Perfect Grammar
How to Write a Paragraph With Content AI » Rank Math
When i try to refresh my credit I am geting error:The response is not a valid JSON response.Can you help please?
Hello,
Thank you for your query and we are so sorry about the trouble this must have caused.
Please confirm that you have followed the steps in this tutorial to help you refresh the connection: https://rankmath.com/kb/how-to-restore-missing-content-ai-credits/
If that does not help, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.

It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.