DocsCloud SDK reference

BEEOS CLOUD / DEVELOPER REFERENCE

Instances

Create, read, update, start, stop, upgrade, and delete instances; open terminal and canvas sessions; run commands; get connect and stream URLs.

Overview

The instances domain manages the instances your product runs: list, create, read, update, start, stop, upgrade, and delete them. It also opens terminal and canvas sessions, runs a command in an instance, and returns connect and stream URLs.

15 operations · SDK resource: TypeScript cloud.instances · Python cloud.instances · Go cloud.Instances · API overview

Main objects

CreateServerInstanceInput

FieldTypeRequiredDescription
namestringyesDisplay name of the instance, 1 to 128 bytes, without leading or trailing whitespace.
variant_idstringnoID of the catalog variant to create the instance from, at most 128 characters. See the instance template catalog for available variants. An unknown ID returns 404 variant_not_found.
harnessstringnoHarness to run in the instance. Only openclaw is accepted. Allowed values: "openclaw" — The OpenClaw agent runtime.
llmRuntimeLLMnoModel providers and models the instance uses. Required when the variant or harness needs caller-supplied models; omit it for variants that supply their own models. Provider API keys are write-only. Nullable.

Every field, and the methods that use this object: appendix.

RuntimeInstanceResult

FieldTypeRequiredDescription
dataRuntimeInstanceSummaryyesThe instance as of this response.
operationRuntimeOperationSummaryyesLifecycle operation that this response reports on.

Every field, and the methods that use this object: appendix.

InstancePage

FieldTypeRequiredDescription
dataarray<InstanceSummary>yesInstances on this page, newest first.
totalintegeryesTotal number of instances that match the filters, across all pages.

Every field, and the methods that use this object: appendix.

InstanceSummary

FieldTypeRequiredDescription
has_ever_runbooleanyesWhether the instance has ever reached the running state. False means it has never delivered a running service.
idstringyesUnique ID of the instance.
organization_idstringyesID of the organization that owns the instance.
app_idstringyesID of the app the instance belongs to.
developer_idstringyesID of the developer account the instance was created under.
namestringyesDisplay name of the instance.
harnessstringyesProduct harness name (for example openclaw), not a UHP harness_id (chrn_*).
provider_idstringyesID of the provider that hosts the instance.
regionstringyesRegion the instance is deployed in.
os_typestringyesOperating system of the instance: linux, windows, android or macos.
statusstringyesLifecycle phase of the instance: pending, provisioning, running, stopped or terminated. Allowed values: see the table below, InstanceSummary.status values.
desired_statusstringyesLifecycle phase the instance is being driven toward: running, stopped or terminated. Allowed values: "running" — The instance should be running; "stopped" — The instance should be stopped; "terminated" — The instance should be deleted. (enum table)
connectivitystringyesReachability of the instance's agent: unknown, online or offline. Allowed values: "unknown" — Reachability has not been determined; "online" — The instance's agent is connected; "offline" — The instance's agent is not connected. (enum table)
ms_connection_statusstringyesStatus of the instance's message-channel connection: unknown, connecting, connected, reconnecting, disconnected or failed. It is reported independently of connectivity and is unknown while the instance is stopped or terminated, or has not reported recently.
created_atstringyesTime the instance was created, as an RFC 3339 UTC timestamp.
updated_atstringyesTime the instance was last updated, as an RFC 3339 UTC timestamp.
resource_versionintegeryesVersion of the instance record, starting at 1. Send it in the If-Match header of write requests so concurrent changes are detected. Constraints: minimum=1, format=int64.
image_slotstringnoVariant trait. Key that selects the execution image for the instance. Not a container repository name.
worker_image_idstringnoVariant trait. AgentBay worker image. Never the platform image_id.
model_catalogstringnoVariant trait. served when Cloud answers model-list and reasoning-level requests, none when it answers neither. Empty and unknown values behave as none.
billing_slotstringnoVariant trait. Key into the monthly fee table that prices the instance.
icon_keystringnoVariant trait. UI icon selector. Clients must not derive it from harness.
device_controlbooleannoVariant trait. Whether the instance accepts device-control commands. False means those commands are rejected.
runtime_profilestringnoVariant trait. Profile of the agent runtime the instance uses. Known values are openclaw, hermes and beeos-browser.
free_planbooleannoVariant trait. Whether the free plan allows the instance's variant. False means the free plan does not allow it.
cloud_providerstringnoagentbay, beeos, or empty when self-hosted.

InstanceSummary.status values

ValueMeaning
"pending"The instance was created and is waiting to be provisioned.
"provisioning"The instance is being provisioned or started.
"running"The instance is running.
"stopped"The instance is stopped and can be started again.
"terminated"The instance was deleted and cannot be used again.

Every field, and the methods that use this object: appendix.

RuntimeInstanceStatusResult

FieldTypeRequiredDescription
dataobjectyesCurrent status of the instance.
data.idstringyesUnique ID of the instance.
data.namestringyesDisplay name of the instance.
data.statusstringyesLifecycle phase of the instance: pending, provisioning, running, stopped or terminated. Allowed values: see the table below, RuntimeInstanceStatusResult.data.status values.
data.desired_statusstringyesLifecycle phase the instance is being driven toward: running, stopped or terminated. Allowed values: "running" — The instance should be running; "stopped" — The instance should be stopped; "terminated" — The instance should be deleted. (enum table)
data.connectivitystringyesReachability of the instance's agent: unknown, online or offline. Allowed values: "unknown" — Reachability has not been determined; "online" — The instance's agent is connected; "offline" — The instance's agent is not connected. (enum table)
operationRuntimeOperationSummaryyesLifecycle operation that this response reports on.

