Start a computer, optionally for a set number of hours
Changed onStarts a stopped computer (a running one answers success). Body, all optional: async (true answers 202 at once with an operation to poll), and when it ends: ends_in_hours (1 to 720, counted from when it is running) or ends_at (ISO 8601, in the future, at most 720 hours away), not both; null for either keeps it forever. When the end is up the computer is deleted, with everything on it. on_end is not a choice: "delete" is accepted with an end and changes nothing, alone it is a 400 (a Start never touches the end a computer already has), and any other value ("stop" included) is a 400. The end is checked as PATCH /api/computers/{id} checks it, before anything starts: a bad one is a 400 and nothing starts. It is set only once the computer is running, as PATCH sets it, so a Start that fails holds no credit and leaves no clock running. A computer stopped when its time ran out comes back with the new end (with none, its end is cleared). A running hourly computer prepays its run to the end, under the same rule as PATCH (the workspace owner, and on a paid plan only signed in or with a key that has Billing write); when the credit is short or the caller may not prepay, the end is still set, the time is billed by the hour, and the answer says prepay_warning. An end that could not be set never fails the Start: the 200 carries end_not_set with why (error) and a code. With async, the 202 says end_pending, and the operation’s result carries the end once it is running.
Request
- Base URLhttps://www.orgo.ai
- AuthHTTP bearer
Path parameters
Request body
Response
Started: success, and with an end ends_at, on_end (read only), ended_at and deletes_at, and for an hourly computer prepaid_until, prepaid_cents and prepay_warning when it was not prepaid. end_not_set (error, code) when the end could not be set; the computer is running.
Changes
- info
added the new optional request property
- info
added the non-success response with the status
- info
- info
endpoint added
- info