# Droid Computers API

Provision and manage Factory computers: create, inspect, refresh, restart, and delete.

## List computers

`GET /api/v0/computers`

Returns the computers owned by the authenticated client, ordered newest first. Provisioning steps are included only when `includeProvisioningSteps=true`.

```bash
curl 'https://api.factory.ai/api/v0/computers' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'
```

**Parameters**

- `hostId` (`string <uuid>`) - Query parameter
- `serviceAccountId` (`string`) - Query parameter. Look up a service account’s Computers (requires human Manager+).
- `includeProvisioningSteps` (`string`) - Query parameter. Whether to include provisioning step details. Allowed values: true, false.
- `includeUnlisted` (`string`) - Query parameter. Whether to include Computers hidden from normal listings. Allowed values: true, false.

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "computers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "hostId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isListed": {
            "type": "boolean"
          },
          "providerType": {
            "type": "string",
            "description": "Compute provider backing this computer, e.g. 'byom' or 'e2b'."
          },
          "status": {
            "type": "string",
            "enum": [
              "provisioning",
              "active",
              "error"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "provisioningSteps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "startedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "installSessionId": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "status"
              ],
              "additionalProperties": false
            }
          },
          "relayClientUrl": {
            "type": "string",
            "format": "uri"
          },
          "relayAgentUrl": {
            "type": "string",
            "format": "uri"
          },
          "computerIdentity": {
            "type": "object",
            "properties": {
              "publicKey": {
                "type": "string",
                "pattern": "^[A-Za-z0-9+/]{43}=$"
              },
              "keyId": {
                "type": "string",
                "pattern": "^[0-9a-f]{32}$"
              },
              "algorithm": {
                "type": "string",
                "enum": [
                  "X25519"
                ]
              },
              "updatedAt": {
                "type": "number"
              }
            },
            "required": [
              "publicKey",
              "keyId",
              "algorithm",
              "updatedAt"
            ],
            "additionalProperties": false
          },
          "remoteUser": {
            "type": "string"
          },
          "clonedRepoDirectories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ownerPrincipalKind": {
            "type": "string"
          },
          "ownerId": {
            "type": "string"
          },
          "computerSource": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "template"
                    ]
                  },
                  "templateId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "templateId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "execution-template"
                    ]
                  },
                  "templateId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "templateId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "computer"
                    ]
                  },
                  "computerId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "computerId"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "providerType",
          "createdAt"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "computers"
  ],
  "additionalProperties": false
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `402` - Response for status 402

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Create a computer

`POST /api/v0/computers`

Creates a computer. Managed computers are returned in a provisioning state and set up asynchronously; computers registered through Remote Control use an existing machine and are active immediately. Replaying a saved Software Factory Draft receipt returns its existing computer without provisioning another.

```bash
curl -X POST 'https://api.factory.ai/api/v0/computers' \
  -H 'Authorization: Bearer $FACTORY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'
```

