mirror of
https://github.com/LukeHagar/comfy-deploy-python.git
synced 2025-12-06 12:27:45 +00:00
init
This commit is contained in:
9
docs/sdks/comfydeploy/README.md
Normal file
9
docs/sdks/comfydeploy/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ComfyDeploy SDK
|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
Comfy Deploy API: Interact with Comfy Deploy programmatically to trigger run and retrieve output
|
||||
|
||||
### Available Operations
|
||||
|
||||
267
docs/sdks/comfyui/README.md
Normal file
267
docs/sdks/comfyui/README.md
Normal file
@@ -0,0 +1,267 @@
|
||||
# Comfyui
|
||||
(*comfyui*)
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [get_auth_response_request_id_](#get_auth_response_request_id_) - Get an API Key with code
|
||||
* [post_workflow](#post_workflow) - Upload workflow from ComfyUI
|
||||
* [get_workflow_version_version_id_](#get_workflow_version_version_id_) - Get comfyui workflow
|
||||
* [get_workflow_id_](#get_workflow_id_) - Get comfyui workflow
|
||||
* [get_deployment_id_inputs](#get_deployment_id_inputs) - Get comfyui workflow inputs definition
|
||||
* [get_deployment](#get_deployment) - Get all deployed workflows
|
||||
|
||||
## get_auth_response_request_id_
|
||||
|
||||
This endpoints is specifically built for ComfyUI workflow upload.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import comfydeploy
|
||||
|
||||
s = comfydeploy.ComfyDeploy(
|
||||
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.comfyui.get_auth_response_request_id_(request_id='<value>')
|
||||
|
||||
if res.two_hundred_application_json_object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `request_id` | *str* | :heavy_check_mark: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetAuthResponseRequestIDResponse](../../models/operations/getauthresponserequestidresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- |
|
||||
| errors.GetAuthResponseRequestIDResponseBody | 500 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## post_workflow
|
||||
|
||||
This endpoints is specifically built for ComfyUI workflow upload.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import comfydeploy
|
||||
from comfydeploy.models import operations
|
||||
|
||||
s = comfydeploy.ComfyDeploy(
|
||||
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.comfyui.post_workflow(request=operations.PostWorkflowRequestBody(
|
||||
workflow_api={
|
||||
'key': operations.WorkflowAPI(
|
||||
inputs={
|
||||
'key': '<value>',
|
||||
},
|
||||
),
|
||||
},
|
||||
snapshot=operations.Snapshot(
|
||||
comfyui='<value>',
|
||||
git_custom_nodes={
|
||||
'key': operations.GitCustomNodes(
|
||||
hash='<value>',
|
||||
disabled=False,
|
||||
),
|
||||
},
|
||||
file_custom_nodes=[
|
||||
'<value>',
|
||||
],
|
||||
),
|
||||
))
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| `request` | [operations.PostWorkflowRequestBody](../../models/operations/postworkflowrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.PostWorkflowResponse](../../models/operations/postworkflowresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| errors.PostWorkflowResponseBody | 500 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_workflow_version_version_id_
|
||||
|
||||
Use this to retrieve comfyui workflow by id
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import comfydeploy
|
||||
|
||||
s = comfydeploy.ComfyDeploy(
|
||||
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.comfyui.get_workflow_version_version_id_(version_id='<value>')
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `version_id` | *str* | :heavy_check_mark: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetWorkflowVersionVersionIDResponse](../../models/operations/getworkflowversionversionidresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
|
||||
| errors.GetWorkflowVersionVersionIDResponseBody | 500 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_workflow_id_
|
||||
|
||||
Use this to retrieve comfyui workflow by id
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import comfydeploy
|
||||
|
||||
s = comfydeploy.ComfyDeploy(
|
||||
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.comfyui.get_workflow_id_(id='<value>')
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetWorkflowIDResponse](../../models/operations/getworkflowidresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| errors.GetWorkflowIDResponseBody | 500 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_deployment_id_inputs
|
||||
|
||||
Use this to retrieve comfyui workflow inputs definition by id
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import comfydeploy
|
||||
|
||||
s = comfydeploy.ComfyDeploy(
|
||||
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.comfyui.get_deployment_id_inputs(id='<value>')
|
||||
|
||||
if res.response_bodies is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `id` | *str* | :heavy_check_mark: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetDeploymentIDInputsResponse](../../models/operations/getdeploymentidinputsresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- |
|
||||
| errors.GetDeploymentIDInputsResponseBody | 500 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## get_deployment
|
||||
|
||||
Get all deployed workflows
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import comfydeploy
|
||||
from comfydeploy.models import operations
|
||||
|
||||
s = comfydeploy.ComfyDeploy(
|
||||
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.comfyui.get_deployment(environment=operations.Environment.STAGING)
|
||||
|
||||
if res.response_bodies is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
||||
| `environment` | [Optional[operations.Environment]](../../models/operations/environment.md) | :heavy_minus_sign: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetDeploymentResponse](../../models/operations/getdeploymentresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------- | -------------------------------- | -------------------------------- |
|
||||
| errors.GetDeploymentResponseBody | 500 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
47
docs/sdks/files/README.md
Normal file
47
docs/sdks/files/README.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Files
|
||||
(*files*)
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [get_upload_url](#get_upload_url) - Upload any files to the storage
|
||||
|
||||
## get_upload_url
|
||||
|
||||
Usually when you run something, you want to upload a file, image etc.
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import comfydeploy
|
||||
from comfydeploy.models import operations
|
||||
|
||||
s = comfydeploy.ComfyDeploy(
|
||||
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.files.get_upload_url(type=operations.Type.APPLICATION_OCTET_STREAM, file_size='<value>')
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
||||
| `type` | [operations.Type](../../models/operations/type.md) | :heavy_check_mark: | N/A |
|
||||
| `file_size` | *str* | :heavy_check_mark: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetUploadURLResponse](../../models/operations/getuploadurlresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ------------------------------- | ------------------------------- | ------------------------------- |
|
||||
| errors.GetUploadURLResponseBody | 500 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
176
docs/sdks/machines/README.md
Normal file
176
docs/sdks/machines/README.md
Normal file
@@ -0,0 +1,176 @@
|
||||
# Machines
|
||||
(*machines*)
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [post_gpu_event](#post_gpu_event) - Register a machine event
|
||||
* [get_v1_machines](#get_v1_machines) - Retrieve all machines for a user
|
||||
* [post_v1_machines](#post_v1_machines) - Create a new machine
|
||||
* [get_v1_machines_machine_id_](#get_v1_machines_machine_id_) - Retrieve a specific machine by ID
|
||||
|
||||
## post_gpu_event
|
||||
|
||||
Register a machine event
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
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](../../models/operations/postgpueventrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.PostGpuEventResponse](../../models/operations/postgpueventresponse.md)**
|
||||
### 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
|
||||
|
||||
```python
|
||||
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]* | :heavy_minus_sign: | N/A |
|
||||
| `page_size` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `fields` | [Optional[operations.Fields]](../../models/operations/fields.md) | :heavy_minus_sign: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetV1MachinesResponse](../../models/operations/getv1machinesresponse.md)**
|
||||
### 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
|
||||
|
||||
```python
|
||||
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](../../models/operations/postv1machinesrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.PostV1MachinesResponse](../../models/operations/postv1machinesresponse.md)**
|
||||
### 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
|
||||
|
||||
```python
|
||||
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* | :heavy_check_mark: | N/A |
|
||||
| `ext_urls` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetV1MachinesMachineIDResponse](../../models/operations/getv1machinesmachineidresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- |
|
||||
| errors.GetV1MachinesMachineIDResponseBody | 400 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
95
docs/sdks/run/README.md
Normal file
95
docs/sdks/run/README.md
Normal file
@@ -0,0 +1,95 @@
|
||||
# Run
|
||||
(*run*)
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [get](#get) - Get workflow run output
|
||||
* [create](#create) - Run a workflow via deployment_id
|
||||
|
||||
## get
|
||||
|
||||
Call this to get a run's output, usually in conjunction with polling method
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import comfydeploy
|
||||
|
||||
s = comfydeploy.ComfyDeploy(
|
||||
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.run.get(run_id='<value>')
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------ | ------------------ | ------------------ | ------------------ |
|
||||
| `run_id` | *str* | :heavy_check_mark: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetRunResponse](../../models/operations/getrunresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| ---------------------------- | ---------------------------- | ---------------------------- |
|
||||
| errors.GetRunResponseBody | 400 | application/json |
|
||||
| errors.GetRunRunResponseBody | 500 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
|
||||
## create
|
||||
|
||||
Run a workflow via deployment_id
|
||||
|
||||
### Example Usage
|
||||
|
||||
```python
|
||||
import comfydeploy
|
||||
from comfydeploy.models import operations
|
||||
|
||||
s = comfydeploy.ComfyDeploy(
|
||||
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
|
||||
)
|
||||
|
||||
|
||||
res = s.run.create(request=operations.PostRunRequestBody(
|
||||
deployment_id='d290f1ee-6c54-4b01-90e6-d701748f0851',
|
||||
workflow_id='f47ac10b-58cc-4372-a567-0e02b2c3d479',
|
||||
inputs={
|
||||
'input_text': 'value1',
|
||||
'input_url': 'https://example.png',
|
||||
},
|
||||
webhook='https://example.com/webhook',
|
||||
))
|
||||
|
||||
if res.object is not None:
|
||||
# handle response
|
||||
pass
|
||||
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ |
|
||||
| `request` | [operations.PostRunRequestBody](../../models/operations/postrunrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.PostRunResponse](../../models/operations/postrunresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------- | -------------------------- | -------------------------- |
|
||||
| errors.PostRunResponseBody | 500 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
255
docs/sdks/workflows/README.md
Normal file
255
docs/sdks/workflows/README.md
Normal file
@@ -0,0 +1,255 @@
|
||||
# Workflows
|
||||
(*workflows*)
|
||||
|
||||
### Available Operations
|
||||
|
||||
* [get_websocket_deployment_id_](#get_websocket_deployment_id_) - Get a websocket url for a specific deployment
|
||||
* [post_machine_endpoint](#post_machine_endpoint) - Create an endpoint for a machine
|
||||
* [get_v1_workflows](#get_v1_workflows) - Retrieve workflows
|
||||
* [post_v1_workflows](#post_v1_workflows) - Create a new workflow
|
||||
* [get_v1_workflows_workflow_id_](#get_v1_workflows_workflow_id_) - Retrieve a specific workflow by ID
|
||||
* [get_v1_workflows_workflow_id_outputs](#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
|
||||
|
||||
```python
|
||||
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* | :heavy_check_mark: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetWebsocketDeploymentIDResponse](../../models/operations/getwebsocketdeploymentidresponse.md)**
|
||||
### 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
|
||||
|
||||
```python
|
||||
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](../../models/operations/postmachineendpointrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.PostMachineEndpointResponse](../../models/operations/postmachineendpointresponse.md)**
|
||||
### 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
|
||||
|
||||
```python
|
||||
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]* | :heavy_minus_sign: | N/A |
|
||||
| `page_size` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
| `search` | *Optional[str]* | :heavy_minus_sign: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetV1WorkflowsResponse](../../models/operations/getv1workflowsresponse.md)**
|
||||
### 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
|
||||
|
||||
```python
|
||||
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](../../models/operations/postv1workflowsrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.PostV1WorkflowsResponse](../../models/operations/postv1workflowsresponse.md)**
|
||||
### 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
|
||||
|
||||
```python
|
||||
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* | :heavy_check_mark: | N/A |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetV1WorkflowsWorkflowIDResponse](../../models/operations/getv1workflowsworkflowidresponse.md)**
|
||||
### 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
|
||||
|
||||
```python
|
||||
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](../../models/operations/getv1workflowsworkflowidoutputsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
||||
|
||||
|
||||
### Response
|
||||
|
||||
**[operations.GetV1WorkflowsWorkflowIDOutputsResponse](../../models/operations/getv1workflowsworkflowidoutputsresponse.md)**
|
||||
### Errors
|
||||
|
||||
| Error Object | Status Code | Content Type |
|
||||
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
|
||||
| errors.GetV1WorkflowsWorkflowIDOutputsResponseBody | 400 | application/json |
|
||||
| errors.SDKError | 4xx-5xx | */* |
|
||||
Reference in New Issue
Block a user