RuntimeInstanceStatusResult.data.status values

ValueMeaning
"pending"The instance was created and is waiting to be provisioned.
"provisioning"The instance is being provisioned or started.
"running"The instance is running.
"stopped"The instance is stopped and can be started again.
"terminated"The instance was deleted and cannot be used again.

Every field, and the methods that use this object: appendix.

RuntimeUpgradeJob

FieldTypeRequiredDescription
job_idstringyesUnique ID of the upgrade job.
image_version_idstringno—
instance_idstringyesID of the instance being upgraded.
statusstringyesStatus of the job: upgrade_pending, rollback_pending, failed or succeeded. Allowed values: "upgrade_pending" — The image upgrade is being applied; "rollback_pending" — The image upgrade failed and the instance is being rolled back to its previous image; "failed" — The image upgrade failed. See error; "succeeded" — The image upgrade finished and the instance runs the target version. (enum table)
targetstringyesImage version the instance is being upgraded to.
created_atstringyesTime the job was created, as an RFC 3339 UTC timestamp.
completed_atstringnoTime the job finished, as an RFC 3339 UTC timestamp. Omitted while the job is not finished. Nullable.
errorstringnoStable failure code. Omitted unless the job failed. Nullable.

Every field, and the methods that use this object: appendix.

TerminalSessionDocument

FieldTypeRequiredDescription
transportstringyesHow the ticket connects: always service-websocket.
protocolVersionintegeryesVersion of the ticket protocol. Currently 1.
headerRealtimeTicketHeaderyesHeader of the signed ticket.
websocketUrlstringyesWebSocket URL to open the terminal connection on. It already carries the ticket as a query parameter.
ticketstringyesSigned single-use ticket (a JWT) that authorizes one terminal connection. It is valid for 60 seconds.
issuedAtstringyesTime the ticket was issued, as an RFC 3339 timestamp. Constraints: format=date-time.
expiresAtstringyesTime the ticket expires, as an RFC 3339 timestamp. Tickets are valid for 60 seconds. Constraints: format=date-time.
claimsTerminalTicketClaimsyesClaims contained in the signed ticket.

Every field, and the methods that use this object: appendix.

CanvasSessionDocument

FieldTypeRequiredDescription
transportstringyesHow the ticket connects: always relay.
protocolVersionintegeryesVersion of the ticket protocol. Currently 1.
headerRealtimeTicketHeaderyesHeader of the signed ticket.
relayUrlstringyesWebSocket URL of the canvas relay for the canvas, ending in /ws/{canvasId}.
ticketstringyesSigned single-use ticket (a JWT) that authorizes one relay connection. It is valid for 60 seconds.
issuedAtstringyesTime the ticket was issued, as an RFC 3339 timestamp. Constraints: format=date-time.
expiresAtstringyesTime the ticket expires, as an RFC 3339 timestamp. Tickets are valid for 60 seconds. Constraints: format=date-time.
claimsCanvasTicketClaimsyesClaims contained in the signed ticket.

Every field, and the methods that use this object: appendix.

RuntimeExecResult

FieldTypeRequiredDescription
exit_codeintegeryesExit code of the command.
stdoutstringyesStandard output of the command, at most 64 KiB.
stderrstringyesStandard error of the command, at most 64 KiB.
truncatedbooleanyesWhether the output was truncated.

Every field, and the methods that use this object: appendix.

ConnectURLResponse

FieldTypeRequiredDescription
dataobjectyesConnection details for the requested service.
data.urlstringyesURL to connect to. For browser it is the browser viewer URL; for acp it is a WebSocket URL that already carries the access ticket as a query parameter.
data.modestringyesConnection mode: browser-runtime for browser, service-websocket for acp. Allowed values: "browser-runtime" — A browser viewer session; connect with url and token; "service-websocket" — A WebSocket connection to an agent service; url already carries the access ticket. (enum table)
data.tokenstringyesShort-lived access token for the browser viewer. Not returned for acp.
data.servicestringyesService the URL connects to: browser or acp. Allowed values: "browser" — The browser viewer; "acp" — The agent connection over WebSocket. (enum table)
data.connectivitystringyesReachability of the instance's agent: unknown, online or offline. Allowed values: "unknown" — Reachability has not been determined; "online" — The instance's agent is connected; "offline" — The instance's agent is not connected. (enum table)
data.stream_session_idstringyesID of the viewing client session, the client_id sent in the request. Not returned for acp.
data.browserobjectnoBrowser access grant. Returned only for browser.
data.browser.grant_idstringyesID of the browser access grant.
data.browser.generationstringyesGeneration of the browser the grant is bound to. When generation was sent in the request, it equals that value.
data.browser.expires_atstringyesTime the access grant expires, in Unix milliseconds.
data.browser.rolestringyesAccess role of the grant: viewer or controller. Allowed values: "viewer" — Can watch the browser but not control it; "controller" — Can watch and control the browser. (enum table)

Every field, and the methods that use this object: appendix.

RuntimeInstanceSummary

