---
title: "Update desired application workspace resources"
method: PATCH
path: "/ai/applications/{application_public_id}/workspace"
tags: ["AI Applications"]
---

# Update desired application workspace resources

`PATCH /ai/applications/{application_public_id}/workspace`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/applications/{application_public_id}/workspace`
- Auth: HTTP bearer

Persists desired runtime and resource settings server-side, then replaces compute while retaining the application files.

## Path parameters

- `application_public_id` string, required

## Request body

- UpdateApplicationWorkspaceRequest
  - `cpu_limit` number, double, nullable
  - `disk_limit_mb` integer, nullable
  - `idle_timeout_secs` integer, nullable
  - `image` string, nullable: Pinned Temps-managed daemon image. Empty string restores the runtime default. Omit to leave the selected image unchanged. Arbitrary images are rejected.
  - `memory_limit_mb` integer, nullable
  - `pids_limit` integer, nullable
  - `runtime` string, nullable

## Response `200`

- ApplicationWorkspaceResponse
  - `cpu_limit` number, double, required
  - `cpu_usage_usec` integer, nullable
  - `data_network_service_count` integer, required
  - `desired_state` string, required
  - `disk_limit_enforced` boolean, required: Docker bind-mounted workspaces report usage but cannot enforce a per-directory quota. Firecracker workspaces enforce this value.
  - `disk_limit_mb` integer, required
  - `disk_used_bytes` integer, nullable
  - `idle_timeout_secs` integer, required
  - `image` string, nullable
  - `last_error` string, nullable
  - `memory_limit_mb` integer, required
  - `memory_used_bytes` integer, nullable
  - `open_preview_ports` integer[], required
  - `persistent_volume_healthy` boolean, required
  - `pids_limit` integer, required
  - `pids_used` integer, nullable
  - `runtime` string, required
  - `runtime_compatible` boolean, nullable
  - `runtime_update_available` boolean, required
  - `runtime_update_error` string, nullable
  - `runtime_update_image` string, nullable
  - `sandbox_public_id` string, nullable
  - `snapshot_id` string, nullable
  - `state` string, required

## Other responses

- `400`
- `401`
- `403`
- `404`

## Changes

- **2026-09-13** `dbda5c31c626`: 5 info
  - added the new optional request property `image`
  - added the optional property `runtime_compatible` to the response with the `200` status
  - added the optional property `runtime_update_error` to the response with the `200` status
  - added the optional property `runtime_update_image` to the response with the `200` status
  - …1 more
- **2026-09-07** `7a3103561bd0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/applications/:application_public_id/workspace/patch.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
