API 參考

查詢持久影象能力

GET/v1/image-models

傳回功能開關與目前 Key 可執行的模型能力。省略 operation 時僅查詢生成;edit、upscale、background_remove 分別查詢編輯、放大、去背。新操作僅在儲存容量檢查通過且價格完整時可見,請以此回應為準。

鑑權與許可權

使用當前 GloopAPI Key。模型、功能與許可權以當前 Key 的目錄及介面說明為準。

Authorization: Bearer $GLOOP_API_KEY

鑑權方案: BearerAuth

請求

查詢引數

  • operationstring選填

    省略時僅列出生成模型;其他值傳回已授權、價格完整且可執行的相應操作模型。

    列舉
    ["generate","edit","upscale","background_remove"]

響應與錯誤

HTTP 200

查詢持久影象能力成功

application/json

型別
object
必填欄位
workspace_enabledfile_storage_enableddataupload_enabled
  • workspace_enabledboolean必填

    當前工作區新任務功能是否可用,不表示歷史物件被刪除。

  • 服務是否啟用託管檔案儲存。

  • dataarray必填

    當前頁/目錄資料陣列。

    data 子欄位(1)
    • []object選填
      [] 子欄位(10)
      • idstring必填

        該物件的公開識別符號;用於對應詳情路徑。

      • namestring必填

        使用者可讀名稱。

      • providerstring必填

        能力目錄的提供方名稱,用於展示模型資訊。

      • max_referencesinteger必填

        所選模型允許的最大參考圖數量。

      • max_ninteger必填

        所選模型允許的最大輸出張數。

      • sizesarray必填

        此模型允許的尺寸列表。

        sizes 子欄位(1)
        • []object選填
          [] 子欄位(2)
          • valuestring必填

            實際提交的尺寸值。

          • labelstring必填

            尺寸的顯示名稱。

      • versionstring必填

        契約/能力或工具版本;執行使用目錄返回的工具版本。

      • outputstring必填

        工具輸出的 JSON 或模型輸出形式,由對應 schema/能力定義。

      • operationsarray選填

        新操作模型的執行類型;舊生成模型省略。

        operations 子欄位(1)
        • []string選填
          列舉
          ["edit","upscale","background_remove"]
      • operation_optionsobject選填

        新操作可執行的規格;多圖輸入依參照順序傳入。非空的解析度/畫質列表須明確選擇其中的項目。

        operation_options 子欄位(6)
  • upload_enabledboolean必填

    服務是否啟用參考圖上傳。

HTTP 400

請求欄位或引數無效。

application/json

型別
object
必填欄位
error

HTTP 401

Key 缺失、無效、過期或已撤銷。

application/json

型別
object
必填欄位
error

HTTP 403

IP、賬戶、模型或工具許可權不足。

application/json

型別
object
必填欄位
error

HTTP 404

物件/能力不可用,或功能開關關閉。

application/json

型別
object
必填欄位
error

HTTP 409

冪等/報價衝突、物件未準備或仍被引用。

application/json

型別
object
必填欄位
error

HTTP 429

請求/佇列限流。

application/json

型別
object
必填欄位
error

HTTP 500

鑑權或資料儲存內部失敗。

application/json

型別
object
必填欄位
error

HTTP 503

服務、定價或儲存不可用。

application/json

型別
object
必填欄位
error