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必填當前工作區新任務功能是否可用,不表示歷史物件被刪除。
file_storage_enabledboolean必填服務是否啟用託管檔案儲存。
dataarray必填當前頁/目錄資料陣列。
data 子欄位(1)
[]object選填[] 子欄位(10)
idstring必填該物件的公開識別符號;用於對應詳情路徑。
namestring必填使用者可讀名稱。
providerstring必填能力目錄的提供方名稱,用於展示模型資訊。
max_referencesinteger必填所選模型允許的最大參考圖數量。
max_ninteger必填所選模型允許的最大輸出張數。
sizesarray必填此模型允許的尺寸列表。
versionstring必填契約/能力或工具版本;執行使用目錄返回的工具版本。
outputstring必填工具輸出的 JSON 或模型輸出形式,由對應 schema/能力定義。
operationsarray選填新操作模型的執行類型;舊生成模型省略。
operations 子欄位(1)
[]string選填- 列舉
["edit","upscale","background_remove"]
operation_optionsobject選填新操作可執行的規格;多圖輸入依參照順序傳入。非空的解析度/畫質列表須明確選擇其中的項目。
operation_options 子欄位(6)
operationstring選填- 列舉
["edit","upscale","background_remove"]
max_input_imagesinteger選填- 最小值
1- 最大值
14
max_prompt_charactersinteger選填- 最小值
1- 最大值
32768
resolutionsarray選填resolutions 子欄位(1)
[]string選填
qualitiesarray選填qualities 子欄位(1)
[]string選填
aspect_ratiosarray選填aspect_ratios 子欄位(1)
[]string選填
upload_enabledboolean必填服務是否啟用參考圖上傳。
HTTP 400
請求欄位或引數無效。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 401
Key 缺失、無效、過期或已撤銷。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 403
IP、賬戶、模型或工具許可權不足。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 404
物件/能力不可用,或功能開關關閉。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 409
冪等/報價衝突、物件未準備或仍被引用。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 429
請求/佇列限流。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 500
鑑權或資料儲存內部失敗。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 503
服務、定價或儲存不可用。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填