**Request body** (optional)

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 63
    },
    "provider": {
      "type": "string",
      "minLength": 1
    },
    "hostId": {
      "type": "string",
      "format": "uuid"
    },
    "remoteUser": {
      "type": "string",
      "minLength": 1,
      "maxLength": 63
    },
    "repos": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri",
        "maxLength": 2048
      },
      "maxItems": 200
    },
    "autoInstallDeps": {
      "type": "boolean"
    },
    "serviceAccountId": {
      "type": "string",
      "minLength": 1
    },
    "source": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "environment"
              ]
            },
            "environmentId": {
              "type": "string",
              "minLength": 1,
              "description": "Factory Environment ID used to create this Computer."
            },
            "isListed": {
              "type": "boolean"
            },
            "keepWhenIdle": {
              "type": "boolean"
            },
            "softwareFactoryDraft": {
              "type": "object",
              "properties": {
                "workstreamId": {
                  "type": "string",
                  "format": "uuid"
                },
                "creationSessionId": {
                  "type": "string",
                  "format": "uuid"
                },
                "firstTurnId": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "workstreamId",
                "creationSessionId",
                "firstTurnId"
              ],
              "additionalProperties": true
            },
            "templateId": {
              "not": {}
            },
            "executionTemplateId": {
              "not": {}
            },
            "computerId": {
              "not": {}
            },
            "sourceComputerId": {
              "not": {}
            },
            "sessionId": {
              "not": {}
            }
          },
          "required": [
            "kind",
            "environmentId",
            "isListed"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1,
              "description": "Legacy compatibility field for the Factory Environment ID. Prefer the environment source variant and its environmentId field."
            },
            "isListed": {
              "type": "boolean"
            },
            "keepWhenIdle": {
              "type": "boolean"
            },
            "softwareFactoryDraft": {
              "type": "object",
              "properties": {
                "workstreamId": {
                  "type": "string",
                  "format": "uuid"
                },
                "creationSessionId": {
                  "type": "string",
                  "format": "uuid"
                },
                "firstTurnId": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "workstreamId",
                "creationSessionId",
                "firstTurnId"
              ],
              "additionalProperties": true
            },
            "environmentId": {
              "not": {}
            },
            "executionTemplateId": {
              "not": {}
            },
            "computerId": {
              "not": {}
            },
            "sourceComputerId": {
              "not": {}
            },
            "sessionId": {
              "not": {}
            }
          },
          "required": [
            "kind",
            "templateId",
            "isListed"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "execution-template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1,
              "description": "Legacy compatibility field for the Factory Environment ID. Prefer the environment source variant and its environmentId field."
            },
            "isListed": {
              "type": "boolean"
            },
            "keepWhenIdle": {
              "type": "boolean"
            },
            "softwareFactoryDraft": {
              "type": "object",
              "properties": {
                "workstreamId": {
                  "type": "string",
                  "format": "uuid"
                },
                "creationSessionId": {
                  "type": "string",
                  "format": "uuid"
                },
                "firstTurnId": {
                  "type": "string",
                  "format": "uuid"
                }
              },
              "required": [
                "workstreamId",
                "creationSessionId",
                "firstTurnId"
              ],
              "additionalProperties": true
            },
            "environmentId": {
              "not": {}
            },
            "executionTemplateId": {
              "not": {}
            },
            "computerId": {
              "not": {}
            },
            "sourceComputerId": {
              "not": {}
            },
            "sessionId": {
              "not": {}
            }
          },
          "required": [
            "kind",
            "templateId",
            "isListed"
          ],
          "additionalProperties": true
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "computer"
              ]
            },
            "sourceComputerId": {
              "type": "string",
              "minLength": 1
            },
            "environmentId": {
              "not": {}
            },
            "templateId": {
              "not": {}
            },
            "executionTemplateId": {
              "not": {}
            },
            "computerId": {
              "not": {}
            },
            "sessionId": {
              "not": {}
            }
          },
          "required": [
            "kind",
            "sourceComputerId"
          ],
          "additionalProperties": true
        }
      ]
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "hostId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "isListed": {
      "type": "boolean"
    },
    "providerType": {
      "type": "string",
      "description": "Compute provider backing this computer, e.g. 'byom' or 'e2b'."
    },
    "status": {
      "type": "string",
      "enum": [
        "provisioning",
        "active",
        "error"
      ]
    },
    "createdAt": {
      "type": "number"
    },
    "provisioningSteps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "startedAt": {
            "type": "number"
          },
          "completedAt": {
            "type": "number"
          },
          "installSessionId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "additionalProperties": false
      }
    },
    "relayClientUrl": {
      "type": "string",
      "format": "uri"
    },
    "relayAgentUrl": {
      "type": "string",
      "format": "uri"
    },
    "computerIdentity": {
      "type": "object",
      "properties": {
        "publicKey": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{43}=$"
        },
        "keyId": {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        "algorithm": {
          "type": "string",
          "enum": [
            "X25519"
          ]
        },
        "updatedAt": {
          "type": "number"
        }
      },
      "required": [
        "publicKey",
        "keyId",
        "algorithm",
        "updatedAt"
      ],
      "additionalProperties": false
    },
    "remoteUser": {
      "type": "string"
    },
    "clonedRepoDirectories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ownerPrincipalKind": {
      "type": "string"
    },
    "ownerId": {
      "type": "string"
    },
    "computerSource": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "execution-template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "computer"
              ]
            },
            "computerId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "computerId"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "providerType",
    "createdAt"
  ],
  "additionalProperties": false
}
```

**Response:** `201` - Response for status 201

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "hostId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "isListed": {
      "type": "boolean"
    },
    "providerType": {
      "type": "string",
      "description": "Compute provider backing this computer, e.g. 'byom' or 'e2b'."
    },
    "status": {
      "type": "string",
      "enum": [
        "provisioning",
        "active",
        "error"
      ]
    },
    "createdAt": {
      "type": "number"
    },
    "provisioningSteps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "startedAt": {
            "type": "number"
          },
          "completedAt": {
            "type": "number"
          },
          "installSessionId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "additionalProperties": false
      }
    },
    "relayClientUrl": {
      "type": "string",
      "format": "uri"
    },
    "relayAgentUrl": {
      "type": "string",
      "format": "uri"
    },
    "computerIdentity": {
      "type": "object",
      "properties": {
        "publicKey": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{43}=$"
        },
        "keyId": {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        "algorithm": {
          "type": "string",
          "enum": [
            "X25519"
          ]
        },
        "updatedAt": {
          "type": "number"
        }
      },
      "required": [
        "publicKey",
        "keyId",
        "algorithm",
        "updatedAt"
      ],
      "additionalProperties": false
    },
    "remoteUser": {
      "type": "string"
    },
    "clonedRepoDirectories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ownerPrincipalKind": {
      "type": "string"
    },
    "ownerId": {
      "type": "string"
    },
    "computerSource": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "execution-template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "computer"
              ]
            },
            "computerId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "computerId"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "providerType",
    "createdAt"
  ],
  "additionalProperties": false
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `402` - Response for status 402

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `409` - Response for status 409

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Create computers in bulk

`POST /api/v0/computers/bulk`

Creates up to 20 identical managed computers with server-assigned names (`<namePrefix>-<n>`, lowest free suffixes). Creation is fail-fast without rollback: on a mid-batch failure the response is still 201 with the computers created so far plus an `error` describing the failure.

```bash
curl -X POST 'https://api.factory.ai/api/v0/computers/bulk' \
  -H 'Authorization: Bearer $FACTORY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'
