メインコンテンツへスキップ
GET
/
api
/
view
ファイルを表示
curl --request GET \
  --url https://cloud.comfy.org/api/view \
  --header 'X-API-Key: <api-key>'
import requests

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

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/view', 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/view",
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/view"

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/view")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

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

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
"<string>"
{
"code": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"message": "<string>"
}
{
"code": "<string>",
"message": "<string>"
}

承認

X-API-Key
string
header
必須

APIキー認証。アカウント設定からAPIキーを生成します (https://platform.comfy.org/profile/api-keys)。X-API-Keyヘッダーでキーを渡します。

クエリパラメータ

filename
string
必須

表示するファイルの名前

:

"ComfyUI_00004_.png"

subfolder
string

ファイルが配置されているサブフォルダパス。 注記: ComfyUI API互換性のために受け入れられますが、クラウドでは無視されます。クラウドはコンテンツアドレスストレージを使用し、アセットはハッシュのみで保存されます。サブフォルダはクライアントサイドのUIメタデータであり、ストレージのルックアップには使用されません。

:

"tests/foo/bar"

type
string

ファイルのタイプ(例:出力、入力、一時)。 注記: クラウドでは、output ファイルと temp ファイルの両方が同じバケットに保存されます。typeパラメータは互換性のために使用されますが、ストレージの場所はハッシュによって決定されます。

:

"output"

fullpath
string

ファイルの完全なパス(一時ファイルに使用)

format
string

ファイルのフォーマット

frame_rate
integer

ビデオファイルのフレームレート

workflow
string

ワークフロー識別子

timestamp
integer

タイムスタンプパラメータ

:

"1234567890"

channel
string

PNG画像から抽出する画像チャンネル。

  • 'rgb': RGBチャンネルのみを返します(アルファは完全不透明に設定)
  • 'a' または 'alpha': アルファチャンネルをグレースケール画像として返します
  • 指定しない場合は、リダイレクト経由でオリジナル画像をそのまま返します
:

"rgb"

レスポンス

成功: ファイルコンテンツが返されます(チャンネルパラメータが存在する場合に使用)

抽出されたチャンネルを持つ処理済みPNG画像