Clatter LabsHelp Center

Can I call the Agent API from a browser or mobile app?

FAQUpdated

Technically the API allows cross-origin requests (that's what makes Try it work in the docs), but you shouldn't ship a key in a browser app, mobile app or public repository.

Why#

Anyone can read code that runs on their device. With your key and Account ID, they could start runs that spend your credits.

Do this instead#

  1. Keep the key on your backend, in a secret manager or environment variable.
  2. Have your front end call your backend.
  3. Your backend checks the user, then calls https://api.agent.clatterlabs.xyz.

This also lets you filter end-user text before it reaches Cosmos, which matters under the Abuse policy.

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.