> ## 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.

# Clone computer

> Duplicate a computer, preserving its disk state.

Creates a copy of an existing computer with the same disk state, using your optional `name`, or a generated `(clone)` suffix. The clone lands in the source’s workspace and comes up `running`.

<Info>
  Cloning copies the full disk: installed software, files, browser sessions. The clone gets a new UUID and a new `instance_id`. Its auto-stop is forced to always-on regardless of the source’s setting.
</Info>

## Clone or fork?

| | Clone | [Fork](/api-reference/computers/fork) |
| - | - | - |
| Copies | The disk: files, installed apps, browser sessions | The disk and live memory: open apps, windows, running processes |
| The copy starts | From a fresh boot | Where the source was |
| Source | Running or stopped | Running, Linux only |
| Name | Your `name`, or `agent-1 (clone)` | `agent-1 (fork)` |

Clone a computer to reuse its setup. Fork it to try two next steps from the same moment.

## Path parameters

<ParamField path="id" type="string" required>
  The source computer’s UUID or `instance_id`. Both resolve to the same computer, as on the other computer endpoints. The `instance_id` is the value `POST /computers` returns as `instance_id`, and `GET /computers/{id}` as `fly_instance_id`.
</ParamField>

## Response

Returns `201` with the clone’s identifiers.

<ResponseField name="id" type="string">
  New computer UUID.
</ResponseField>

<ResponseField name="name" type="string">
  Your requested name, or a generated name such as `agent-1 (clone)` or `agent-1 (clone 2)`.
</ResponseField>

<ResponseField name="status" type="string">
  Always `running`: the response is sent after the clone has booted.
</ResponseField>

<ResponseField name="fly_instance_id" type="string">
  The clone’s `instance_id`. This is the handle to use for its own clone, connection, and proxy calls.
</ResponseField>

## Plan limits