FieldTypeRequiredDescription
idstringyesUnique ID of the instance.
organization_idstringyesID of the organization that owns the instance.
app_idstringyesID of the app the instance belongs to.
developer_idstringyesID of the developer account the instance was created under.
namestringyesDisplay name of the instance.
harnessstringyesProduct harness name (for example openclaw), not a UHP harness_id (chrn_*).
provider_idstringyesID of the provider that hosts the instance.
regionstringyesRegion the instance is deployed in.
os_typestringyesOperating system of the instance: linux, windows, android or macos.
statusstringyesLifecycle phase of the instance: pending, provisioning, running, stopped or terminated. Allowed values: see the table below, RuntimeInstanceSummary.status values.
desired_statusstringyesLifecycle phase the instance is being driven toward: running, stopped or terminated. Allowed values: "running" — The instance should be running; "stopped" — The instance should be stopped; "terminated" — The instance should be deleted. (enum table)
connectivitystringyesReachability of the instance's agent: unknown, online or offline. Allowed values: "unknown" — Reachability has not been determined; "online" — The instance's agent is connected; "offline" — The instance's agent is not connected. (enum table)
error_codestringnoStable code describing a failure or degraded state reported with a lifecycle result, for example quota_exceeded, capacity_pending, provision_failed or stop_failed. Raw provider errors are never exported.
ms_connection_statusstringyesStatus of the instance's message-channel connection: unknown, connecting, connected, reconnecting, disconnected or failed. It is reported independently of connectivity and is unknown while the instance is stopped or terminated, or has not reported recently.
image_idstringnoID of the platform image the instance runs.
image_version_idstringnoID of the platform image version the instance runs.
image_versionstringnoVersion label of the platform image the instance runs.
image_refstringnoPinned public image reference. Provider configuration is never included.
model_primarystringnoPrimary model configured for the instance.
modelsarray<string>noModels configured for the instance.
llmRuntimeLLMViewnoModel providers and models supplied for the instance, with API keys removed. Nullable.
hosting_typestringnoWhere the instance is hosted: cloud or selfhosted.
cloud_providerstringnoagentbay, beeos, or empty when self-hosted.
image_slotstringnoVariant trait. Key that selects the execution image for the instance. Not a container repository name.
worker_image_idstringnoVariant trait. AgentBay worker image. Never the platform image_id.
model_catalogstringnoVariant trait. served when Cloud answers model-list and reasoning-level requests, none when it answers neither. Empty and unknown values behave as none.
billing_slotstringnoVariant trait. Key into the monthly fee table that prices the instance.
icon_keystringnoVariant trait. UI icon selector. Clients must not derive it from harness.
device_controlbooleanyesVariant trait. Whether the instance accepts device-control commands. False means those commands are rejected.
runtime_profilestringnoVariant trait. Profile of the agent runtime the instance uses. Known values are openclaw, hermes and beeos-browser.
free_planbooleanyesVariant trait. Whether the free plan allows the instance's variant. False means the free plan does not allow it.
resource_versionintegeryesVersion of the instance record, starting at 1. Send it in the If-Match header of write requests so concurrent changes are detected.
has_ever_runbooleanyesWhether the instance has ever reached the running state. False means it has never delivered a running service.
created_atstringyesTime the instance was created, as an RFC 3339 UTC timestamp.
updated_atstringyesTime the instance was last updated, as an RFC 3339 UTC timestamp.
capabilitiesobjectyesCapabilities declared for the instance when it was provisioned, as flags such as computer, mobile, device and terminal. An empty object means none were declared.
capabilities.computerbooleanno—
capabilities.mobilebooleanno—
capabilities.devicebooleanno—
capabilities.terminalbooleanno—

RuntimeInstanceSummary.status values

ValueMeaning
"pending"The instance was created and is waiting to be provisioned.
"provisioning"The instance is being provisioned or started.
"running"The instance is running.
"stopped"The instance is stopped and can be started again.
"terminated"The instance was deleted and cannot be used again.

Every field, and the methods that use this object: appendix.

RuntimeOperationSummary

FieldTypeRequiredDescription
idstringyesUnique ID of the operation.
kindstringyesKind of operation: create, start, stop, delete or image_upgrade. Allowed values: see the table below, RuntimeOperationSummary.kind values.
phasestringyesPhase of the operation: intent, reserved, admitted, provisioning, running, cleanup_pending, failed, stop_pending, stopped, delete_pending, deleted, upgrade_pending or rollback_pending. It describes durable work, not observed instance health. Allowed values: see the table below, RuntimeOperationSummary.phase values.
error_codestringnoStable failure code, the same value as the instance error_code. Raw provider errors are never exported.

RuntimeOperationSummary.kind values

ValueMeaning
"create"Create the instance.
"start"Start a stopped instance.
"stop"Stop the instance.
"delete"Delete the instance.
"image_upgrade"Upgrade the instance to another platform image.

RuntimeOperationSummary.phase values

ValueMeaning
"intent"The create request was recorded and nothing is reserved yet.
"reserved"The create request was accepted and its resources are reserved.
"admitted"The create request was admitted and is waiting to be provisioned.
"provisioning"The instance is being provisioned or started.
"running"Final phase of a successful create, start or image upgrade.
"cleanup_pending"A create failed and the resources it reserved are being cleaned up.
"failed"Final phase of a failed operation. See error_code.
"stop_pending"The instance is being stopped.
"stopped"Final phase of a successful stop.
"delete_pending"The instance is being deleted.
"deleted"Final phase of a successful delete.
"upgrade_pending"The image upgrade is being applied.
"rollback_pending"The image upgrade failed and the instance is being rolled back to its previous image.

Every field, and the methods that use this object: appendix.

RealtimeTicketHeader

FieldTypeRequiredDescription
algstringyesSignature algorithm of the ticket: RS256.
typstringyesToken type: JWT.
kidstringyesID of the key that signed the ticket.

Every field, and the methods that use this object: appendix.

TerminalTicketClaims

FieldTypeRequiredDescription
issstringyesIssuer of the ticket.
audstringyesAudience the ticket is intended for: the terminal service.
substringyesUnused. Cloud does not accept an external user id, so this claim is empty.
jtistringyesUnique ID of the ticket.
instance_idstringyesID of the instance the terminal belongs to.
platform_agent_idstringyesID of the agent the terminal session is for, the platformAgentId of the request.
client_idstringyesID generated for this terminal client connection.
conversation_idstringnoID of the conversation the terminal is attached to. Present only when the request sent conversationId.
resume_terminal_idstringnoID of the terminal to resume. Present only when the request sent resumeTerminalId.
iatintegeryesTime the ticket was issued, in Unix seconds.
expintegeryesTime the ticket expires, in Unix seconds.

