How do I fix 400 invalid_json or invalid_request on the Model API?
invalid_json— the body can't be parsed. Check quotes, commas and escaping.invalid_request— valid JSON, but not a valid chat completion, for example missingmodelormessages.
Send Content-Type: application/json, and start from the Console's Models page snippets.
Good to know#
- Branch your code on the error
code, not the message. - On
429, wait theRetry-Afterseconds before retrying. - When asking support about an error, send the key's name, never the key.
Learn more#
Still need help?#
- General support: support@clatterlabs.com or team@clatterlabs.xyz
- Infrastructure questions, or permanent deletion of your data (your whole account or one service): infrastructure@clatterlabs.xyz
We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Related articles
Still need help?
Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyzFor deleting your whole account or the data of one service.