curl --request POST \
--url https://platformapi.comfy.org/builder/v1/releases/{id}/artifacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"target": {}
}'import requests
url = "https://platformapi.comfy.org/builder/v1/releases/{id}/artifacts"
payload = { "target": {} }
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({target: {}})
};
fetch('https://platformapi.comfy.org/builder/v1/releases/{id}/artifacts', 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/releases/{id}/artifacts",
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([
'target' => [
]
]),
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/releases/{id}/artifacts"
payload := strings.NewReader("{\n \"target\": {}\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/releases/{id}/artifacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platformapi.comfy.org/builder/v1/releases/{id}/artifacts")
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 \"target\": {}\n}"
response = http.request(request)
puts response.read_body{
"artifactId": "<string>",
"status": "queued",
"statusUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"invalid": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"error": "<string>",
"reason": "no_credit_balance",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Build an additional target for a cut release
Builds one more target (e.g. linux/amd) for a release that is already cut, reusing the same frozen manifest, so it is the same environment on different hardware. A deleted release takes no more targets and answers 404, the same as a release the workspace does not have. A release whose ComfyUI pin is older than the minimum /v1/base-images serves answers 400 INVALID_DEFINITION, with invalid naming that minimum, for any target that would start a build (new, failed, queued or building), since such a build fails its test step; a target already built still answers 409.
curl --request POST \
--url https://platformapi.comfy.org/builder/v1/releases/{id}/artifacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"target": {}
}'import requests
url = "https://platformapi.comfy.org/builder/v1/releases/{id}/artifacts"
payload = { "target": {} }
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({target: {}})
};
fetch('https://platformapi.comfy.org/builder/v1/releases/{id}/artifacts', 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/releases/{id}/artifacts",
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([
'target' => [
]
]),
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/releases/{id}/artifacts"
payload := strings.NewReader("{\n \"target\": {}\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/releases/{id}/artifacts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"target\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platformapi.comfy.org/builder/v1/releases/{id}/artifacts")
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 \"target\": {}\n}"
response = http.request(request)
puts response.read_body{
"artifactId": "<string>",
"status": "queued",
"statusUrl": "<string>"
}{
"error": "<string>",
"message": "<string>",
"invalid": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"error": "<string>",
"reason": "no_credit_balance",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}授权
响应
Accepted; poll statusUrl.
Closed enum for a release's build lifecycle: queued (nothing started), building (a target is in flight), stopping (a target is stopping), stopped (all targets are terminal and some stopped), complete (all targets are terminal and none stopped). It says only whether the build is DONE, not whether it succeeded or is deployable. A complete release may have built all, some, or none of its targets; see artifactCounts and deployable. Adding or retrying a target reopens it to building.
queued, building, complete, stopping, stopped