Every field, and the methods that use this object: appendix.

CanvasTicketClaims

FieldTypeRequiredDescription
issstringyesIssuer of the ticket.
substringyesUnused. Cloud does not accept an external user id, so this claim is empty.
jtistringyesUnique ID of the ticket.
purposestringyesPurpose of the ticket: always canvas_session.
instance_idstringyesID of the instance the canvas belongs to.
platform_agent_idstringyesID of the agent the canvas session is for, the platformAgentId of the request.
client_idstringyesID generated for this relay client connection.
conversation_idstringyesID of the conversation the canvas belongs to, the conversationId of the request.
canvas_idstringyesID of the canvas the ticket grants access to.
rolestringyesAccess role granted on the canvas: viewer or editor. Allowed values: "viewer" — Can view the canvas but not change it; "editor" — Can view and edit the canvas. (enum table)
session_idstringyesID of the realtime session created for this ticket.
audarray<string>yesAudiences the ticket is intended for: the canvas relay.
iatintegeryesTime the ticket was issued, in Unix seconds.
expintegeryesTime the ticket expires, in Unix seconds.

Every field, and the methods that use this object: appendix.

Typical flow

  1. Create an instance with instances.create. The response is 202: creation has started, the instance is not ready yet.
  2. Poll instances.getStatus until the instance is running.
  3. Use the instance: instances.exec runs a command, instances.createTerminalSession and instances.createCanvasSession open sessions, and instances.getConnectURL and instances.getStreamURL return URLs.
  4. Change it with instances.update (send the current version in If-Match), stop and start it with instances.stop and instances.start, or upgrade it with instances.upgrade and follow the job with instances.getUpgrade.
  5. Remove it with instances.delete.

Methods

MethodHTTPSummary
instances.listGET /v1/instancesList instances
instances.createPOST /v1/instancesCreate an instance
instances.getGET /v1/instances/{instanceId}Get an instance
instances.updatePATCH /v1/instances/{instanceId}Update an instance
instances.deleteDELETE /v1/instances/{instanceId}Delete an instance
instances.createCanvasSessionPOST /v1/instances/{instanceId}/canvas-sessionsCreate a canvas session
instances.getConnectURLGET /v1/instances/{instanceId}/connect-urlGet an instance connect URL
instances.execPOST /v1/instances/{instanceId}/execRun a command in an instance
instances.startPOST /v1/instances/{instanceId}/startStart an instance
instances.getStatusGET /v1/instances/{instanceId}/statusGet instance status
instances.stopPOST /v1/instances/{instanceId}/stopStop an instance
instances.getStreamURLGET /v1/instances/{instanceId}/stream-urlGet an instance stream URL
instances.createTerminalSessionPOST /v1/instances/{instanceId}/terminal-sessionsCreate a terminal session
instances.upgradePOST /v1/instances/{instanceId}/upgradeStart an instance upgrade
instances.getUpgradeGET /v1/instances/{instanceId}/upgrades/{jobId}Get an instance upgrade

instances.list

GET /v1/instances · Operation ID listInstances

List instances

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.listlist(query?: Models.ListInstancesQuery): Promise<Models.ListInstancesResponse>
Pythoncloud.instances.listdef list(self, options: ListInstancesOptions | None = None) -> InstancePage
Gocloud.Instances.Listfunc (r *InstancesResource) List(ctx context.Context, options ListInstancesOptions) (InstancePage, error)

Parameters

ParameterInTypeRequiredDescription
pagequeryintegerno1-based page number, from 1 to 1000000. Defaults to 1. Constraints: minimum=1, maximum=1000000.
page_sizequeryintegernoNumber of instances per page, from 1 to 100. Defaults to 20. Constraints: minimum=1, maximum=100.
statusquerystringnoReturn only instances in this lifecycle phase: pending, provisioning, running, stopped or terminated. When omitted, terminated instances are not returned.
provider_idquerystringnoReturn only instances hosted by this provider, at most 128 characters.
harnessquerystringnoReturn only instances that run this product harness (for example openclaw), at most 128 characters.
cluster_idquerystringnoReturn only instances deployed to this cluster, at most 128 characters.
searchquerystringnoCase-insensitive substring match on the instance name or ID, at most 200 characters.

Response

200 Tenant-scoped result · application/json · Schema: InstancePage

FieldTypeRequiredDescription
dataarray<InstanceSummary>yesInstances on this page, newest first.
totalintegeryesTotal number of instances that match the filters, across all pages.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.list();
console.log(result);

instances.create

POST /v1/instances · Operation ID instanceCreate

Create an instance

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.createcreate(input: Models.CreateServerInstanceInput, idempotencyKey: string): Promise<Models.InstanceCreateResponse>
Pythoncloud.instances.createdef create(self, input: CreateServerInstanceInput, options: InstanceCreateOptions) -> RuntimeInstanceResult
Gocloud.Instances.Createfunc (r *InstancesResource) Create(ctx context.Context, input CreateServerInstanceInput, options InstanceCreateOptions) (RuntimeInstanceResult, error)

Parameters

ParameterInTypeRequiredDescription
Idempotency-KeyheaderstringyesKey that makes the request safe to retry, 1 to 256 bytes without leading or trailing whitespace. Repeating a request with the same key and body replays the original result; reusing the key for a different request returns 409 idempotency_conflict.

Request body

application/json · required · Schema: CreateServerInstanceInput