A clone is a new computer, so it is charged against the **workspace owner’s** plan. It draws on their computer slot, account RAM, per-computer CPU/RAM ceiling, and the storage the source’s disk requires. Any of those being exhausted returns `403`. See [https://orgo.ai/pricing](https://orgo.ai/pricing).

## Example

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

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

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

  clone = response.json()
  print(f"Clone created: {clone['name']} ({clone['id']})")
  ```

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

  const clone = await response.json();
  console.log(`Clone created: ${clone.name} (${clone.id})`);
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "id": "b4cc290f-9bf9-3888-9912-ace4e6543003",
  "name": "agent-1 (clone)",
  "status": "running",
  "fly_instance_id": "b4cc290f"
}
```

## Errors

Every error body carries `error` and `code`.

| Status | `code` | When |
| - | - | - |
| `400` | `INVALID_REQUEST` | The body is not a JSON object, or `name` is not a string of 1-255 characters after trimming. |
| `400` | `DEVICE_LIFECYCLE_UNSUPPORTED` | The source runs on a dedicated machine that Orgo manages directly. Contact support. |
| `400` | `NOT_CLONABLE` | The source has no server address on record, so it was never fully provisioned. |
| `400` | `NO_INSTANCE` | The source has no `instance_id` on record. It is `frozen` or still being created. |
| `401` | `UNAUTHENTICATED` | The Bearer token starts with `sk_` but is not a known Orgo key. The body is `{ "error": "Invalid API key", "code": "UNAUTHENTICATED" }`. |
| `401` | `UNAUTHENTICATED` | No `Authorization` header, or a Bearer token that is not an `sk_` key. The body is `{ "error": "Authentication required", "code": "UNAUTHENTICATED" }`. |
| `401` | `UNAUTHENTICATED` | You are not the owner or a member of the source’s workspace (`You do not have access to this workspace.`), you are a view-only member (`This workspace is view-only. Ask the owner for write access (workspace_read_only).`), or the API key is scoped to another workspace (`This API key cannot access this workspace (workspace_scope_mismatch).`). These checks run during authentication, so they return `401`, not `403`. |
| `401` | `UNAUTHENTICATED` | The credential store is unavailable: `Service temporarily unavailable. The database is not accepting requests. Retry shortly.` Retry; your key is not the problem. |
| `402` | `NOT_A_MEMBER` | The source is a trial computer whose trial has ended. The body is `{ "error": "Choose a plan to continue.", "code": "NOT_A_MEMBER" }`. |
| `403` | `GUEST_RESTRICTED` | Share-link guests cannot create computers. |
| `403` | `DESKTOP_LIMIT`, `UPGRADE_REQUIRED`, `VM_SLOT_ADDON`, `RAM_ADDON`, `VCPU_ADDON`, `PER_COMPUTER_RAM_CAP`, `PER_COMPUTER_CPU_CAP`, `CHANGE_PLAN`, `PLAN_LIMIT` | The owner’s plan cannot fund another computer of this size. `PLAN_LIMIT` means a limit of a plan negotiated with Orgo. Also carries `upgradeTier` where a plan change would fix it. |
| `403` | `DISK_QUOTA_EXCEEDED` | The source’s disk is larger than the per-computer storage the owner’s plan allows. Also carries `max_disk_gb`. |
| `404` | `NOT_FOUND` | No computer matches the id, or its workspace no longer exists. |
| `409` | `NAME_TAKEN` | A computer with the requested `name` already exists in the workspace. |
| `409` | `HOURLY_QUOTE_REQUIRED` | The source is billed hourly or by its own subscription, so a copy needs its own purchase. |
| `500` | `AUTH_LOOKUP_FAILED` | The account could not be verified. |
| `500` | `INSERT_FAILED` | The clone record could not be saved. |
| `500` | `CLONE_FAILED` | The copy failed on the host. The placeholder record is rolled back, so no half-made computer is left behind. |

```json theme={null}
{
  "error": "This computer can’t be cloned (no server address on record).",
  "code": "NOT_CLONABLE"
}
```

## Optional name

<ParamField body="name" type="string">
  A unique name of 1-255 characters after trimming. Omit the body to generate a name. An empty or invalid name returns `400` with code `INVALID_REQUEST`; a name collision returns `409` with code `NAME_TAKEN`.
</ParamField>

Cloning is a disk copy, so stop applications that require an application-consistent backup before cloning. Guest flush and snapshot consistency depend on the computer backend.


## OpenAPI

````yaml POST /computers/{id}/clone
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: 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
paths:
  /computers/{id}/clone:
    post:
      tags:
        - Computers
      summary: Clone computer
      description: >-
        Creates a copy of a computer with the same disk state in the source's
        workspace. The clone is charged against the workspace owner's plan.
        Accepts the source's UUID or `instance_id`. Every error body carries
        `error` and `code`. To copy a running computer's memory as well, use
        fork.
      operationId: cloneComputer
      parameters:
        - name: id
          in: path
          required: true
          description: Source computer ID
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Optional unique clone name. Omit to generate a (clone)
                    suffix.
      responses:
        '201':
          description: Clone created and running
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: New computer UUID.
                  name:
                    type: string
                    example: agent-1 (clone)
                  status:
                    type: string
                    enum:
                      - running
                  fly_instance_id:
                    type: string
                    description: The clone's `instance_id`.
              example:
                id: b4cc290f-9bf9-3888-9912-ace4e6543003
                name: agent-1 (clone)
                status: running
                fly_instance_id: b4cc290f
        '400':
          description: >-
            `INVALID_REQUEST`: the body is not a JSON object or `name` is not
            1-255 characters. `DEVICE_LIFECYCLE_UNSUPPORTED`: the source runs on
            a dedicated machine. `NOT_CLONABLE`: no server address on record.
            `NO_INSTANCE`: the source is `frozen` or still being created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid:
                  summary: Bad body
                  value:
                    error: >-
                      Provide a JSON object with an optional name of 1-255
                      characters.
                    code: INVALID_REQUEST
                not-clonable:
                  summary: No server address
                  value:
                    error: >-
                      This computer can’t be cloned (no server address on
                      record).
                    code: NOT_CLONABLE
        '401':
          description: >-
            No usable credential, or an access check failed. Every `401` carries
            `code: "UNAUTHENTICATED"`. Access, view-only, and scope failures run
            during authentication, so they return `401`, not `403`. A
            server-side fault while verifying the credential also returns `401`;
            retry that one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid-key:
                  summary: The key is not one of yours
                  value:
                    error: Invalid API key
                    code: UNAUTHENTICATED
                no-credential:
                  summary: No key and no session
                  value:
                    error: Authentication required
                    code: UNAUTHENTICATED
                no-access:
                  summary: Not the owner or a member of the workspace
                  value:
                    error: You do not have access to this workspace.
                    code: UNAUTHENTICATED
                view-only:
                  summary: View-only member, and the request changes something
                  value:
                    error: >-
                      This workspace is view-only. Ask the owner for write
                      access (workspace_read_only).
                    code: UNAUTHENTICATED
                scope-mismatch:
                  summary: The API key is scoped to another workspace
                  value:
                    error: >-
                      This API key cannot access this workspace
                      (workspace_scope_mismatch).
                    code: UNAUTHENTICATED
                service-unavailable:
                  summary: Server-side fault while verifying the credential. Retry.
                  value:
                    error: >-
                      Service temporarily unavailable. The database is not
                      accepting requests. Retry shortly.
                    code: UNAUTHENTICATED
        '402':
          description: The source is a trial computer whose trial has ended.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Choose a plan to continue.
                code: NOT_A_MEMBER
        '403':
          description: >-
            Share-link guests cannot create computers (`GUEST_RESTRICTED`), the
            owner's plan cannot fund another computer of this size
            (`DESKTOP_LIMIT`, `UPGRADE_REQUIRED`, `VM_SLOT_ADDON`, `RAM_ADDON`,
            `VCPU_ADDON`, `PER_COMPUTER_RAM_CAP`, `PER_COMPUTER_CPU_CAP`,
            `CHANGE_PLAN`, or `PLAN_LIMIT` for a limit of a plan negotiated with
            Orgo, with `upgradeTier` where a plan change fixes it), or the
            source's disk is larger than the plan allows (`DISK_QUOTA_EXCEEDED`,
            with `max_disk_gb`).
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/QuotaError'
                  - $ref: '#/components/schemas/Error'
              examples:
                guest:
                  summary: Share-link guest
                  value:
                    error: Sign up to create your own workspace.
                    code: GUEST_RESTRICTED
                plan-limit:
                  summary: Plan cannot fund the clone
                  value:
                    error: >-
                      Creating a computer requires a paid plan. Upgrade to
                      launch your first computer.
                    code: UPGRADE_REQUIRED
                deal:
                  summary: Past a limit of a plan negotiated with Orgo
                  value:
                    error: >-
                      Your plan allows 3 computers, and you have 3. Delete one,
                      or contact us to change your plan.
                    code: PLAN_LIMIT
                    upgradeTier: enterprise
        '404':
          description: No computer matches the id, or its workspace no longer exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Desktop not found
                code: NOT_FOUND
        '409':
          description: >-
            `NAME_TAKEN`: a computer with the requested `name` already exists in
            the workspace. `HOURLY_QUOTE_REQUIRED`: the source is billed hourly
            or by its own subscription, so a copy needs its own purchase.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                name-taken:
                  summary: Name in use
                  value:
                    error: A computer with that name already exists.
                    code: NAME_TAKEN
                hourly:
                  summary: Source billed on its own
                  value:
                    error: Choose a separate purchase for a new computer.
                    code: HOURLY_QUOTE_REQUIRED
        '500':
          description: >-
            `AUTH_LOOKUP_FAILED`: the account could not be verified.
            `INSERT_FAILED`: the clone record could not be saved.
            `CLONE_FAILED`: the copy failed on the host, and the placeholder
            record is rolled back.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                insert:
                  summary: Record not saved
                  value:
                    error: Failed to save clone.
                    code: INSERT_FAILED
                auth-lookup:
                  summary: Account not verified
                  value:
                    error: Could not verify account
                    code: AUTH_LOOKUP_FAILED
