Clatter LabsHelp Center

Does the Model API support JSON mode or response_format?

FAQUpdated

response_format isn't listed among the documented parameters, so don't rely on it. Two documented routes work:

  1. Tool calling with a schema. Define a function whose parameters is your JSON schema and set tool_choice to that function. The model returns function.arguments as JSON matching it.
  2. Ask for JSON in the prompt, set a low temperature, parse the reply and retry on a parse error.

Example: How do I get JSON back in Python?

Good to know#

  • Your key's account is responsible for your end users' text under the Abuse policy. What it means for apps
  • Keep keys on your server, never in a browser or mobile app. Why
  • Retry only 429 and 5xx errors, with backoff; honour Retry-After when it's sent. Which errors to retry

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.