```

**Request body** (optional)

```json
{
  "type": "object",
  "properties": {
    "quantity": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "description": "Number of identical computers to create."
    },
    "namePrefix": {
      "type": "string",
      "minLength": 1,
      "maxLength": 58,
      "pattern": "^[a-z]([a-z0-9-]*[a-z0-9])?$"
    },
    "provider": {
      "type": "string",
      "minLength": 1
    },
    "repos": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri",
        "maxLength": 2048
      },
      "maxItems": 200
    },
    "autoInstallDeps": {
      "type": "boolean"
    },
    "serviceAccountId": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "quantity",
    "namePrefix"
  ],
  "additionalProperties": false
}
```

**Response:** `201` - Response for status 201

```json
{
  "type": "object",
  "properties": {
    "computers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "hostId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "isListed": {
            "type": "boolean"
          },
          "providerType": {
            "type": "string",
            "description": "Compute provider backing this computer, e.g. 'byom' or 'e2b'."
          },
          "status": {
            "type": "string",
            "enum": [
              "provisioning",
              "active",
              "error"
            ]
          },
          "createdAt": {
            "type": "number"
          },
          "provisioningSteps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "startedAt": {
                  "type": "number"
                },
                "completedAt": {
                  "type": "number"
                },
                "installSessionId": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "status"
              ],
              "additionalProperties": false
            }
          },
          "relayClientUrl": {
            "type": "string",
            "format": "uri"
          },
          "relayAgentUrl": {
            "type": "string",
            "format": "uri"
          },
          "computerIdentity": {
            "type": "object",
            "properties": {
              "publicKey": {
                "type": "string",
                "pattern": "^[A-Za-z0-9+/]{43}=$"
              },
              "keyId": {
                "type": "string",
                "pattern": "^[0-9a-f]{32}$"
              },
              "algorithm": {
                "type": "string",
                "enum": [
                  "X25519"
                ]
              },
              "updatedAt": {
                "type": "number"
              }
            },
            "required": [
              "publicKey",
              "keyId",
              "algorithm",
              "updatedAt"
            ],
            "additionalProperties": false
          },
          "remoteUser": {
            "type": "string"
          },
          "clonedRepoDirectories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ownerPrincipalKind": {
            "type": "string"
          },
          "ownerId": {
            "type": "string"
          },
          "computerSource": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "template"
                    ]
                  },
                  "templateId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "templateId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "execution-template"
                    ]
                  },
                  "templateId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "templateId"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "computer"
                    ]
                  },
                  "computerId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "kind",
                  "computerId"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "providerType",
          "createdAt"
        ],
        "additionalProperties": false
      }
    },
    "requestedQuantity": {
      "type": "integer"
    },
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        }
      },
      "required": [
        "message"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "computers",
    "requestedQuantity"
  ],
  "additionalProperties": false
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `402` - Response for status 402

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `409` - Response for status 409

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Get a computer by name

