# Change the organization's limits

Sets or clears the organization's monthly limit for Aitronos servers and the default monthly limit per person. Send only the fields to change; the others keep their value, so two people changing different limits never undo each other. Returns the limits now in force, as [Get spend limits](/docs/api-reference/forge-compute/get-limits) does. A refused request stores nothing.

- **The organization limit** is the most the whole organization spends on Aitronos servers in a calendar month. Its servers are held to the tighter of this limit and the compute share of the monthly spending limit: creating or resuming an Aitronos server past it is refused with `402 FORGE_COMPUTE_SPEND_LIMIT_REACHED` (`details.reason` `org_compute_limit_reached`), and at the limit running servers are parked or keep running, as set in the organization's [compute settings](/docs/api-reference/forge-compute/get-settings).
- **The default per person** is each person's monthly limit unless a limit is [set for them](/docs/api-reference/forge-compute/update-member-limit). Lowering it below a person's [own limit](/docs/api-reference/forge-compute/update-my-limit) is allowed: the lower one applies.


Every change is recorded in the organization's audit log. Servers in your own cloud accounts are never limited here: the provider bills them.

Requires a bearer token (or API key) whose principal holds the `manage_billing` capability in the acting organization (the capability every spending limit is changed with). It works while Forge cloud compute is switched off, so limits can be set before the feature is switched on.

#### Query Parameters

**`organization_id`** string optional

The organization to act in. Defaults to your current organization. You must be an active member of it, or the request is refused with `403 ORGANIZATION_ACCESS_DENIED`.

#### Headers

**`X-Organization-Id`** string optional

The same as `organization_id`, as a header. When both are sent, the query parameter wins.

#### Body Parameters

**`org_limit_chf`** string, number or `null` optional

The organization's monthly limit for Aitronos servers, in CHF (`"40.00"` or `40`). Send `null` to clear it: only the compute share and the organization's monthly spending limit then apply.

**`member_default_chf`** string, number or `null` optional

The default monthly limit per person, in CHF. Send `null` to clear it: a person with no limit set for them and no own limit then has no per-person limit.

An amount must be at least CHF 0.01, have at most two decimals and be at most the organization's monthly spending limit (`organization.monthly_limit_chf`). An empty body changes nothing and records nothing in the audit log; it returns the limits as they are. Unknown fields are refused.

## Returns

The limits now in force: the same object as [Get spend limits](/docs/api-reference/forge-compute/get-limits#returns), with `organization.limit_chf` and `organization.member_default_chf` as stored, and every `fields` entry's `value` updated.


```json
{
  "currency": "CHF",
  "month": "2026-10",
  "organization": {
    "limit_chf": "40.00",
    "compute_share_limit_chf": null,
    "effective_limit_chf": "40.00",
    "monthly_limit_chf": "80.00",
    "member_default_chf": "12.50",
    "spent_chf": "3.20"
  },
  "me": {
    "user_id": "usr_7f3a9c2e1b8d4e6fa0c5b3d9e2f1a4c7",
    "admin_limit_chf": "12.50",
    "self_limit_chf": null,
    "effective_limit_chf": "12.50",
    "limit_source": "default",
    "spent_chf": "1.66",
    "remaining_chf": "10.84"
  },
  "spend_known": true,
  "can_view_org_spend": true,
  "can_edit_org_limits": true,
  "can_edit_own_limit": true,
  "summary": "You have spent CHF 1.66 of your CHF 12.50 monthly limit for Aitronos servers. Your organization has spent CHF 3.20 of its CHF 40.00 monthly limit for Aitronos servers.",
  "fields": {
    "org_limit_chf": {
      "label": "Organization limit for Aitronos servers",
      "help": "The most your whole organization can spend on Aitronos servers in a calendar month. Leave it empty for no separate limit: the organization's monthly spending limit still applies.",
      "value": "40.00",
      "min": "0.01",
      "max": "80.00",
      "step": "0.01",
      "editable": true
    },
    "member_default_chf": {
      "label": "Default limit per person",
      "help": "The most each person can spend on Aitronos servers in a calendar month, unless you set a different limit for them. Leave it empty for no default.",
      "value": "12.50",
      "min": "0.01",
      "max": "80.00",
      "step": "0.01",
      "editable": true
    },
    "member_limit_chf": {
      "label": "Limit for this person",
      "help": "Replaces the default limit for this person. Leave it empty to use the default.",
      "value": null,
      "min": "0.01",
      "max": "80.00",
      "step": "0.01",
      "editable": true
    },
    "self_limit_chf": {
      "label": "My limit",
      "help": "Set a lower limit for your own Aitronos servers. It can only be lower than what your organization allows you. Leave it empty to use the limit your organization set.",
      "value": null,
      "min": "0.01",
      "max": "12.50",
      "step": "0.01",
      "editable": true
    }
  }
}
```

## Errors

A refused amount is answered with `422 VALIDATION_ERROR` whose `details.field` names the field and `details.reason` says why; `message` is the sentence to show, for example "The limit can be at most CHF 80.00.". Nothing is stored, not even a valid field sent alongside.

| Status | Code | When |
|  --- | --- | --- |
| 401 | `AUTHENTICATION_REQUIRED` | No valid credential. |
| 403 | `ORGANIZATION_ACCESS_DENIED` | `organization_id` or `X-Organization-Id` names an organization you are not an active member of. |
| 403 | `INSUFFICIENT_PERMISSIONS` | The caller does not hold `manage_billing` in the acting organization. |
| 422 | `VALIDATION_ERROR` | An amount below CHF 0.01 (`details.reason` `must be at least CHF 0.01`), with more than two decimals (`can have at most two decimals`), above the organization's monthly spending limit (`can be at most CHF 80.00`, with the organization's own amount). |
| 422 | `VALIDATION_ERROR` | An unknown field, or a value that is not a number: `details.fields` lists each field with its `message` and `type` (for example `extra_forbidden`). |



