Back to API Overview

Settings API

How much one AI chat message may spend before it stops, for the whole workspace.

1 endpoints

Endpoints

POST
/api/v1/settings/updateChatMessageLimit

Change how much one AI chat message may spend before it stops, for the whole workspace. Pass exactly ONE of: credits (on Serenities' AI models) = 10, 25, 50, 100 or 200 (default 25); or tokens (on the person's own AI key: input + output of every step) = 500000, 1000000, 2000000 or 5000000 (default 2000000). No other value is accepted. A message that reaches the limit stops between steps and says so; sending "continue" carries on in a new message. Call it ONLY when the person asks you to raise or lower the limit, with the value they chose; never on your own and never silently, and tell them the new limit. It counts from their next message. Refused for someone not allowed to change the workspace's settings. Returns { success, credits, tokens }.

Parameters

creditsnumber

Allowed values: 10, 25, 50, 100, 200

tokensnumber

Allowed values: 500000, 1000000, 2000000, 5000000

Example Request

curl -X POST https://app.serenitiesai.com/api/v1/settings/updateChatMessageLimit \
  -H "Authorization: Bearer mk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "credits": 0,
  "tokens": 0
}'