`GET /api/v0/computers/name/{name}`

Returns the caller's computer by name, or a service account's computer when requested by a human Manager or higher.

```bash
curl 'https://api.factory.ai/api/v0/computers/name/{name}' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'
```

**Parameters**

- `name` (`string`, required) - Path parameter. Computer name
- `serviceAccountId` (`string`) - Query parameter. Look up a service account’s Computers (requires human Manager+).
- `includeProvisioningSteps` (`string`) - Query parameter. Whether to include provisioning step details. Allowed values: true, false.

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "hostId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "isListed": {
      "type": "boolean"
    },
    "providerType": {
      "type": "string",
      "description": "Compute provider backing this computer, e.g. 'byom' or 'e2b'."
    },
    "status": {
      "type": "string",
      "enum": [
        "provisioning",
        "active",
        "error"
      ]
    },
    "createdAt": {
      "type": "number"
    },
    "provisioningSteps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "startedAt": {
            "type": "number"
          },
          "completedAt": {
            "type": "number"
          },
          "installSessionId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "additionalProperties": false
      }
    },
    "relayClientUrl": {
      "type": "string",
      "format": "uri"
    },
    "relayAgentUrl": {
      "type": "string",
      "format": "uri"
    },
    "computerIdentity": {
      "type": "object",
      "properties": {
        "publicKey": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{43}=$"
        },
        "keyId": {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        "algorithm": {
          "type": "string",
          "enum": [
            "X25519"
          ]
        },
        "updatedAt": {
          "type": "number"
        }
      },
      "required": [
        "publicKey",
        "keyId",
        "algorithm",
        "updatedAt"
      ],
      "additionalProperties": false
    },
    "remoteUser": {
      "type": "string"
    },
    "clonedRepoDirectories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ownerPrincipalKind": {
      "type": "string"
    },
    "ownerId": {
      "type": "string"
    },
    "computerSource": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "execution-template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "computer"
              ]
            },
            "computerId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "computerId"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "providerType",
    "createdAt"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `402` - Response for status 402

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## List available computer providers

`GET /api/v0/computers/providers`

Returns the managed compute providers currently available for new computers in the authenticated organization.

