Clatter LabsHelp Center

What is JSON, and why does the Model API use it?

ExplainerUpdated

JSON is a text format for structured data, with { } for objects, [ ] for lists and "quotes" around text:

{"model": "supercosmos-flash", "messages": [{"role": "user", "content": "Hi"}]}

The Model API reads requests and writes responses in JSON, so any programming language can use it. Common mistakes: trailing commas, single quotes instead of double quotes, and unescaped quotes inside text (these cause 400 invalid_json).

Good to know#

  • New accounts get $5 of free credit; top up from $1 to $800 per purchase in Console › Billing › Credits. Billing
  • Every response has an X-Request-Id; log it so a request can be found later. Why log it
  • Every call shows in Console › Logs and Usage as Model API, with its price. See what you spent

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.