curl --request POST \
--url https://platformapi.comfy.org/builder/v1/models/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filenames": [
"<string>"
]
}
'import requests
url = "https://platformapi.comfy.org/builder/v1/models/resolve"
payload = { "filenames": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({filenames: ['<string>']})
};
fetch('https://platformapi.comfy.org/builder/v1/models/resolve', 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://platformapi.comfy.org/builder/v1/models/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filenames' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platformapi.comfy.org/builder/v1/models/resolve"
payload := strings.NewReader("{\n \"filenames\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platformapi.comfy.org/builder/v1/models/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filenames\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platformapi.comfy.org/builder/v1/models/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filenames\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"filename": "<string>",
"candidates": [
{
"sourceUri": "<string>",
"filename": "<string>",
"source": "huggingface",
"confidence": 0.5,
"verified": true,
"type": "<string>",
"sha256": "<string>",
"sizeBytes": 123,
"repo": "<string>"
}
],
"error": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}Find download sources for model filenames
Resolves bare model filenames — the strings a ComfyUI workflow node carries, e.g. “flux1-dev-Q8_0.gguf” — into the places they can be downloaded from. A filename our model catalog lists with a HuggingFace link gets that link first, with its folder; HuggingFace and CivitAI are then searched live for the rest of the shortlist. Each candidate carries the fields of a definition’s models[] entry (sourceUri, type, filename, sha256), so the create/edit flow can offer a model without the user hunting for a link. A candidate omits type when no model directory is known for it; the caller then picks one from GET /v1/model-directories, since a check or a cut refuses a model with no type.
Candidates are ranked, never applied: a filename is a weak key, so the answer is a shortlist with its confidence attached and the caller picks. A filename that resolves to nothing returns an empty candidates array, not an error — plenty of models are private, renamed, or user-trained. Nothing is cached; every call queries the providers.
curl --request POST \
--url https://platformapi.comfy.org/builder/v1/models/resolve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filenames": [
"<string>"
]
}
'import requests
url = "https://platformapi.comfy.org/builder/v1/models/resolve"
payload = { "filenames": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({filenames: ['<string>']})
};
fetch('https://platformapi.comfy.org/builder/v1/models/resolve', 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://platformapi.comfy.org/builder/v1/models/resolve",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filenames' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platformapi.comfy.org/builder/v1/models/resolve"
payload := strings.NewReader("{\n \"filenames\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platformapi.comfy.org/builder/v1/models/resolve")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filenames\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platformapi.comfy.org/builder/v1/models/resolve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filenames\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"filename": "<string>",
"candidates": [
{
"sourceUri": "<string>",
"filename": "<string>",
"source": "huggingface",
"confidence": 0.5,
"verified": true,
"type": "<string>",
"sha256": "<string>",
"sizeBytes": 123,
"repo": "<string>"
}
],
"error": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>"
}Autorizaciones
Cuerpo
Bare model filenames to resolve. Each must be a plain filename (no path separators) made of the same characters a definition's model filename allows; anything else is not looked up and comes back with error set in its result, since the value would become a provider query. A 400 is only for an empty list or more than 32 names.
1 - 32 elementsRespuesta
Resolution ran. One result per requested filename, in request order; a result with no candidates means nothing was found, which is a normal outcome. A filename that could not be looked up, including a malformed one, carries error instead of failing the request.
¿Esta página le ayudó?