```bash cURL
curl -X PUT "https://api.aitronos.com/v1/forge/compute/limits/organization" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"org_limit_chf": "40.00", "member_default_chf": "12.50"}'
```


```python Python SDK
# pip install aitronos-sdk
#
# The Python SDK does not expose a typed `forge_compute` namespace yet, so call
# the endpoint directly with the same credential you would pass to `Aitronos(...)`
# — an API key or a bearer token, both sent as `Authorization: Bearer <value>`.
import httpx

API_KEY = "your-api-key"

limits = httpx.put(
    "https://api.aitronos.com/v1/forge/compute/limits/organization",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"org_limit_chf": "40.00", "member_default_chf": "12.50"},
).json()
print(limits["summary"])
```


```python Python
import os
import requests

token = os.environ["AITRONOS_TOKEN"]
# Clear the default per person; the organization limit keeps its value.
response = requests.put(
    "https://api.aitronos.com/v1/forge/compute/limits/organization",
    headers={"Authorization": f"Bearer {token}"},
    json={"member_default_chf": None},
)
if response.status_code == 422:
    print(response.json()["error"]["message"])
else:
    print(response.json()["organization"])
```


```javascript JavaScript
const response = await fetch("https://api.aitronos.com/v1/forge/compute/limits/organization", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.AITRONOS_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ org_limit_chf: "40.00" }),
});
const limits = await response.json();
console.log(limits.organization.effective_limit_chf);
```

**Response:**

200 OK

```json
{
  "currency": "CHF",
  "month": "2026-10",
  "organization": {
    "limit_chf": "40.00",
    "compute_share_limit_chf": null,
    "effective_limit_chf": "40.00",
    "monthly_limit_chf": "80.00",
    "member_default_chf": "12.50",
    "spent_chf": "3.20"
  },
  "me": {
    "user_id": "usr_7f3a9c2e1b8d4e6fa0c5b3d9e2f1a4c7",
    "admin_limit_chf": "12.50",
    "self_limit_chf": null,
    "effective_limit_chf": "12.50",
    "limit_source": "default",
    "spent_chf": "1.66",
    "remaining_chf": "10.84"
  },
  "spend_known": true,
  "can_view_org_spend": true,
  "can_edit_org_limits": true,
  "can_edit_own_limit": true,
  "summary": "You have spent CHF 1.66 of your CHF 12.50 monthly limit for Aitronos servers. Your organization has spent CHF 3.20 of its CHF 40.00 monthly limit for Aitronos servers.",
  "fields": {
    "org_limit_chf": {
      "label": "Organization limit for Aitronos servers",
      "help": "The most your whole organization can spend on Aitronos servers in a calendar month. Leave it empty for no separate limit: the organization's monthly spending limit still applies.",
      "value": "40.00",
      "min": "0.01",
      "max": "80.00",
      "step": "0.01",
      "editable": true
    },
    "member_default_chf": {
      "label": "Default limit per person",
      "help": "The most each person can spend on Aitronos servers in a calendar month, unless you set a different limit for them. Leave it empty for no default.",
      "value": "12.50",
      "min": "0.01",
      "max": "80.00",
      "step": "0.01",
      "editable": true
    },
    "member_limit_chf": {
      "label": "Limit for this person",
      "help": "Replaces the default limit for this person. Leave it empty to use the default.",
      "value": null,
      "min": "0.01",
      "max": "80.00",
      "step": "0.01",
      "editable": true
    },
    "self_limit_chf": {
      "label": "My limit",
      "help": "Set a lower limit for your own Aitronos servers. It can only be lower than what your organization allows you. Leave it empty to use the limit your organization set.",
      "value": null,
      "min": "0.01",
      "max": "12.50",
      "step": "0.01",
      "editable": true
    }
  }
}
```

