Clatter LabsHelp Center

How do I run the cURL example in Windows Command Prompt?

How-toUpdated

cmd.exe doesn't understand single-quoted JSON. Easiest fix: save the body to body.json and reference it.

curl https://api.gateway.clatterlabs.xyz/v1/chat/completions ^
  -H "Authorization: Bearer %CLATTER_API_KEY%" ^
  -H "X-Clatter-Account: %CLATTER_ACCOUNT_ID%" ^
  -H "Content-Type: application/json" ^
  -d @body.json

Set the variables with set CLATTER_API_KEY=clsk_... first. PowerShell users can use Invoke-RestMethod instead.

Good to know#

  • Every call shows in Console › Logs and Usage as Model API, with its price. See what you spent
  • New accounts get $5 of free credit; top up from $1 to $800 per purchase in Console › Billing › Credits. Billing
  • Keep keys on your server, never in a browser or mobile app. Why

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.