跳转到主要内容
GET
/
api
/
userdata
List user data files
curl --request GET \
  --url https://cloud.comfy.org/api/userdata \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://cloud.comfy.org/api/userdata"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://cloud.comfy.org/api/userdata', 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://cloud.comfy.org/api/userdata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$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://cloud.comfy.org/api/userdata"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://cloud.comfy.org/api/userdata")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://cloud.comfy.org/api/userdata")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "path": "<string>",
    "size": 123,
    "modified": 123
  }
]
"<string>"
"<string>"
"<string>"
"<string>"

授权

X-API-Key
string
header
必填

API key authentication. Generate an API key from your account settings at https://platform.comfy.org/profile/api-keys. Pass the key in the X-API-Key header.

查询参数

dir
string
必填

The directory path to list files from. Must include trailing slash. Example: "workflows/" or "settings/"

recurse
boolean
默认值:false

If true, include files in subdirectories. Otherwise only lists files directly in the specified directory.

split
boolean
默认值:false

Whether to split file information by type. Note: Accepted for ComfyUI API compatibility but currently ignored.

full_info
boolean
默认值:false

Whether to return full file metadata. Note: Accepted for ComfyUI API compatibility but currently ignored (always returns full info).

响应

A list of user data files.

path
string

File name or path relative to the user directory.

size
integer

File size in bytes.

modified
number<float>

UNIX timestamp of the last modification.