> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orgo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Resume computer

> Bring a suspended computer back where it left off.

Resumes a `suspended` computer. Its memory is restored, so open windows and running processes continue exactly where they were. A computer still on its host comes back in seconds. One that was moved off its host to storage is woken on a host with room, in about a minute.

<Info>
  A computer woken from storage gets a **new `instance_id`** and can land on a different host with a different address and ports. Keep its UUID as your handle and re-fetch [`GET /computers/{id}`](/api-reference/computers/get) once it is `running`. While it wakes, `GET /computers/{id}` reports progress in `asleep.waking`.
</Info>

## Path parameters

<ParamField path="id" type="string" required>
  Computer UUID or `instance_id`. Both resolve to the same computer. A computer asleep in storage has no `instance_id`, so address it by UUID.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  `true` when the computer is running, or its resume or wake has started.
</ResponseField>

<ResponseField name="status" type="string">
  `running` with `200`: the computer is back. `resuming` with `202`: its memory is still being brought back from storage. Poll [Get suspension](/api-reference/computers/suspension) until `status` reads `running`. Absent on a wake from storage.
</ResponseField>

<ResponseField name="pending" type="boolean">
  Present and `true` with every `202`.
</ResponseField>

<ResponseField name="waking" type="boolean">
  Present and `true` with a `202` for a computer woken from storage.
</ResponseField>

<ResponseField name="expected_seconds" type="integer">
  Present alongside `waking`. About how long the wake takes.
</ResponseField>

