Spend limits

⚠️
Preview — this feature is being built; the design below is the spec.

Spend limits cap how much your organization can be charged in usage credits each calendar month, overall and per workspace, member or group. They already exist in the Console (see Billing & credits and Usage & cost); these endpoints expose the same controls to scripts, so budgets can be set from your finance tooling or infrastructure code and checked automatically.

Spend limits count only spending from usage credits. Tokens covered by your plan allowance never count against them.

Endpoints

MethodPathPurpose
GET/v1/organizations/spend_limitsEvery limit, with this month’s spend against each.
PUT/v1/organizations/spend_limitsSet or clear one limit.
PATCH/v1/organizations/spend_limits/settingsOrganization-wide options: credits on or off, multi-group policy.

Authenticate with an admin key and send syntic-beta: admin-2026-11-01. Changing limits needs a key created by an Owner or Administrator, as in the Console.

Read limits

GET /v1/organizations/spend_limits with optional scope (organization, workspace, member, group) to narrow the list.

{
  "type": "spend_limits",
  "period": { "starting_at": "2026-11-01T00:00:00Z", "ending_at": "2026-12-01T00:00:00Z" },
  "credits_enabled": true,
  "multi_group_policy": "lower",
  "organization": { "monthly_limit_usd": "500.00", "spent_usd": "212.4031" },
  "workspaces": [
    { "workspace_id": "wrkspc_01JC0A2C4E6G8J0L2N4Q", "monthly_limit_usd": "400.00", "spent_usd": "198.1022" },
    { "workspace_id": "wrkspc_01JC5B7D9F1H3K5M7P9R", "monthly_limit_usd": "25.00", "spent_usd": "14.3009" }
  ],
  "groups": [
    { "group_id": "grp_01JB...", "name": "Contractors", "monthly_limit_usd": "20.00" }
  ],
  "members": [
    {
      "user_id": "user_01J9Y0A2C4E6G8J0L2N4",
      "monthly_limit_usd": null,
      "inherited_limit_usd": "20.00",
      "inherited_from_group_id": "grp_01JB...",
      "effective_limit_usd": "20.00",
      "spent_usd": "6.2200"
    }
  ]
}
FieldMeaning
periodThe current calendar month in UTC. All limits reset at its end.
credits_enabledWhen false, requests stop with 402 once the plan allowance is used, and no limit is reached because nothing is charged.
multi_group_policyWhen a member is in several groups with limits: higher or lower group limit applies.
organization.monthly_limit_usdThe organization’s cap. New organizations start at 20.00.
workspaces[]Per-workspace caps. A workspace without a cap is not listed.
groups[]Group limits. A group limit applies to each member separately, not to the group’s total.
members[].monthly_limit_usdA member’s own limit, which wins over group limits.
members[].effective_limit_usdThe limit actually enforced for that member.

All money values are decimal strings in US dollars.

Set a limit

PUT /v1/organizations/spend_limits

FieldRequiredNotes
scopeYesorganization, workspace, member or group.
workspace_id / user_id / group_idFor those scopesWhich one.
monthly_limit_usdYesDecimal string, "0.00" to "1000000.00", or null to remove the limit (not allowed for organization).

The response is the updated spend_limits object. Lowering a limit below what has already been spent this month takes effect at once: the next request paid from credits is refused.

# Cap one member at $50 a month
curl -sS -X PUT https://app.syntic.ai/v1/organizations/spend_limits \
  -H "Authorization: Bearer $SYNTIC_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -H "syntic-beta: admin-2026-11-01" \
  -d '{"scope": "member", "user_id": "user_01J9Y0A2C4E6G8J0L2N4", "monthly_limit_usd": "50.00"}'

To be notified instead of polling, subscribe to the spend.threshold_reached webhook, sent at 50%, 80% and 100% of each limit.

Organization options

PATCH /v1/organizations/spend_limits/settings with either or both of:

FieldValues
credits_enabledtrue or false. Turning credits on requires a saved payment method or a positive balance.
multi_group_policyhigher or lower.

Auto-reload settings and credit purchases stay in the Console’s Billing page, because they move money.

What callers see when a limit is reached

Requests that would be paid from credits fail with 402:

{
  "error": {
    "type": "quota_exhausted",
    "code": "quota_exhausted",
    "message": "This workspace's monthly spend limit of $25.00 has been reached.",
    "param": null,
    "details": { "limit": "spend_limit", "limit_scope": "workspace", "resets_at": "2026-12-01T00:00:00Z" }
  },
  "request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
}

details.limit_scope (organization, workspace or member) is new; today’s flat error says only limit: "spend_limit".

Errors

Errors use the error envelope.

StatustypecodeWhen
400invalid_request_errorinvalid_amountNot a decimal string in range.
400invalid_request_errororganization_limit_requirednull sent for the organization scope.
403permission_errorrole_requiredThe key’s creator is not an Owner or Administrator.
404not_foundworkspace_not_found, user_not_found, group_not_foundUnknown id.
409conflict_errorpayment_method_requiredTurning credits on without a payment method or balance.

Build notes for the platform team

  • Wrap the existing usage-credit settings function; the enforcement path in the request pipeline does not change, apart from adding the workspace scope.
  • Every change writes billing.spend_limit_changed with old and new values.
Was this page helpful?