SDK (TypeScript)
import { ComfyDeploy } from "comfydeploy";
const comfyDeploy = new ComfyDeploy({
bearer: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await comfyDeploy.run.get({
runId: "b888f774-3e7c-4135-a18c-6b985523c4bc",
});
// Handle the result
console.log(result);
}
run();from comfydeploy import ComfyDeploy
with ComfyDeploy(
bearer="<YOUR_BEARER_TOKEN_HERE>",
) as comfy_deploy:
res = comfy_deploy.run.get(run_id="b888f774-3e7c-4135-a18c-6b985523c4bc")
assert res.workflow_run_model is not None
# Handle response
print(res.workflow_run_model)curl --request GET \
--url https://api.comfydeploy.com/api/run/{run_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.comfydeploy.com/api/run/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.comfydeploy.com/api/run/{run_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.comfydeploy.com/api/run/{run_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.comfydeploy.com/api/run/{run_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comfydeploy.com/api/run/{run_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_inputs": null,
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_api": null,
"machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"origin": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"gpu_event_id": "<string>",
"gpu": "<string>",
"machine_version": "<string>",
"machine_type": "<string>",
"modal_function_call_id": "<string>",
"user_id": "<string>",
"org_id": "<string>",
"live_status": "<string>",
"webhook": "<string>",
"webhook_status": "<string>",
"number": 123,
"duration": 123,
"cold_start_duration": 123,
"cold_start_duration_total": 123,
"run_duration": 123,
"ended_at": "2023-11-07T05:31:56Z",
"queued_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"progress": 0,
"is_realtime": false,
"webhook_intermediate_status": false,
"outputs": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Endpoints
Get Run
GET
/
run
/
{run_id}
SDK (TypeScript)
import { ComfyDeploy } from "comfydeploy";
const comfyDeploy = new ComfyDeploy({
bearer: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await comfyDeploy.run.get({
runId: "b888f774-3e7c-4135-a18c-6b985523c4bc",
});
// Handle the result
console.log(result);
}
run();from comfydeploy import ComfyDeploy
with ComfyDeploy(
bearer="<YOUR_BEARER_TOKEN_HERE>",
) as comfy_deploy:
res = comfy_deploy.run.get(run_id="b888f774-3e7c-4135-a18c-6b985523c4bc")
assert res.workflow_run_model is not None
# Handle response
print(res.workflow_run_model)curl --request GET \
--url https://api.comfydeploy.com/api/run/{run_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.comfydeploy.com/api/run/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.comfydeploy.com/api/run/{run_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.comfydeploy.com/api/run/{run_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.comfydeploy.com/api/run/{run_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comfydeploy.com/api/run/{run_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_inputs": null,
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow_api": null,
"machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"origin": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"gpu_event_id": "<string>",
"gpu": "<string>",
"machine_version": "<string>",
"machine_type": "<string>",
"modal_function_call_id": "<string>",
"user_id": "<string>",
"org_id": "<string>",
"live_status": "<string>",
"webhook": "<string>",
"webhook_status": "<string>",
"number": 123,
"duration": 123,
"cold_start_duration": 123,
"cold_start_duration_total": 123,
"run_duration": 123,
"ended_at": "2023-11-07T05:31:56Z",
"queued_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"progress": 0,
"is_realtime": false,
"webhook_intermediate_status": false,
"outputs": []
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
Show child attributes
Show child attributes
Was this page helpful?
⌘I