```bash
curl 'https://api.factory.ai/api/v0/computers/providers' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'
```

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "providers": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "e2b",
          "opencompute"
        ]
      }
    }
  },
  "required": [
    "providers"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Get a computer

`GET /api/v0/computers/{computerId}`

Returns a computer by ID. Callers can access their own computers; organization members with the manager role or higher can also access service-account-owned computers, other members can read the computers of active service accounts their plan includes, and members of a shared session can access the service-account computer that runs it by passing its ID as sharedSessionId.

```bash
curl 'https://api.factory.ai/api/v0/computers/{computerId}' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID
- `sharedSessionId` (`string <uuid>`) - Query parameter. A shared session the caller is a member of. Grants access to the service-account computer that runs it.
- `includeProvisioningSteps` (`string`) - Query parameter. Set to "true" to include provisioning steps in the response.

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "hostId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "isListed": {
      "type": "boolean"
    },
    "providerType": {
      "type": "string",
      "description": "Compute provider backing this computer, e.g. 'byom' or 'e2b'."
    },
    "status": {
      "type": "string",
      "enum": [
        "provisioning",
        "active",
        "error"
      ]
    },
    "createdAt": {
      "type": "number"
    },
    "provisioningSteps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "startedAt": {
            "type": "number"
          },
          "completedAt": {
            "type": "number"
          },
          "installSessionId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "additionalProperties": false
      }
    },
    "relayClientUrl": {
      "type": "string",
      "format": "uri"
    },
    "relayAgentUrl": {
      "type": "string",
      "format": "uri"
    },
    "computerIdentity": {
      "type": "object",
      "properties": {
        "publicKey": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{43}=$"
        },
        "keyId": {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        "algorithm": {
          "type": "string",
          "enum": [
            "X25519"
          ]
        },
        "updatedAt": {
          "type": "number"
        }
      },
      "required": [
        "publicKey",
        "keyId",
        "algorithm",
        "updatedAt"
      ],
      "additionalProperties": false
    },
    "remoteUser": {
      "type": "string"
    },
    "clonedRepoDirectories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ownerPrincipalKind": {
      "type": "string"
    },
    "ownerId": {
      "type": "string"
    },
    "computerSource": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "execution-template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "computer"
              ]
            },
            "computerId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "computerId"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "providerType",
    "createdAt"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Delete a computer

`DELETE /api/v0/computers/{computerId}`

Permanently deletes a computer. Deleting a managed computer also shuts down its hosted environment and archives its sessions; deleting a computer connected through Remote Control removes the registration but leaves the machine and its sessions intact. Automations running on the computer are paused.

```bash
curl -X DELETE 'https://api.factory.ai/api/v0/computers/{computerId}' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID

**Response:** `204` - Response for status 204

```json
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Update a computer

`PATCH /api/v0/computers/{computerId}`

Updates a computer's name, remote user, or relay identity. A host ID can be assigned to a computer that does not have one; host IDs are immutable once set and must be unique among the owner's computers.

```bash
curl -X PATCH 'https://api.factory.ai/api/v0/computers/{computerId}' \
  -H 'Authorization: Bearer $FACTORY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID

**Request body** (optional)

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 63
    },
    "hostId": {
      "type": "string",
      "format": "uuid"
    },
    "computerIdentity": {
      "type": "object",
      "properties": {
        "publicKey": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{43}=$"
        },
        "keyId": {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        "algorithm": {
          "type": "string",
          "enum": [
            "X25519"
          ]
        }
      },
      "required": [
        "publicKey",
        "keyId",
        "algorithm"
      ],
      "additionalProperties": false
    },
    "remoteUser": {
      "type": "string",
      "minLength": 1,
      "maxLength": 63
    }
  },
  "additionalProperties": false
}
```

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "hostId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "isListed": {
      "type": "boolean"
    },
    "providerType": {
      "type": "string",
      "description": "Compute provider backing this computer, e.g. 'byom' or 'e2b'."
    },
    "status": {
      "type": "string",
      "enum": [
        "provisioning",
        "active",
        "error"
      ]
    },
    "createdAt": {
      "type": "number"
    },
    "provisioningSteps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "startedAt": {
            "type": "number"
          },
          "completedAt": {
            "type": "number"
          },
          "installSessionId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "additionalProperties": false
      }
    },
    "relayClientUrl": {
      "type": "string",
      "format": "uri"
    },
    "relayAgentUrl": {
      "type": "string",
      "format": "uri"
    },
    "computerIdentity": {
      "type": "object",
      "properties": {
        "publicKey": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{43}=$"
        },
        "keyId": {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        "algorithm": {
          "type": "string",
          "enum": [
            "X25519"
          ]
        },
        "updatedAt": {
          "type": "number"
        }
      },
      "required": [
        "publicKey",
        "keyId",
        "algorithm",
        "updatedAt"
      ],
      "additionalProperties": false
    },
    "remoteUser": {
      "type": "string"
    },
    "clonedRepoDirectories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ownerPrincipalKind": {
      "type": "string"
    },
    "ownerId": {
      "type": "string"
    },
    "computerSource": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "execution-template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "computer"
              ]
            },
            "computerId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "computerId"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "providerType",
    "createdAt"
  ],
  "additionalProperties": false
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `409` - Response for status 409

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Record managed computer activity

`POST /api/v0/computers/{computerId}/activity`

Advances the inactivity clock for an active managed computer without performing connection or restart work. Not supported for computers connected through Remote Control. Members of a shared session can record activity on the service-account computer that runs it by passing its ID as sharedSessionId.

```bash
curl -X POST 'https://api.factory.ai/api/v0/computers/{computerId}/activity' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID
- `sharedSessionId` (`string <uuid>`) - Query parameter. A shared session the caller is a member of. Grants access to the service-account computer that runs it.

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "lastActiveAt": {
      "type": "number"
    }
  },
  "required": [
    "lastActiveAt"
  ],
  "additionalProperties": false
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Complete a computer file upload

