---
title: "Add time to a computer that has an end"
method: POST
path: "/api/computers/{id}/extend"
tags: ["computers"]
---

# Add time to a computer that has an end

`POST /api/computers/{id}/extend`

## Request

- Base URL: `https://www.orgo.ai`
- URL: `https://www.orgo.ai/api/computers/{id}/extend`
- Auth: HTTP bearer

Body: hours, a whole number from 1 to 2160, and idempotency_key. The hours are added to the end the computer has, not counted from now, so this only ever lengthens: the new end is ends_at plus hours, or now plus hours when ends_at has just passed. It may be at most 2160 hours (90 days) from now. The key is required: idempotency_key in the body, or an Idempotency-Key header in its place (an MCP tool call has no headers, so it uses the body). With both the header wins, and two different values are a 400. A retry with the same key and hours gets the first answer back with Idempotent-Replayed: true and adds nothing. A refusal frees the key, and keys last a day. A running hourly computer prepays its run to the new end, as Update computer does: what the old prepay has not used comes back and the extra is held. When the credit is short (an hour of the owner’s other hourly computers kept), a later end of a live prepay is 402 with nothing changed; a computer with no live prepay still moves its end, stays billed by the hour, and the answer says prepay_warning. Only the workspace owner prepays, and on a paid plan only signed in or with a key that has Billing write, never through an MCP sign-in; anyone else who may write the workspace still moves the end, the time past what is prepaid is billed by the hour, and the answer says prepay_warning. The computer is still deleted at its new end. To keep a computer, take the end off with ends_at null on Update computer.

## Path parameters

- `id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `hours` integer, required
  - `idempotency_key` string, required: 8 to 255 printable characters, such as a UUID. May be left out when the Idempotency-Key header is sent.

## Response `200`

The computer’s id and name, and ends_at, ended_at, deletes_at and on_end (read only). An hourly computer adds prepaid_until, prepaid_cents, and when they apply prepay_returned_cents and prepay_warning.

## Other responses

- `400`: INVALID_ENDS (hours is not a whole number from 1 to 2160, or the new end would be past 2160 hours from now), ENDS_NOT_SUPPORTED (not a Linux or Windows computer), idempotency_key_required, invalid_idempotency_key, or idempotency_key_conflict (the header and the body differ).
- `402`: insufficient_credit: the new end needs more credit than there is: error, needed_cents (the extra, plus keep_cents for an hour of the owner’s other hourly computers) and available_cents. Nothing changed.
- `403`: View only access (workspace_read_only), or a key for one computer.
- `409`: NO_END (it has no end, so it already runs until stopped), END_RAN_OUT (it was stopped when an older end ran out: use Update computer), COMPUTER_BUSY (retryable: an operation holds the computer, or its end just moved), idempotency_in_progress or idempotency_unfinished.
- `422`: idempotency_key_reused: this key was used for a different body.
- `429`: Over one of the account's rate limits (rate_limited): `limit` names it, `retry_after` and Retry-After say how many seconds to wait. Limits are per account (the workspace owner when the request acts on a computer or a workspace) and set by its plan (x-rate-limits).
- `503`: ENDS_UNAVAILABLE, or idempotency_unavailable: nothing changed.

## Changes

- **2026-11-04** `e4c1e7379fa5`: 1 breaking, 1 info
  - added the new required request property `idempotency_key`
  - the `header` request parameter `Idempotency-Key` became optional
- **2026-11-04** `b9e430665e74`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/orgo/apis/orgo-api/changes/api/computers/:id/extend/post.md)

---

[API](https://skmtc.dev/orgo/apis/orgo-api.md) - [All operations](https://skmtc.dev/orgo/apis/orgo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/orgo/apis/orgo-api/revisions/e4c1e7379fa5?raw)