422 Above the spending limit

```json
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The limit can be at most CHF 80.00.",
    "system_message": "Invalid Forge compute limit org_limit_chf: can be at most CHF 80.00",
    "type": "validation_error",
    "status": 422,
    "details": {"field": "org_limit_chf", "reason": "can be at most CHF 80.00", "value": "120.00"},
    "trace_id": "3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34",
    "timestamp": "2026-10-01T09:00:00Z"
  }
}
```

422 Unknown field

```json
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Extra inputs are not permitted",
    "system_message": "Request validation failed",
    "type": "validation_error",
    "status": 422,
    "details": {
      "fields": [
        {
          "field": "self_limit_chf",
          "message": "Extra inputs are not permitted",
          "type": "extra_forbidden"
        }
      ]
    },
    "trace_id": "3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34",
    "timestamp": "2026-10-01T09:00:00Z"
  }
}
```

403 Forbidden

```json
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "You don't have permission to perform this action.",
    "system_message": "Missing required capability: manage_billing",
    "type": "authorization_error",
    "status": 403,
    "details": {"required_capability": "manage_billing"},
    "trace_id": "3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34",
    "timestamp": "2026-10-01T09:00:00Z"
  }
}
```

## Related Resources

- [Forge cloud compute overview](/docs/api-reference/forge-compute/introduction)
- [List billing organizations](/docs/api-reference/forge-compute/list-billing-organizations)
- [Choose the default billing organization](/docs/api-reference/forge-compute/choose-billing-organization)
- [List project groups](/docs/api-reference/forge-compute/list-project-groups)
- [Register or update a project group](/docs/api-reference/forge-compute/put-project-group)
- [Delete a project group](/docs/api-reference/forge-compute/delete-project-group)
- [List compute offerings](/docs/api-reference/forge-compute/list-offerings)
- [Get offering options](/docs/api-reference/forge-compute/get-offering-options)
- [Resolve a free size](/docs/api-reference/forge-compute/resolve-offering-size)
- [List connected accounts](/docs/api-reference/forge-compute/list-credentials)
- [Connect a cloud account](/docs/api-reference/forge-compute/put-credential)
- [Disconnect a cloud account](/docs/api-reference/forge-compute/delete-credential)
- [Create a server](/docs/api-reference/forge-compute/create-host)
- [List servers](/docs/api-reference/forge-compute/list-hosts)
- [List your servers in every organization](/docs/api-reference/forge-compute/list-my-hosts)
- [Get a server](/docs/api-reference/forge-compute/get-host)
- [Get a server's daily cost and uptime](/docs/api-reference/forge-compute/get-host-usage)
- [List a server's running intervals](/docs/api-reference/forge-compute/list-host-intervals)
- [List a server's event history](/docs/api-reference/forge-compute/list-host-events)
- [Report a setup step](/docs/api-reference/forge-compute/report-progress)
- [Report the server's host key](/docs/api-reference/forge-compute/report-host-key)
- [Mark a server ready](/docs/api-reference/forge-compute/report-ready)
- [Report activity](/docs/api-reference/forge-compute/report-activity)
- [Park a server](/docs/api-reference/forge-compute/park-host)
- [Resume a server](/docs/api-reference/forge-compute/resume-host)
- [Delete a server](/docs/api-reference/forge-compute/delete-host)
- [Revoke a server](/docs/api-reference/forge-compute/revoke-host)
- [Get compute settings](/docs/api-reference/forge-compute/get-settings)
- [Update compute settings](/docs/api-reference/forge-compute/update-settings)
- [Get spend limits](/docs/api-reference/forge-compute/get-limits)
- [Change the organization's limits](/docs/api-reference/forge-compute/update-organization-limits)
- [Set your own limit](/docs/api-reference/forge-compute/update-my-limit)
- [List member limits](/docs/api-reference/forge-compute/list-member-limits)
- [Set a member's limit](/docs/api-reference/forge-compute/update-member-limit)
- [Delete a leftover resource](/docs/api-reference/forge-compute/delete-orphan)