GET
/
sessions
import { ComfyDeploy } from "comfydeploy";

const comfyDeploy = new ComfyDeploy({
  bearer: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await comfyDeploy.session.list({
    machineId: "<id>",
  });

  // Handle the result
  console.log(result);
}

run();
[
  {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "user_id": "<string>",
    "org_id": "<string>",
    "machine_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "start_time": "2023-11-07T05:31:56Z",
    "end_time": "2023-11-07T05:31:56Z",
    "gpu": "CPU",
    "ws_gpu": "4090",
    "gpu_provider": "runpod",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "session_timeout": 123,
    "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "modal_function_id": "<string>",
    "tunnel_url": "<string>",
    "cost_item_title": "<string>",
    "cost": 123
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

machine_id
string
required

Response

200
application/json
Successful Response
id
string
required
user_id
string
required
org_id
string | null
required
machine_id
string | null
required
start_time
string | null
required
end_time
string | null
required
gpu
enum<string> | null
required
Available options:
CPU,
T4,
L4,
A10G,
A100,
A100-80GB,
H100
ws_gpu
enum<string> | null
required
Available options:
4090
gpu_provider
enum<string>
required
Available options:
runpod,
modal,
comfy-deploy
created_at
string
updated_at
string
session_timeout
integer | null
session_id
string | null
modal_function_id
string | null
tunnel_url
string | null
cost_item_title
string | null
cost
number | null