components:
  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.
    QuotaError:
      type: object
      description: >-
        The request was refused by the plan the workspace owner is on rather
        than by ownership. See https://orgo.ai/pricing for what each plan
        includes.
      required:
        - error
      properties:
        error:
          type: string
        code:
          type: string
          description: >-
            Machine-readable reason. Values this API emits: `UPGRADE_REQUIRED`,
            `DESKTOP_LIMIT`, `VM_SLOT_ADDON`, `RAM_ADDON`,
            `PER_COMPUTER_RAM_CAP`, `VCPU_ADDON`, `PER_COMPUTER_CPU_CAP`,
            `DISK_QUOTA_EXCEEDED`, `disk_exceeds_quota`,
            `WINDOWS_REQUIRES_SCALE`, `GUEST_RESTRICTED`, `NOT_A_MEMBER`,
            `CHANGE_PLAN`, `PLAN_LIMIT`, `upgrade_required`.
        upgradeTier:
          type: string
          description: The plan that would allow the request.
        canManageCapacity:
          type: boolean
          description: True when you own the workspace and can raise the limit yourself.
        max_ram_gb:
          type: integer
          description: >-
            On a RAM refusal from resize: the largest RAM a live resize can
            reach for this computer.
        max_disk_gb:
          type: integer
          description: 'On a storage refusal: the largest disk this computer may have.'
  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.