`POST /api/v0/computers/{computerId}/files/{fileName}/complete-upload`

Completes a file upload by writing the previously uploaded file into the computer's workspace. Returns `409 Conflict` if a file with that name already exists.

```bash
curl -X POST 'https://api.factory.ai/api/v0/computers/{computerId}/files/{fileName}/complete-upload' \
  -H 'Authorization: Bearer $FACTORY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID
- `fileName` (`string`, required) - Path parameter. Workspace file name

**Request body** (optional)

```json
{
  "type": "object",
  "properties": {
    "transferId": {
      "type": "string",
      "format": "uuid"
    },
    "sessionId": {
      "type": "string",
      "minLength": 1
    },
    "destPath": {
      "type": "string",
      "minLength": 1,
      "maxLength": 510,
      "pattern": "^(?=.*\\S)(?![\\\\/])(?!.*\\\\)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.\\.?($|\\/))(?!.*\\.\\.)(?!.*[\\x00-\\x1F\\x7F]).+$"
    }
  },
  "required": [
    "transferId",
    "sessionId"
  ],
  "additionalProperties": false
}
```

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "transferId": {
      "type": "string",
      "format": "uuid"
    },
    "fileName": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "pattern": "^(?=.*\\S)(?!.*[\\\\/])(?!.*\\.\\.)(?!.*[\\x00-\\x1F\\x7F]).+$"
    },
    "byteLength": {
      "type": "integer",
      "minimum": 0
    }
  },
  "required": [
    "transferId",
    "fileName",
    "byteLength"
  ],
  "additionalProperties": false
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `409` - Response for status 409

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `424` - Response for status 424

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Create a computer file download

`POST /api/v0/computers/{computerId}/files/{fileName}/create-download`

Creates a download for a file in the computer's workspace and returns a time-limited download URL.

```bash
curl -X POST 'https://api.factory.ai/api/v0/computers/{computerId}/files/{fileName}/create-download' \
  -H 'Authorization: Bearer $FACTORY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID
- `fileName` (`string`, required) - Path parameter. Workspace file name

**Request body** (optional)

