mirror of
https://github.com/LukeHagar/comfy-deploy-python.git
synced 2025-12-06 04:19:25 +00:00
12 KiB
12 KiB
Workflows
(workflows)
Available Operations
- get_websocket_deployment_id_ - Get a websocket url for a specific deployment
- post_machine_endpoint - Create an endpoint for a machine
- get_v1_workflows - Retrieve workflows
- post_v1_workflows - Create a new workflow
- get_v1_workflows_workflow_id_ - Retrieve a specific workflow by ID
- get_v1_workflows_workflow_id_outputs - Retrieve the most recent outputs for a workflow
get_websocket_deployment_id_
Get a websocket url for a specific deployment
Example Usage
import comfydeploy
s = comfydeploy.ComfyDeploy(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.workflows.get_websocket_deployment_id_(deployment_id='<value>')
if res.object is not None:
# handle response
pass
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deployment_id |
str | ✔️ | N/A |
Response
operations.GetWebsocketDeploymentIDResponse
Errors
| Error Object | Status Code | Content Type |
|---|---|---|
| errors.GetWebsocketDeploymentIDResponseBody | 500 | application/json |
| errors.SDKError | 4xx-5xx | / |
post_machine_endpoint
Create an endpoint for a machine
Example Usage
import comfydeploy
from comfydeploy.models import operations
s = comfydeploy.ComfyDeploy(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.workflows.post_machine_endpoint(request=operations.PostMachineEndpointRequestBody(
machine_id='<value>',
type='<value>',
))
if res.object is not None:
# handle response
pass
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostMachineEndpointRequestBody | ✔️ | The request object to use for the request. |
Response
operations.PostMachineEndpointResponse
Errors
| Error Object | Status Code | Content Type |
|---|---|---|
| errors.PostMachineEndpointResponseBody | 500 | application/json |
| errors.SDKError | 4xx-5xx | / |
get_v1_workflows
Retrieve workflows based on optional query parameters
Example Usage
import comfydeploy
s = comfydeploy.ComfyDeploy(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.workflows.get_v1_workflows(page='1', page_size='12', search='<value>')
if res.response_bodies is not None:
# handle response
pass
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page |
Optional[str] | ➖ | N/A |
page_size |
Optional[str] | ➖ | N/A |
search |
Optional[str] | ➖ | N/A |
Response
operations.GetV1WorkflowsResponse
Errors
| Error Object | Status Code | Content Type |
|---|---|---|
| errors.GetV1WorkflowsResponseBody | 400 | application/json |
| errors.SDKError | 4xx-5xx | / |
post_v1_workflows
Create a new workflow by analyzing the provided workflow JSON
Example Usage
import comfydeploy
from comfydeploy.models import operations
s = comfydeploy.ComfyDeploy(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.workflows.post_v1_workflows(request=operations.PostV1WorkflowsRequestBody())
if res.object is not None:
# handle response
pass
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PostV1WorkflowsRequestBody | ✔️ | The request object to use for the request. |
Response
operations.PostV1WorkflowsResponse
Errors
| Error Object | Status Code | Content Type |
|---|---|---|
| errors.PostV1WorkflowsResponseBody | 400 | application/json |
| errors.SDKError | 4xx-5xx | / |
get_v1_workflows_workflow_id_
Retrieve the latest version of a specific workflow by its ID
Example Usage
import comfydeploy
s = comfydeploy.ComfyDeploy(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.workflows.get_v1_workflows_workflow_id_(workflow_id='<value>')
if res.object is not None:
# handle response
pass
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_id |
str | ✔️ | N/A |
Response
operations.GetV1WorkflowsWorkflowIDResponse
Errors
| Error Object | Status Code | Content Type |
|---|---|---|
| errors.GetV1WorkflowsWorkflowIDResponseBody | 400 | application/json |
| errors.SDKError | 4xx-5xx | / |
get_v1_workflows_workflow_id_outputs
Retrieve the latest version of a specific workflow by its ID
Example Usage
import comfydeploy
from comfydeploy.models import operations
s = comfydeploy.ComfyDeploy(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.workflows.get_v1_workflows_workflow_id_outputs(request=operations.GetV1WorkflowsWorkflowIDOutputsRequest(
workflow_id='<value>',
))
if res.object is not None:
# handle response
pass
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetV1WorkflowsWorkflowIDOutputsRequest | ✔️ | The request object to use for the request. |
Response
operations.GetV1WorkflowsWorkflowIDOutputsResponse
Errors
| Error Object | Status Code | Content Type |
|---|---|---|
| errors.GetV1WorkflowsWorkflowIDOutputsResponseBody | 400 | application/json |
| errors.SDKError | 4xx-5xx | / |