> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-feat-openapi-i18n.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# リモートURLからアセットメタデータを取得

> ファイル全体をダウンロードせずに、リモートのダウンロードURLからアセットのメタデータを取得します。CivitAIや他のモデルリポジトリを含むさまざまなソースをサポートします。HEADリクエストやAPI呼び出しを使用してメタデータを効率的に取得します。このエンドポイントはダウンロード前にメタデータをプレビューするためのものであり、既存のアセットのメタデータを取得するためのものではありません。



## OpenAPI

````yaml /openapi/cloud.ja.yaml get /api/assets/remote-metadata
openapi: 3.0.3
info:
  title: Comfy Cloud API
  description: >
    <Warning>

    **実験的API:** このAPIは実験的であり、変更される可能性があります。

    エンドポイント、リクエスト/レスポンス形式、および動作は予告なく変更される場合があります。

    </Warning>


    Comfy CloudのAPI - クラウドインフラ上でComfyUIワークフローを実行します。


    このAPIを使用すると、Comfy Cloudとプログラムで連携できます。内容は次のとおりです。

    - ワークフローの送信と管理

    - ファイルのアップロードとダウンロード

    - ジョブの状態と進捗の監視


    ## クラウド vs OSS ComfyUI 互換性


    Comfy Cloudは最大限の互換性のためにOSS
    ComfyUIと同じAPIインターフェースを実装していますが、一部のフィールドは互換性のために受け入れられますが、異なる処理が行われたり無視されたりします。


    | フィールド | エンドポイント | クラウドの動作 |

    |-------|-----------|----------------|

    | `subfolder` | `/api/view`, `/api/upload/*` | **無視** -
    クラウドはコンテンツアドレスストレージ（ハッシュベース）を使用します。クライアント側の整理のためにレスポンスで返されます。 |

    | `type` (input/output/temp) | `/api/view`, `/api/upload/*` | 部分的に使用 -
    すべてのファイルはディレクトリ構造ではなくタグベースの整理で保存されます。 |

    | `overwrite` | `/api/upload/*` | **無視** -
    コンテンツアドレスストレージでは、同一のコンテンツは常に同じハッシュを持ちます。 |

    | `number`, `front` | `/api/prompt` | **無視** - クラウドはユーザーごとに独自の公平キュー
    スケジューリングを使用します。 |

    | `split`, `full_info` | `/api/userdata` | **無視** -
    クラウドは常に完全なファイルメタデータを返します。 |


    これらのフィールドは、既存のComfyUIクライアントやワークフローとのドロップイン互換性のためにAPIスキーマに保持されています。
  version: 1.0.0
  license:
    name: GNU General Public License v3.0
    url: https://github.com/Comfy-Org/ComfyUI/blob/master/LICENSE
servers:
  - url: https://cloud.comfy.org
    description: Comfy Cloud API
security:
  - ApiKeyAuth: []
tags:
  - name: workflow
    description: |
      ワークフローを実行のために送信し、実行キューを管理します。
      これはクラウド上でComfyUIワークフローを実行するための主要な方法です。
  - name: job
    description: |
      ジョブステータスを監視し、実行履歴を表示し、実行中のジョブを管理します。
      ジョブはPOST /api/promptを介してワークフローを送信するときに作成されます。
  - name: asset
    description: |
      永続的なアセット（画像、モデル、出力）をアップロード、ダウンロード、管理します。
      アセットはタグ付けとメタデータサポートを備えた耐久性のあるストレージを提供します。
  - name: file
    description: |
      ローカルのComfyUIと互換性のあるレガシーファイルのアップロードおよびダウンロードエンドポイント。
      新しい統合には、代わりにAssets APIの使用を検討してください。
  - name: model
    description: |
      利用可能なAIモデルをブラウズします。モデルはクラウドインフラストラクチャにプリロードされています。
  - name: node
    description: |
      利用可能なComfyUIノードとその入力/出力に関する情報を取得します。
      動的なワークフローインターフェースの構築に役立ちます。
  - name: user
    description: |
      ユーザーアカウント情報と個人データの保存。
  - name: system
    description: |
      サーバーステータス、ヘルスチェック、システム情報。
paths:
  /api/assets/remote-metadata:
    get:
      tags:
        - asset
      summary: リモートURLからアセットメタデータを取得
      description: >-
        ファイル全体をダウンロードせずに、リモートのダウンロードURLからアセットのメタデータを取得します。CivitAIや他のモデルリポジトリを含むさまざまなソースをサポートします。HEADリクエストやAPI呼び出しを使用してメタデータを効率的に取得します。このエンドポイントはダウンロード前にメタデータをプレビューするためのものであり、既存のアセットのメタデータを取得するためのものではありません。
      operationId: getRemoteAssetMetadata
      parameters:
        - name: url
          in: query
          required: true
          description: メタデータを取得するダウンロードURL
          schema:
            type: string
            format: uri
            example: https://civitai.com/api/download/models/123456
      responses:
        '200':
          description: メタデータが正常に取得されました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetMetadataResponse'
        '400':
          description: 無効なURLまたは必須パラメータの不足
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 認証されていません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: ソースからメタデータを取得できませんでした
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: 内部サーバーエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    AssetMetadataResponse:
      type: object
      required:
        - content_length
      properties:
        content_length:
          type: integer
          format: int64
          description: アセットのサイズ（バイト単位、不明の場合は-1）
          example: 4294967296
        content_type:
          type: string
          description: アセットのMIMEタイプ
          example: application/octet-stream
        filename:
          type: string
          description: ソースからのアセットの推奨ファイル名
          example: realistic-vision-v5.safetensors
        name:
          type: string
          description: ソースからのアセットの表示名またはタイトル
          example: Realistic Vision v5.0
        tags:
          type: array
          items:
            type: string
          description: ソースからの分類用タグ
          example:
            - models
            - checkpoint
        preview_image:
          type: string
          description: base64エンコードされたデータURLとしての画像プレビュー
          example: data:image/jpeg;base64,/9j/4AAQSkZJRg...
        validation:
          $ref: '#/components/schemas/ValidationResult'
          description: ファイルの検証結果
    ErrorResponse:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
    ValidationResult:
      type: object
      required:
        - is_valid
      properties:
        is_valid:
          type: boolean
          description: 全体的な検証ステータス（すべてのチェックに合格した場合はtrue）
          example: true
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
          description: ダウンロードを妨げるブロッキング検証エラー
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
          description: 非ブロッキング検証警告（情報提供のみ）
    ValidationError:
      type: object
      required:
        - code
        - message
        - field
      properties:
        code:
          type: string
          description: 機械可読なエラーコード
          example: FORMAT_NOT_ALLOWED
        message:
          type: string
          description: 人間可読なエラーメッセージ
          example: >-
            File format "PickleTensor" is not allowed. Allowed formats:
            [SafeTensor]
        field:
          type: string
          description: 検証に失敗したフィールド
          example: format
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: |
        APIキー認証。アカウント設定からAPIキーを生成します
        （https://platform.comfy.org/profile/api-keys）。X-API-Keyヘッダーでキーを渡します。

````