```json
{
  "type": "object",
  "properties": {
    "sessionId": {
      "type": "string",
      "minLength": 1
    },
    "cwd": {
      "type": "string"
    },
    "filePath": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1020,
      "pattern": "^(?=.*\\S)(?!.*\\\\)(?!.*\\/\\/)(?!.*(?:^|\\/)\\.\\.?($|\\/))(?!.*\\.\\.)(?!.*[\\x00-\\x1F\\x7F]).+$"
    },
    "contentType": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+(?: *; *[!#$%&'*+.^_`|~0-9A-Za-z-]+=(?:[!#$%&'*+.^_`|~0-9A-Za-z-]+|\"[\\x20-\\x7E]*\"))*$"
    }
  },
  "required": [
    "sessionId"
  ],
  "additionalProperties": false
}
```

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "transferId": {
      "type": "string",
      "format": "uuid"
    },
    "expiresAt": {
      "type": "number"
    },
    "downloadUrl": {
      "type": "string",
      "minLength": 1
    },
    "byteLength": {
      "type": "integer",
      "minimum": 0
    }
  },
  "required": [
    "transferId",
    "expiresAt",
    "downloadUrl",
    "byteLength"
  ],
  "additionalProperties": false
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `424` - Response for status 424

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Create a computer file upload

`POST /api/v0/computers/{computerId}/files/{fileName}/create-upload`

Starts a file upload to a computer. Returns a time-limited upload URL and form fields; upload the file there, then call complete-upload to place it in the computer's workspace.

```bash
curl -X POST 'https://api.factory.ai/api/v0/computers/{computerId}/files/{fileName}/create-upload' \
  -H 'Authorization: Bearer $FACTORY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID
- `fileName` (`string`, required) - Path parameter. Workspace file name

**Request body** (optional)

```json
{
  "type": "object",
  "properties": {
    "sizeBytes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 2147483648
    },
    "contentType": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&'*+.^_`|~0-9A-Za-z-]+(?: *; *[!#$%&'*+.^_`|~0-9A-Za-z-]+=(?:[!#$%&'*+.^_`|~0-9A-Za-z-]+|\"[\\x20-\\x7E]*\"))*$"
    }
  },
  "required": [
    "sizeBytes",
    "contentType"
  ],
  "additionalProperties": false
}
```

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "transferId": {
      "type": "string",
      "format": "uuid"
    },
    "expiresAt": {
      "type": "number"
    },
    "uploadUrl": {
      "type": "string",
      "minLength": 1
    },
    "uploadFormFields": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "minLength": 1
      }
    }
  },
  "required": [
    "transferId",
    "expiresAt",
    "uploadUrl",
    "uploadFormFields"
  ],
  "additionalProperties": false
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `424` - Response for status 424

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Retry the install-dependencies step

`POST /api/v0/computers/{computerId}/install-deps`

Starts a new dependency-installation attempt on a managed computer that was configured to install dependencies. Installation runs in the background; returns `202 Accepted` with the updated computer, or `409 Conflict` when an install is already in progress.

```bash
curl -X POST 'https://api.factory.ai/api/v0/computers/{computerId}/install-deps' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID

**Response:** `202` - Response for status 202

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "hostId": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "isListed": {
      "type": "boolean"
    },
    "providerType": {
      "type": "string",
      "description": "Compute provider backing this computer, e.g. 'byom' or 'e2b'."
    },
    "status": {
      "type": "string",
      "enum": [
        "provisioning",
        "active",
        "error"
      ]
    },
    "createdAt": {
      "type": "number"
    },
    "provisioningSteps": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "startedAt": {
            "type": "number"
          },
          "completedAt": {
            "type": "number"
          },
          "installSessionId": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status"
        ],
        "additionalProperties": false
      }
    },
    "relayClientUrl": {
      "type": "string",
      "format": "uri"
    },
    "relayAgentUrl": {
      "type": "string",
      "format": "uri"
    },
    "computerIdentity": {
      "type": "object",
      "properties": {
        "publicKey": {
          "type": "string",
          "pattern": "^[A-Za-z0-9+/]{43}=$"
        },
        "keyId": {
          "type": "string",
          "pattern": "^[0-9a-f]{32}$"
        },
        "algorithm": {
          "type": "string",
          "enum": [
            "X25519"
          ]
        },
        "updatedAt": {
          "type": "number"
        }
      },
      "required": [
        "publicKey",
        "keyId",
        "algorithm",
        "updatedAt"
      ],
      "additionalProperties": false
    },
    "remoteUser": {
      "type": "string"
    },
    "clonedRepoDirectories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ownerPrincipalKind": {
      "type": "string"
    },
    "ownerId": {
      "type": "string"
    },
    "computerSource": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "execution-template"
              ]
            },
            "templateId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "templateId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "computer"
              ]
            },
            "computerId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "kind",
            "computerId"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "providerType",
    "createdAt"
  ],
  "additionalProperties": false
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `409` - Response for status 409

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Get computer metrics

