# Update compute settings

Changes some of your organization's Forge cloud compute settings. Send only the fields to change; the others keep their value. Returns the settings now in force. A refused request stores nothing.

Requires a bearer token (or API key) whose principal holds the `manage_forge` capability in the acting organization. It works while Forge cloud compute is switched off, so the policy 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

**`at_cap_behavior`** string optional

`park` or `keep_running`: what happens to running Aitronos servers when the organization reaches its spending limit.

**`auto_park_idle_hours`** integer or `null` optional

Hours without activity before a `ready` server is parked automatically, 1 to 168. Send `null` to clear your choice: bring-your-own servers are then never parked automatically, while Aitronos servers still park after 1 hour (automatic parking cannot be switched off for them). The effective Aitronos value is returned as `aitronos_auto_park_idle_hours`.

**`idle_reminder_hours`** integer optional

Hours without activity before the idle reminder shows, 1 to 168.

Only `auto_park_idle_hours` accepts `null`. Unknown fields are refused.

## Returns

The settings now in force:

- **`at_cap_behavior`** string — what happens to running Aitronos servers when the organization reaches its spending limit: `park` (default: the work is saved and compute charges stop) or `keep_running`. At 90% of the limit every running Aitronos server carries a `notice` either way. Servers in your own accounts are not affected: the provider bills them.
- **`auto_park_idle_hours`** integer or `null` — your organization's choice: park any `ready` server automatically after this many hours without reported [activity](/docs/api-reference/forge-compute/report-activity), 1 to 168. `null` (default) means no choice: bring-your-own servers are then never parked automatically, and Aitronos servers use the platform default. Servers whose offering cannot park are left running.
- **`aitronos_auto_park_idle_hours`** integer — read-only: the hours without activity after which an Aitronos server is actually parked. `auto_park_idle_hours` when set, otherwise `1`. Automatic parking cannot be switched off for Aitronos servers: they run on Aitronos' own account.
- **`idle_reminder_hours`** integer — show the `idle_reminder` on a `ready` server after this many hours without activity, 1 to 168. Default `8`.



```json
{
  "at_cap_behavior": "park",
  "auto_park_idle_hours": 4,
  "aitronos_auto_park_idle_hours": 4,
  "idle_reminder_hours": 2
}
```

## Errors

| 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_forge` in the acting organization. |
| 422 | `VALIDATION_ERROR` | A value outside 1 to 168, an `at_cap_behavior` other than `park` or `keep_running`, `null` for a field that does not accept it, or an unknown field. `details` names the field. |



```bash cURL
curl -X PUT "https://api.aitronos.com/v1/forge/compute/settings" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"auto_park_idle_hours": 4, "idle_reminder_hours": 2}'
```


```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"

settings = httpx.put(
    "https://api.aitronos.com/v1/forge/compute/settings",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={"auto_park_idle_hours": 4, "idle_reminder_hours": 2},
).json()
print(settings)
```


```python Python
import os
import requests

token = os.environ["AITRONOS_TOKEN"]
# Clear the choice: bring-your-own servers stop auto-parking, Aitronos servers
# go back to the 1-hour default. The other settings keep their value.
response = requests.put(
    "https://api.aitronos.com/v1/forge/compute/settings",
    headers={"Authorization": f"Bearer {token}"},
    json={"auto_park_idle_hours": None},
)
print(response.status_code, response.json())
```


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

**Response:**

200 OK

```json
{
  "at_cap_behavior": "park",
  "auto_park_idle_hours": 4,
  "aitronos_auto_park_idle_hours": 4,
  "idle_reminder_hours": 2
}
```

422 Out of range

```json
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Input should be less than or equal to 168",
    "system_message": "Request validation failed",
    "type": "validation_error",
    "status": 422,
    "details": {
      "fields": [
        {
          "field": "idle_reminder_hours",
          "message": "Input should be less than or equal to 168",
          "type": "less_than_equal"
        }
      ]
    },
    "trace_id": "3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34",
    "timestamp": "2026-09-28T09:00:00Z"
  }
}
```

422 Not allowed

```json
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The compute setting at_cap_behavior must be park or keep_running.",
    "system_message": "Invalid Forge compute setting at_cap_behavior: must be park or keep_running",
    "type": "validation_error",
    "status": 422,
    "details": {"field": "at_cap_behavior", "reason": "must be park or keep_running", "value": "None"},
    "trace_id": "3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34",
    "timestamp": "2026-09-28T09: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_forge",
    "type": "authorization_error",
    "status": 403,
    "details": {"required_capability": "manage_forge"},
    "trace_id": "3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34",
    "timestamp": "2026-09-28T09: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)