获取已过滤资产的标签直方图
curl --request GET \
--url https://cloud.comfy.org/api/assets/tags/refine \
--header 'X-API-Key: <api-key>'import requests
url = "https://cloud.comfy.org/api/assets/tags/refine"
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/assets/tags/refine', 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/assets/tags/refine",
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/assets/tags/refine"
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/assets/tags/refine")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.comfy.org/api/assets/tags/refine")
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{
"tag_counts": {
"checkpoint": 32,
"lora": 193,
"vae": 6
}
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}asset
获取已过滤资产的标签直方图
返回与给定滤镜匹配的资产上出现的标签直方图。 通过显示可用标签及其计数,有助于细化资产搜索。 仅返回非零计数的标签(存在于匹配资产上的标签)。
GET
/
api
/
assets
/
tags
/
refine
获取已过滤资产的标签直方图
curl --request GET \
--url https://cloud.comfy.org/api/assets/tags/refine \
--header 'X-API-Key: <api-key>'import requests
url = "https://cloud.comfy.org/api/assets/tags/refine"
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/assets/tags/refine', 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/assets/tags/refine",
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/assets/tags/refine"
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/assets/tags/refine")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.comfy.org/api/assets/tags/refine")
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{
"tag_counts": {
"checkpoint": 32,
"lora": 193,
"vae": 6
}
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}授权
API密钥认证。从您的用户设置中生成API密钥 位于https://platform.comfy.org/profile/api-keys。在X-API-Key头中传递密钥。
查询参数
过滤拥有所有这些标签的资产
排除拥有任意这些标签的资产
过滤名称包含此子字符串的资产(不区分大小写)
用于按元数据字段过滤的JSON对象
返回的最大标签数(1-1000,默认100)
必填范围:
1 <= x <= 1000是否在结果中包含公开/共享资产
响应
成功 - 返回标签直方图
标签名称到匹配资产上出现次数的映射
Show child attributes
Show child attributes
示例:
{ "checkpoint": 32, "lora": 193, "vae": 6 }
⌘I