`GET /api/v0/computers/{computerId}/metrics`

Returns CPU, memory, and disk usage metrics for an active managed computer. Not supported for computers connected through Remote Control.

```bash
curl 'https://api.factory.ai/api/v0/computers/{computerId}/metrics' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID
- `start` (`string <date-time>`) - Query parameter. Start of time range (ISO 8601)

**Response:** `200` - Response for status 200

```json
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "timestamp": {
        "type": "string"
      },
      "cpuUsedPct": {
        "type": "number"
      },
      "cpuCount": {
        "type": "number"
      },
      "memUsed": {
        "type": "number"
      },
      "memTotal": {
        "type": "number"
      },
      "diskUsed": {
        "type": "number"
      },
      "diskTotal": {
        "type": "number"
      }
    },
    "required": [
      "timestamp",
      "cpuUsedPct",
      "cpuCount",
      "memUsed",
      "memTotal",
      "diskUsed",
      "diskTotal"
    ],
    "additionalProperties": false
  }
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Refresh a computer

`POST /api/v0/computers/{computerId}/refresh`

Refreshes the Git credentials and user-owned computer secrets on a managed computer. Computers connected through Remote Control are not modified and return zero counts.

```bash
curl -X POST 'https://api.factory.ai/api/v0/computers/{computerId}/refresh' \
  -H 'Authorization: Bearer $FACTORY_API_KEY'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "configured": {
      "type": "number"
    },
    "secretsConfigured": {
      "type": "number"
    }
  },
  "required": [
    "configured",
    "secretsConfigured"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

## Restart a managed computer

`POST /api/v0/computers/{computerId}/restart`

Defaults to resume: resumes an offline computer and leaves a live daemon untouched (wasRestarted: false). Explicit reboot cold-boots from persisted files, stops all processes, and discards memory and unflushed writes. Reboot returns HTTP 200 only after the daemon reconnects. Unsupported provider modes are rejected. Not supported for computers connected through Remote Control. Errors use non-2xx HTTP status codes with status, title, and detail fields.

```bash
curl -X POST 'https://api.factory.ai/api/v0/computers/{computerId}/restart' \
  -H 'Authorization: Bearer $FACTORY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ ... }'
```

**Parameters**

- `computerId` (`string`, required) - Path parameter. Computer ID

**Request body** (optional)

```json
{
  "anyOf": [
    {
      "not": {}
    },
    {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "resume",
            "reboot"
          ],
          "default": "resume"
        }
      },
      "additionalProperties": false
    }
  ]
}
```

**Response:** `200` - Response for status 200

```json
{
  "type": "object",
  "properties": {
    "wasRestarted": {
      "type": "boolean",
      "description": "False if resume found a live daemon; true if the computer was resumed or rebooted."
    }
  },
  "required": [
    "wasRestarted"
  ],
  "additionalProperties": false
}
```

**Response:** `400` - Response for status 400

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `401` - Response for status 401

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `402` - Response for status 402

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `403` - Response for status 403

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `404` - Response for status 404

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `409` - Response for status 409

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `429` - Response for status 429

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `500` - Response for status 500

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```

**Response:** `503` - Response for status 503

```json
{
  "type": "object",
  "properties": {
    "detail": {
      "type": "string",
      "description": "Human-readable error message"
    },
    "status": {
      "type": "number",
      "description": "HTTP status code"
    },
    "title": {
      "type": "string",
      "description": "HTTP status title"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional error metadata"
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ],
  "additionalProperties": false
}
```