Resuming is idempotent. A computer that is already `running` returns `200` with `status: "running"`, and one already resuming returns `202` again. A computer that runs by the hour has its running time reserved from credit before it resumes.

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://www.orgo.ai/api/computers/$COMPUTER_ID/resume \
    -H "Authorization: Bearer $ORGO_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      f"https://www.orgo.ai/api/computers/{computer_id}/resume",
      headers={"Authorization": f"Bearer {api_key}"}
  )

  print(response.status_code, response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`https://www.orgo.ai/api/computers/${computerId}/resume`, {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${apiKey}` }
  });

  console.log(response.status, await response.json());
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "success": true,
  "status": "running"
}
```

A computer woken from storage returns `202`:

```json theme={null}
{
  "success": true,
  "pending": true,
  "waking": true,
  "expected_seconds": 90
}
```

## Errors

| Status | Body | When |
| - | - | - |
| `401` | `{ "error": "Invalid API key" }` | The Bearer token starts with `sk_` but is not a known Orgo key. |
| `401` | `{ "error": "Authentication required" }` | No `Authorization` header, or a Bearer token that is not an `sk_` key. |
| `402` | `{ "error": "Your plan does not include running computers. Upgrade to resume this computer.", "code": "upgrade_required" }` | The workspace owner's plan no longer funds running computers. |
| `402` | `{ "error": "Add credit to start this computer.", "code": "INSUFFICIENT_COMPUTE_CREDIT" }` | The computer runs by the hour and there is not enough credit to reserve its running time. |
| `402` | `{ "error": "Choose a plan to continue." }` | The computer is a trial computer whose trial has ended. `error` is "Manage this computer’s payment in Account → Usage." when its payment is managed there. |
| `403` | `{ "error": "You do not have access to this workspace." }` | You are not a member of the computer's workspace. |
| `403` | `{ "error": "This workspace is view-only. Ask the owner for write access (workspace_read_only)." }` | You have view-only access to the workspace. |
| `403` | `{ "error": "This API key cannot access this workspace (workspace_scope_mismatch)." }` | The API key is scoped to a different workspace. |
| `404` | `{ "error": "Desktop not found" }` | No computer matches the id. |
| `409` | `{ "error": "Computer is not suspended (status: frozen)" }` | The computer is not `suspended`, `suspending`, `resuming`, or `running`. Use [Start](/api-reference/computers/start) for a `frozen` or `stopped` computer. |
| `409` | `{ "error": "This computer is still being saved to storage. Try again once it shows Suspended.", "code": "suspend_in_progress" }` | A suspend is still being saved. |
| `409` | `{ "error": "This computer is being moved to another host. Try again in a few minutes.", "code": "migrating" }` | The computer is being moved to another host. |
| `409` | `{ "error": "…", "code": "suspend_state_missing" }` or `"disk_changed"` | The saved memory is missing, or the disk changed after the suspend. The computer stays suspended. Contact support. |
| `409` | `{ "error": "Computer can't be resumed right now (status: …)" }` | Its host refused the resume and the computer is in another state there. |
| `500` | `{ "error": "…" }` | The resume failed. |
| `503` | `{ "error": "…", "code": "…" }` | Nothing was tried. `code` is `suspend_state_unavailable` (the saved memory can't be reached) or `insufficient_disk` (its host has no room yet). Carries `Retry-After: 30`. |
| `503` | `{ "error": "…", "code": "…" }` | A wake from storage failed under 30 seconds ago. `code` is `wake_failed`, `no_capacity`, or `saved_state_unavailable`. Carries `retry_after` and `Retry-After`. |
| `503` | `{ "error": "Running credit could not be confirmed. Please retry.", "code": "HOURLY_FUNDING_UNAVAILABLE" }` | An hourly computer's credit could not be checked. Retry. |
| `503` | `{ "error": "Computer has no host recorded. Contact support" }` | The computer has no host on record. |
| `503` | `{ "error": "Service temporarily unavailable. …" }` | Orgo could not verify the credential because of a server-side fault. The response carries `Retry-After: 5`. Retry after that delay. |


## OpenAPI

````yaml POST /computers/{id}/resume
openapi: 3.1.0
info:
  title: Orgo API
  description: >-
    Launch cloud computers that AI agents can control and interact with. Create
    workspaces, provision computers, and control them programmatically.
  version: 2.0.0
  contact:
    name: Orgo Support
    email: spencer@orgo.ai
    url: https://orgo.ai
servers:
  - url: https://www.orgo.ai/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: >-
      Account capacity: how many computers an account may run, and adding or
      giving back more.
  - name: Agent accounts
    description: >-
      Accounts an AI agent makes for itself, and the claim link a person uses to
      take one over.
  - name: Clients
    description: >-
      Run Orgo for your clients from your own app: a workspace and scoped key
      each, billed to you or to them.
  - name: Workspaces
    description: Organize computers into named workspaces
  - name: Computers
    description: Provision and manage virtual computers
  - name: Computer Lifecycle
    description: Start, stop, and restart computers
  - name: Computer Actions
    description: Control mouse, keyboard, and execute commands
  - name: Screens
    description: >-
      More than one desktop on a single computer. Each screen is its own X
      server with its own cursor and window manager, so an agent working on one
      cannot disturb another.
  - name: Files
    description: Upload and download files
  - name: Templates
    description: Author, build, and launch reproducible computers from templates
  - name: Chat
    description: Run an agent on a computer through OpenAI-compatible chat completions.
paths:
  /computers/{id}/resume:
    post:
      tags:
        - Computer Lifecycle
      summary: Resume computer
      description: >-
        Brings a `suspended` computer back with its memory. On its host it is
        back in seconds. A computer stored off its host, or whose memory comes
        back from storage, answers `202`: poll `GET /computers/{id}` or `GET
        /computers/{id}/suspension` until it is `running` (about a minute). A
        `running` computer returns `200` and changes nothing. Accepts the
        computer UUID or its `instance_id`.
      operationId: resumeComputer
      parameters:
        - name: id
          in: path
          required: true
          description: Computer UUID or instance_id
          schema:
            type: string
      responses:
        '200':
          description: Running.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                    enum:
                      - running
              example:
                success: true
                status: running
        '202':
          description: >-
            Accepted: it is resuming from storage (`status: "resuming"`) or
            waking from storage (`waking: true`, with `expected_seconds`).
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  status:
                    type: string
                    enum:
                      - resuming
                  pending:
                    type: boolean
                  waking:
                    type: boolean
                  expected_seconds:
                    type: integer
              examples:
                resuming:
                  summary: Memory coming back from storage
                  value:
                    success: true
                    status: resuming
                    pending: true
                waking:
                  summary: Waking from storage
                  value:
                    success: true
                    pending: true
                    waking: true
                    expected_seconds: 90
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: >-
            The owner's plan no longer funds running computers
            (`upgrade_required`), Free hours are used up (`bops_free_hours`), or
            an hourly computer has no credit left
            (`INSUFFICIENT_COMPUTE_CREDIT`).
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: >-
                  Your plan does not include running computers. Upgrade to
                  resume this computer.
                code: upgrade_required
        '403':
          description: >-
            View-only access (`workspace_read_only`), or no access to the
            computer.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
                    enum:
                      - workspace_read_only
              example:
                error: Workspace access is view-only.
                code: workspace_read_only
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            The resume was refused: not `suspended`, a suspend still being saved
            (`suspend_in_progress`), being moved (`migrating`), or its saved
            memory can't be used (`suspend_state_missing`, `disk_changed`).
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
              examples:
                not-suspended:
                  summary: Not suspended
                  value:
                    error: 'Computer is not suspended (status: stopped)'
                saving:
                  summary: Suspend still being saved
                  value:
                    error: >-
                      This computer is still being saved to storage. Try again
                      once it shows Suspended.
                    code: suspend_in_progress
        '500':
          description: The resume failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Failed to resume
        '503':
          description: >-
            Try again shortly: the saved memory can't be reached
            (`suspend_state_unavailable`), the host has no room yet
            (`insufficient_disk`), a wake from storage failed (`wake_failed`,
            `no_capacity`, `saved_state_unavailable`, with `retry_after`),
            hourly funding could not be confirmed
            (`HOURLY_FUNDING_UNAVAILABLE`), or no host is on record. Carries
            `Retry-After` where it says when.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: string
                  code:
                    type: string
                  retry_after:
                    type: integer
              example:
                error: >-
                  There's no room to wake this computer right now. Try again in
                  a few minutes.
                code: no_capacity
                retry_after: 30
components:
  responses:
    Unauthorized:
      description: 'No usable credential. Send `Authorization: Bearer $ORGO_API_KEY`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalid-key:
              summary: The key is not one of yours
              value:
                error: Invalid API key
            no-credential:
              summary: No key and no session
              value:
                error: Authentication required
    NotFound:
      description: No computer with this id on your account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Desktop not found
  schemas:
    Error:
      type: object
      description: >-
        The base error body. Every failure carries `error`; individual endpoints
        add the fields named in the schemas below.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable message.
          example: Access denied
        code:
          type: string
          description: >-
            Machine-readable reason. Present on the failures that define one,
            absent otherwise.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. Get your key at orgo.ai/workspaces

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.