Files
bennykok 6ea0b09d80 init
2024-07-16 14:45:28 -07:00

8.2 KiB
Raw Permalink Blame History

Machines

(machines)

Available Operations

post_gpu_event

Register a machine event

Example Usage

import comfydeploy
from comfydeploy.models import operations

s = comfydeploy.ComfyDeploy(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.machines.post_gpu_event(request=operations.PostGpuEventRequestBody(
    machine_id='<value>',
    timestamp='<value>',
    event_type=operations.EventType.GPU_END,
    gpu_provider=operations.GpuProvider.MODAL,
))

if res.object is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request operations.PostGpuEventRequestBody ✔️ The request object to use for the request.

Response

operations.PostGpuEventResponse

Errors

Error Object Status Code Content Type
errors.PostGpuEventResponseBody 500 application/json
errors.SDKError 4xx-5xx /

get_v1_machines

Retrieve details of all machines for the authenticated user, with pagination and optional field selection

Example Usage

import comfydeploy
from comfydeploy.models import operations

s = comfydeploy.ComfyDeploy(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.machines.get_v1_machines(page='1', page_size='12', fields=operations.Fields.MINIMAL)

if res.object is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
page Optional[str] N/A
page_size Optional[str] N/A
fields Optional[operations.Fields] N/A

Response

operations.GetV1MachinesResponse

Errors

Error Object Status Code Content Type
errors.GetV1MachinesResponseBody 400 application/json
errors.SDKError 4xx-5xx /

post_v1_machines

Create a new machine with optional default setting

Example Usage

import comfydeploy
from comfydeploy.models import operations

s = comfydeploy.ComfyDeploy(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.machines.post_v1_machines(request=operations.PostV1MachinesRequestBody())

if res.object is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request operations.PostV1MachinesRequestBody ✔️ The request object to use for the request.

Response

operations.PostV1MachinesResponse

Errors

Error Object Status Code Content Type
errors.PostV1MachinesResponseBody 400 application/json
errors.SDKError 4xx-5xx /

get_v1_machines_machine_id_

Retrieve details of a specific machine by its ID, with optional workspace details

Example Usage

import comfydeploy

s = comfydeploy.ComfyDeploy(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)


res = s.machines.get_v1_machines_machine_id_(machine_id='<value>', ext_urls='false')

if res.object is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
machine_id str ✔️ N/A
ext_urls Optional[str] N/A

Response

operations.GetV1MachinesMachineIDResponse

Errors

Error Object Status Code Content Type
errors.GetV1MachinesMachineIDResponseBody 400 application/json
errors.SDKError 4xx-5xx /