Clatter LabsHelp Center

How do I start my first Agent API run?

How-toUpdated

You can go from nothing to a finished run in about five minutes.

Steps#

  1. Sign in to the Console at console.clatterlabs.com with your Clatter Labs account. Copy your Account ID (it looks like CL-7K2M9QXA) from the Home page.
  2. Create an API key in API keys › Create key. Keep the runs:write and runs:read permissions and the default rate limit (30 requests per minute). Copy the key now: it starts with clsk_ and is shown only once.
  3. Start a run:
curl https://api.agent.clatterlabs.xyz/v1/runs \
  -H "Authorization: Bearer $CLATTER_API_KEY" \
  -H "X-Clatter-Account: $CLATTER_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -d '{"input": "Write hello.py that prints the date, run it, and tell me the output."}'

The API answers 201 right away with the run and its id.

  1. Watch it work by streaming GET /v1/runs/RUN_ID/events, or fetch GET /v1/runs/RUN_ID every few seconds.
  2. Read the result: output holds the answer, and files lists what Cosmos saved. Add ?include=files to get file contents.

If something goes wrong#

A 401 usually means the key or the X-Clatter-Account header is wrong. A 402 out_of_credits means your balance is empty. See the full Quickstart.

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.