Syndai Docs

Set an app's monthly AI limit

PUT
/api/v1/external/coding/customers/{customer_id}/apps/{publication_id}/ai-cap

Sets the most the app's no-key AI may spend in a UTC month, in USD the workspace pays (cap_usd, 0 to 10000; 0 or null, the default, turns it off), and optionally each signed-in member's own monthly limit (member_cap_usd; omitted = unchanged). This only sets limits and starts no paid work; raising it lets the app's AI calls spend up to the new amount, and past it they answer 402 ai_cap_reached until the month turns. A signed-in owner or admin only: an API key or a member is 403.

Authorization

CustomerApiKey
headerAuthorizationBearer <API Key>

Customer API key sent as a bearer token

Path Parameters

customer_id*string
Formatuuid
publication_id*string
Formatuuid

Request Body

application/json
  1. body
cap_usd?|
Rangevalue <= 10000
member_cap_usd?|
Rangevalue <= 10000

Response Body

Request fulfilled, document follows

application/json
  1. response
cap_usd*number
member_cap_usd?number
Default0
used_usd*number
Example Request
curl -X PUT 'https://api.syndai.ai/api/v1/external/coding/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08/apps/497f6eca-6276-4993-bfeb-53cbbbba6f08/ai-cap' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "cap_usd": 0,  "member_cap_usd": 0,  "used_usd": 0}