Skip to content

Ajusta os tetos de tokens dos nós de IA

PUT/api/vault/ai-limits

Auth
Requires a token
Who can call it:
owner
admin
API key:
No API key accepted
X-CommunityId
X-CommunityId Send the X-CommunityId of the community the operation happens in.
Endpoint descriptions come straight from the API specification and are in Portuguese for now. The interface around them is translated.

Só owner e admin; vai para a auditoria (`AI_LIMITS_CHANGED`). Campos ausentes mantêm o valor atual. Limites: por chamada 100 a 100.000, por execução 100 a 1.000.000, por dia 100 a 100.000.000; por chamada ≤ por execução ≤ por dia (senão 422 `vault.aiLimitOrder`).

Headers

NameTypeDescription
X-CommunityIdoptionalstring (uuid)ID da comunidade em que a operação acontece. Obrigatório na maioria dos endpoints com escopo de comunidade.

Request body application/json

NameTypeDescription
maxTokensPerCalloptionalinteger
maxTokensPerRunoptionalinteger
maxTokensPerDayoptionalinteger

Responses

StatusDescription
200Os tetos, como no GET.
403Autenticado, mas sem permissão para esta operação.
422Fora dos limites (`vault.aiLimitInvalid`) ou fora de ordem (`vault.aiLimitOrder`).

curl example

curl -X PUT "https://api.memberfy.net/api/vault/ai-limits" \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-CommunityId: $COMMUNITY_ID" \
  -H "Content-Type: application/json" \
  -d '{}'