Renew computer lease
Call Create computer first and replace cmp_123 with its returned ID.
POST
/agent/v1/computers/{computer_id}/leases/{lease_id}/renew● SupportedRequest parameters
computer_idstringrequiredpath: Computer id (cmp_...), as returned by computers.create or computers.list.
lease_idstringrequiredpath: lease_id from the connect response.
Returns
200
Own-face extension. A lease that is no longer valid (released, expired, or the computer moved to another machine) returns 409 LEASE_STALE; call connect again for a new connection and lease. Foreign or absent computers return 404.
Errors follow the Anthropic error format (type / message / request_id) — see error codes
Request
curl
# Call Create computer first and replace cmp_123 with its returned ID.
curl -X POST https://api.deepraxis.com/agent/v1/computers/cmp_123/leases/lease_123/renew \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
# Call Create computer first and replace cmp_123 with its returned ID.
import requests
opts = dict(
base_url="https://api.deepraxis.com/agent",
api_key="$PRAXIS_API_KEY",
)
# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.post(
f"{opts['base_url']}/v1/computers/cmp_123/leases/lease_123/renew",
headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())TypeScript
// Call Create computer first and replace cmp_123 with its returned ID.
const opts = {
baseURL: "https://api.deepraxis.com/agent",
apiKey: "$PRAXIS_API_KEY",
};
// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/computers/cmp_123/leases/lease_123/renew`, {
method: "POST",
headers: { Authorization: `Bearer ${opts.apiKey}`, "Content-Type": "application/json" },
});
console.log(resp.status, await resp.json());Response 200
{
"lease_id": "lease_f8d128d1-d8cc-4b22-bf44-dd77e5826f13",
"lease_expires_at": "2026-10-22T15:24:29.212Z"
}Response
HTTP 200
Computer result
application/json
| Name | Type | Description |
|---|---|---|
| lease_id | string | Id of the lease that keeps this connection's machine in service; renew it while the connection is open and release it on close. Null when no lease exists. |
| lease_expires_at | string | Time the lease lapses unless renewed, as an ISO 8601 timestamp; renew at about a third of the time remaining. |
Before running the example
Create a computer, then call Connect computer with {"need":"heavy"}. Replace lease_123 with the returned lease_id. Release the lease after testing, then archive and delete the computer.