API 參考
匯入 HTTPS 參考圖
POST
/v1/image-assets/import上傳開關關閉時路由直接 404;單個 JSON 物件,不接受未知欄位,正文最多 8192 位元組。失敗或未準備好的匯入不能當成生成重試。
鑑權與許可權
使用當前 GloopAPI Key。模型、功能與許可權以當前 Key 的目錄及介面說明為準。
Authorization: Bearer $GLOOP_API_KEY鑑權方案: BearerAuth
請求
請求頭
Idempotency-Keystring必填同 Key 儲存原請求意圖;網路中斷先恢復查詢,未知狀態禁止盲重發。
- 最短長度
1- 最長長度
191
請求體 · application/json
- 型別
- object
- 必填欄位
url- 額外屬性
- false
請求體必填
urlstring必填公開 HTTPS 圖片地址,受 SSRF 與圖片內容校驗。
- 格式
"uri"
響應與錯誤
HTTP 200
匯入 HTTPS 參考圖成功
application/json
- 型別
- object
- 必填欄位
idmime_typesize_byteswidthheightexpires_at
file_idstring選填同賬戶同 Key 的託管檔案公開 ID。
idstring必填該物件的公開識別符號;用於對應詳情路徑。
mime_typestring必填已核驗檔案 MIME 型別。
size_bytesinteger必填檔案位元組數。
widthinteger必填圖片畫素寬度。
heightinteger必填圖片畫素高度。
expires_atinteger必填Unix 秒;0 表示無固定過期時間。上傳關聯託管檔案;讀取必須使用同賬戶同 Key。
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選填