Clatter LabsHelp Center

How do I fix 400 invalid_json or invalid_request on the Model API?

TroubleshootingUpdated
  • 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 missing model or messages.

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 the Retry-After seconds before retrying.
  • When asking support about an error, send the key's name, never the key.

Learn more#

Still need help?#

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.xyz
For deleting your whole account or the data of one service.