FieldTypeRequiredDescription
namestringyesDisplay name of the instance, 1 to 128 bytes, without leading or trailing whitespace.
variant_idstringnoID of the catalog variant to create the instance from, at most 128 characters. See the instance template catalog for available variants. An unknown ID returns 404 variant_not_found.
harnessstringnoHarness to run in the instance. Only openclaw is accepted. Allowed values: "openclaw" — The OpenClaw agent runtime.
llmRuntimeLLMnoModel providers and models the instance uses. Required when the variant or harness needs caller-supplied models; omit it for variants that supply their own models. Provider API keys are write-only. Nullable.

Response

202 · application/json · Schema: RuntimeInstanceResult

FieldTypeRequiredDescription
dataRuntimeInstanceSummaryyesThe instance as of this response.
operationRuntimeOperationSummaryyesLifecycle operation that this response reports on.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.create({ name: "example" }, "YOUR_IDEMPOTENCY_KEY");
console.log(result);

instances.get

GET /v1/instances/{instanceId} · Operation ID getInstance

Get an instance

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.getget(id: string): Promise<Models.GetInstanceResponse>
Pythoncloud.instances.getdef get(self, instance_id: str) -> RuntimeInstanceResult
Gocloud.Instances.Getfunc (r *InstancesResource) Get(ctx context.Context, instanceId string) (RuntimeInstanceResult, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.

Response

200 · application/json · Schema: RuntimeInstanceResult

FieldTypeRequiredDescription
dataRuntimeInstanceSummaryyesThe instance as of this response.
operationRuntimeOperationSummaryyesLifecycle operation that this response reports on.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.get("instance_123");
console.log(result);

instances.update

PATCH /v1/instances/{instanceId} · Operation ID updateInstanceMetadata

Update an instance

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.updateupdate(instanceId: string, input: Models.UpdateServerInstanceInput, version: number): Promise<Models.UpdateInstanceMetadataResponse>
Pythoncloud.instances.updatedef update(self, instance_id: str, input: UpdateServerInstanceInput, options: UpdateInstanceMetadataOptions) -> UpdateInstanceMetadataResponse
Gocloud.Instances.Updatefunc (r *InstancesResource) Update(ctx context.Context, instanceId string, input UpdateServerInstanceInput, options UpdateInstanceMetadataOptions) (UpdateInstanceMetadataResponse, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.
If-MatchheaderstringyesVersion of the instance the request applies to: the resource_version of the representation you last read, optionally in quotes. A stale version returns 412 version_mismatch; a missing or invalid one returns 428 precondition_required.

Request body

application/json · required · Schema: UpdateServerInstanceInput

FieldTypeRequiredDescription
namestringnoNew display name, 1 to 128 characters, without leading or trailing whitespace. Send name, llm or both.
llmRuntimeLLMnoReplacement model providers and models. It replaces the whole existing llm block. Provider API keys are write-only. When name is also sent, the llm block is replaced first.

Response

200 · application/json

FieldTypeRequiredDescription
dataRuntimeInstanceSummaryyes—

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.update("instance_123", {}, 1);
console.log(result);

instances.delete

DELETE /v1/instances/{instanceId} · Operation ID deleteInstance

Delete an instance

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.deletedelete(id: string, idempotencyKey: string, version: number): Promise<Models.DeleteInstanceResponse>
Pythoncloud.instances.deletedef delete(self, instance_id: str, options: DeleteInstanceOptions) -> RuntimeInstanceResult
Gocloud.Instances.Deletefunc (r *InstancesResource) Delete(ctx context.Context, instanceId string, options DeleteInstanceOptions) (RuntimeInstanceResult, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.
Idempotency-KeyheaderstringyesKey that makes the request safe to retry, 1 to 256 bytes without leading or trailing whitespace. Repeating a request with the same key and body replays the original result; reusing the key for a different request returns 409 idempotency_conflict.
If-MatchheaderstringyesVersion of the instance the request applies to: the resource_version of the representation you last read, optionally in quotes. A stale version returns 412 version_mismatch; a missing or invalid one returns 428 precondition_required.

Response

202 · application/json · Schema: RuntimeInstanceResult

FieldTypeRequiredDescription
dataRuntimeInstanceSummaryyesThe instance as of this response.
operationRuntimeOperationSummaryyesLifecycle operation that this response reports on.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.delete("instance_123", "YOUR_IDEMPOTENCY_KEY", 1);
console.log(result);

instances.createCanvasSession

POST /v1/instances/{instanceId}/canvas-sessions · Operation ID createCanvasSession

Create a canvas session

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.createCanvasSessioncreateCanvasSession(instanceId: string, input: Models.CreateCanvasSessionRequest): Promise<Models.CreateCanvasSessionResponse>
Pythoncloud.instances.create_canvas_sessiondef create_canvas_session(self, instance_id: str, input: CreateCanvasSessionRequest) -> CanvasSessionDocument
Gocloud.Instances.CreateCanvasSessionfunc (r *InstancesResource) CreateCanvasSession(ctx context.Context, instanceId string, input CreateCanvasSessionRequest) (CanvasSessionDocument, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.

Request body

application/json · required

FieldTypeRequiredDescription
platformAgentIdstringyesID of the agent the canvas session is for, as a UUID. Constraints: format=uuid.
conversationIdstringyesID of the conversation the canvas belongs to, as a UUID. Constraints: format=uuid.
canvasIdstringnoOpaque Canvas/A2UI surface identifier; not a UUID. Constraints: minLength=1, maxLength=128, pattern=^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$.

Response

201 Single-use RS256 canvas relay ticket · application/json · Schema: CanvasSessionDocument

FieldTypeRequiredDescription
transportstringyesHow the ticket connects: always relay.
protocolVersionintegeryesVersion of the ticket protocol. Currently 1.
headerRealtimeTicketHeaderyesHeader of the signed ticket.
relayUrlstringyesWebSocket URL of the canvas relay for the canvas, ending in /ws/{canvasId}.
ticketstringyesSigned single-use ticket (a JWT) that authorizes one relay connection. It is valid for 60 seconds.
issuedAtstringyesTime the ticket was issued, as an RFC 3339 timestamp. Constraints: format=date-time.
expiresAtstringyesTime the ticket expires, as an RFC 3339 timestamp. Tickets are valid for 60 seconds. Constraints: format=date-time.
claimsCanvasTicketClaimsyesClaims contained in the signed ticket.

Errors

StatusSchemaDescription
400ErrorResponseCloud Server error
401ErrorResponseCloud Server error
404ErrorResponseCloud Server error
429ErrorResponseCloud Server error
5XXErrorResponseCloud Server error
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.createCanvasSession("instance_123", {
  platformAgentId: "00000000-0000-4000-8000-000000000000",
  conversationId: "00000000-0000-4000-8000-000000000000"
});
console.log(result);

instances.getConnectURL

GET /v1/instances/{instanceId}/connect-url · Operation ID getInstanceConnectURL

Get an instance connect URL

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.getConnectURLgetConnectURL(instanceId: string, query?: Models.GetInstanceConnectURLQuery): Promise<Models.GetInstanceConnectURLResponse>
Pythoncloud.instances.get_connect_urldef get_connect_url(self, instance_id: str, options: GetInstanceConnectURLOptions | None = None) -> ConnectURLResponse
Gocloud.Instances.GetConnectURLfunc (r *InstancesResource) GetConnectURL(ctx context.Context, instanceId string, options GetInstanceConnectURLOptions) (ConnectURLResponse, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.
servicequerystringnoService to connect to: browser for a browser viewer or acp for an agent connection. Required.
client_idquerystringnoID you choose for the viewing client session, 1 to 128 characters (letters, digits, _, ., : and -, starting with a letter or digit). Required when service is browser; not accepted for acp.
rolequerystringnoAccess role to request: viewer or controller. Required when service is browser; not accepted for acp.
generationquerystringnoBrowser generation the access grant must be bound to, in the same format as client_id. The request fails when the browser's current generation differs. Only for browser.

Response

200 · application/json · Schema: ConnectURLResponse

FieldTypeRequiredDescription
dataobjectyesConnection details for the requested service.
data.urlstringyesURL to connect to. For browser it is the browser viewer URL; for acp it is a WebSocket URL that already carries the access ticket as a query parameter.
data.modestringyesConnection mode: browser-runtime for browser, service-websocket for acp. Allowed values: "browser-runtime" — A browser viewer session; connect with url and token; "service-websocket" — A WebSocket connection to an agent service; url already carries the access ticket. (enum table)
data.tokenstringyesShort-lived access token for the browser viewer. Not returned for acp.
data.servicestringyesService the URL connects to: browser or acp. Allowed values: "browser" — The browser viewer; "acp" — The agent connection over WebSocket. (enum table)
data.connectivitystringyesReachability of the instance's agent: unknown, online or offline. Allowed values: "unknown" — Reachability has not been determined; "online" — The instance's agent is connected; "offline" — The instance's agent is not connected. (enum table)
data.stream_session_idstringyesID of the viewing client session, the client_id sent in the request. Not returned for acp.
data.browserobjectnoBrowser access grant. Returned only for browser.
data.browser.grant_idstringyesID of the browser access grant.
data.browser.generationstringyesGeneration of the browser the grant is bound to. When generation was sent in the request, it equals that value.
data.browser.expires_atstringyesTime the access grant expires, in Unix milliseconds.
data.browser.rolestringyesAccess role of the grant: viewer or controller. Allowed values: "viewer" — Can watch the browser but not control it; "controller" — Can watch and control the browser. (enum table)

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.getConnectURL("instance_123");
console.log(result);

instances.exec

POST /v1/instances/{instanceId}/exec · Operation ID execInstance

Run a command in an instance

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.execexec(instanceId: string, input: Models.ExecInstanceRequest): Promise<Models.ExecInstanceResponse>
Pythoncloud.instances.execdef exec(self, instance_id: str, input: ExecInstanceRequest) -> RuntimeExecResult
Gocloud.Instances.Execfunc (r *InstancesResource) Exec(ctx context.Context, instanceId string, input ExecInstanceRequest) (RuntimeExecResult, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.

Request body

application/json · required

FieldTypeRequiredDescription
argvarray<string>yesProgram and arguments as an argument vector; it is never passed through a shell. 1 to 64 entries of at most 4096 bytes each and 16 KiB in total. The first entry must not be blank.
timeout_secondsintegernoMaximum run time in seconds, from 1 to 30.

Response

200 · application/json · Schema: RuntimeExecResult

FieldTypeRequiredDescription
exit_codeintegeryesExit code of the command.
stdoutstringyesStandard output of the command, at most 64 KiB.
stderrstringyesStandard error of the command, at most 64 KiB.
truncatedbooleanyesWhether the output was truncated.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.exec("instance_123", { argv: ["example_argv"] });
console.log(result);

instances.start

POST /v1/instances/{instanceId}/start · Operation ID startInstance

Start an instance

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.startstart(instanceId: string, idempotencyKey: string, version: number): Promise<Models.StartInstanceResponse>
Pythoncloud.instances.startdef start(self, instance_id: str, options: StartInstanceOptions) -> RuntimeInstanceResult
Gocloud.Instances.Startfunc (r *InstancesResource) Start(ctx context.Context, instanceId string, options StartInstanceOptions) (RuntimeInstanceResult, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.
Idempotency-KeyheaderstringyesKey that makes the request safe to retry, 1 to 256 bytes without leading or trailing whitespace. Repeating a request with the same key and body replays the original result; reusing the key for a different request returns 409 idempotency_conflict.
If-MatchheaderstringyesVersion of the instance the request applies to: the resource_version of the representation you last read, optionally in quotes. A stale version returns 412 version_mismatch; a missing or invalid one returns 428 precondition_required.

Response

202 · application/json · Schema: RuntimeInstanceResult

FieldTypeRequiredDescription
dataRuntimeInstanceSummaryyesThe instance as of this response.
operationRuntimeOperationSummaryyesLifecycle operation that this response reports on.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.start("instance_123", "YOUR_IDEMPOTENCY_KEY", 1);
console.log(result);

instances.getStatus

GET /v1/instances/{instanceId}/status · Operation ID getInstanceStatus

Get instance status

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.getStatusgetStatus(id: string): Promise<Models.GetInstanceStatusResponse>
Pythoncloud.instances.get_statusdef get_status(self, instance_id: str) -> RuntimeInstanceStatusResult
Gocloud.Instances.GetStatusfunc (r *InstancesResource) GetStatus(ctx context.Context, instanceId string) (RuntimeInstanceStatusResult, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.

Response

200 · application/json · Schema: RuntimeInstanceStatusResult

FieldTypeRequiredDescription
dataobjectyesCurrent status of the instance.
data.idstringyesUnique ID of the instance.
data.namestringyesDisplay name of the instance.
data.statusstringyesLifecycle phase of the instance: pending, provisioning, running, stopped or terminated. Allowed values: see RuntimeInstanceStatusResult.data.status values.
data.desired_statusstringyesLifecycle phase the instance is being driven toward: running, stopped or terminated. Allowed values: "running" — The instance should be running; "stopped" — The instance should be stopped; "terminated" — The instance should be deleted. (enum table)
data.connectivitystringyesReachability of the instance's agent: unknown, online or offline. Allowed values: "unknown" — Reachability has not been determined; "online" — The instance's agent is connected; "offline" — The instance's agent is not connected. (enum table)
operationRuntimeOperationSummaryyesLifecycle operation that this response reports on.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.getStatus("instance_123");
console.log(result);

instances.stop

POST /v1/instances/{instanceId}/stop · Operation ID stopInstance

Stop an instance

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.stopstop(id: string, idempotencyKey: string, version: number): Promise<Models.StopInstanceResponse>
Pythoncloud.instances.stopdef stop(self, instance_id: str, options: StopInstanceOptions) -> RuntimeInstanceResult
Gocloud.Instances.Stopfunc (r *InstancesResource) Stop(ctx context.Context, instanceId string, options StopInstanceOptions) (RuntimeInstanceResult, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.
Idempotency-KeyheaderstringyesKey that makes the request safe to retry, 1 to 256 bytes without leading or trailing whitespace. Repeating a request with the same key and body replays the original result; reusing the key for a different request returns 409 idempotency_conflict.
If-MatchheaderstringyesVersion of the instance the request applies to: the resource_version of the representation you last read, optionally in quotes. A stale version returns 412 version_mismatch; a missing or invalid one returns 428 precondition_required.

Response

202 · application/json · Schema: RuntimeInstanceResult

FieldTypeRequiredDescription
dataRuntimeInstanceSummaryyesThe instance as of this response.
operationRuntimeOperationSummaryyesLifecycle operation that this response reports on.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.stop("instance_123", "YOUR_IDEMPOTENCY_KEY", 1);
console.log(result);

instances.getStreamURL

GET /v1/instances/{instanceId}/stream-url · Operation ID getInstanceStreamURL

Get an instance stream URL

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.getStreamURLgetStreamURL(instanceId: string, query?: Models.GetInstanceStreamURLQuery): Promise<Models.GetInstanceStreamURLResponse>
Pythoncloud.instances.get_stream_urldef get_stream_url(self, instance_id: str, options: GetInstanceStreamURLOptions | None = None) -> GetInstanceStreamURLResponse
Gocloud.Instances.GetStreamURLfunc (r *InstancesResource) GetStreamURL(ctx context.Context, instanceId string, options GetInstanceStreamURLOptions) (GetInstanceStreamURLResponse, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.
viewportWidthqueryintegernoViewport width in pixels, greater than 0 and below 100000.
viewportHeightqueryintegernoViewport height in pixels, greater than 0 and below 100000.
dprquerynumbernoDevice pixel ratio, greater than 0 and below 16.

Response

200 · application/json

FieldTypeRequiredDescription
dataJSONValueyesA genuinely open JSON value (provider/plugin parameters or arbitrary metadata). Nullable.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.getStreamURL("instance_123");
console.log(result);

instances.createTerminalSession

POST /v1/instances/{instanceId}/terminal-sessions · Operation ID createTerminalSession

Create a terminal session

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.createTerminalSessioncreateTerminalSession(instanceId: string, input: Models.CreateTerminalSessionRequest): Promise<Models.CreateTerminalSessionResponse>
Pythoncloud.instances.create_terminal_sessiondef create_terminal_session(self, instance_id: str, input: CreateTerminalSessionRequest) -> TerminalSessionDocument
Gocloud.Instances.CreateTerminalSessionfunc (r *InstancesResource) CreateTerminalSession(ctx context.Context, instanceId string, input CreateTerminalSessionRequest) (TerminalSessionDocument, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.

Request body

application/json · required

FieldTypeRequiredDescription
platformAgentIdstringyesID of the agent the terminal session is for, as a UUID. Constraints: format=uuid.
conversationIdstringnoID of the conversation to attach the terminal to, as a UUID. Optional. Constraints: format=uuid.
resumeTerminalIdstringnoID of an existing terminal to resume, as a UUID. Optional. Constraints: format=uuid.

Response

201 Single-use RS256 terminal ticket · application/json · Schema: TerminalSessionDocument

FieldTypeRequiredDescription
transportstringyesHow the ticket connects: always service-websocket.
protocolVersionintegeryesVersion of the ticket protocol. Currently 1.
headerRealtimeTicketHeaderyesHeader of the signed ticket.
websocketUrlstringyesWebSocket URL to open the terminal connection on. It already carries the ticket as a query parameter.
ticketstringyesSigned single-use ticket (a JWT) that authorizes one terminal connection. It is valid for 60 seconds.
issuedAtstringyesTime the ticket was issued, as an RFC 3339 timestamp. Constraints: format=date-time.
expiresAtstringyesTime the ticket expires, as an RFC 3339 timestamp. Tickets are valid for 60 seconds. Constraints: format=date-time.
claimsTerminalTicketClaimsyesClaims contained in the signed ticket.

Errors

StatusSchemaDescription
400ErrorResponseCloud Server error
401ErrorResponseCloud Server error
404ErrorResponseCloud Server error
429ErrorResponseCloud Server error
5XXErrorResponseCloud Server error
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.createTerminalSession("instance_123", { platformAgentId: "00000000-0000-4000-8000-000000000000" });
console.log(result);

instances.upgrade

POST /v1/instances/{instanceId}/upgrade · Operation ID upgradeInstance

Start an instance upgrade

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.upgradeupgrade(instanceId: string, input: Models.UpgradeInstanceRequest, idempotencyKey: string): Promise<Models.UpgradeInstanceResponse>
Pythoncloud.instances.upgradedef upgrade(self, instance_id: str, input: UpgradeInstanceRequest, options: UpgradeInstanceOptions) -> RuntimeUpgradeJob
Gocloud.Instances.Upgradefunc (r *InstancesResource) Upgrade(ctx context.Context, instanceId string, input UpgradeInstanceRequest, options UpgradeInstanceOptions) (RuntimeUpgradeJob, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.
Idempotency-KeyheaderstringyesKey that makes the request safe to retry, 1 to 256 bytes without leading or trailing whitespace. Repeating a request with the same key and body replays the original result; reusing the key for a different request returns 409 idempotency_conflict.

Request body

application/json · required

FieldTypeRequiredDescription
image_idstringnoID of the published platform image to upgrade to. Send at least one of image_id, image_ref and target_version; they select among published platform images only.
image_refstringnoPinned public reference of the published platform image to upgrade to.
target_versionstringnoVersion of the published platform image to upgrade to.

Response

202 · application/json · Schema: RuntimeUpgradeJob

FieldTypeRequiredDescription
job_idstringyesUnique ID of the upgrade job.
image_version_idstringno—
instance_idstringyesID of the instance being upgraded.
statusstringyesStatus of the job: upgrade_pending, rollback_pending, failed or succeeded. Allowed values: "upgrade_pending" — The image upgrade is being applied; "rollback_pending" — The image upgrade failed and the instance is being rolled back to its previous image; "failed" — The image upgrade failed. See error; "succeeded" — The image upgrade finished and the instance runs the target version. (enum table)
targetstringyesImage version the instance is being upgraded to.
created_atstringyesTime the job was created, as an RFC 3339 UTC timestamp.
completed_atstringnoTime the job finished, as an RFC 3339 UTC timestamp. Omitted while the job is not finished. Nullable.
errorstringnoStable failure code. Omitted unless the job failed. Nullable.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.upgrade("instance_123", {}, "YOUR_IDEMPOTENCY_KEY");
console.log(result);

instances.getUpgrade

GET /v1/instances/{instanceId}/upgrades/{jobId} · Operation ID getInstanceUpgrade

Get an instance upgrade

SDK methods

LanguageMethodSignature
TypeScriptcloud.instances.getUpgradegetUpgrade(instanceId: string, jobId: string): Promise<Models.GetInstanceUpgradeResponse>
Pythoncloud.instances.get_upgradedef get_upgrade(self, instance_id: str, job_id: str) -> RuntimeUpgradeJob
Gocloud.Instances.GetUpgradefunc (r *InstancesResource) GetUpgrade(ctx context.Context, instanceId string, jobId string) (RuntimeUpgradeJob, error)

Parameters

ParameterInTypeRequiredDescription
instanceIdpathstringyesID of the instance.
jobIdpathstringyesID of the upgrade job, the job_id returned when the upgrade was started.

Response

200 · application/json · Schema: RuntimeUpgradeJob

FieldTypeRequiredDescription
job_idstringyesUnique ID of the upgrade job.
image_version_idstringno—
instance_idstringyesID of the instance being upgraded.
statusstringyesStatus of the job: upgrade_pending, rollback_pending, failed or succeeded. Allowed values: "upgrade_pending" — The image upgrade is being applied; "rollback_pending" — The image upgrade failed and the instance is being rolled back to its previous image; "failed" — The image upgrade failed. See error; "succeeded" — The image upgrade finished and the instance runs the target version. (enum table)
targetstringyesImage version the instance is being upgraded to.
created_atstringyesTime the job was created, as an RFC 3339 UTC timestamp.
completed_atstringnoTime the job finished, as an RFC 3339 UTC timestamp. Omitted while the job is not finished. Nullable.
errorstringnoStable failure code. Omitted unless the job failed. Nullable.

Errors

StatusSchemaDescription
other (default)ErrorResponseCloud Server error

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.instances.getUpgrade("instance_123", "job_123");
console.log(result);