API reference
Upload a reference image
/v1/image-assetsThe first and only multipart part must be file and include a filename. Non-animated JPEG/PNG/WebP only, no larger than 10 MiB both when uploaded and after re-encoding.
Authentication and permissions
Use your current GloopAPI key. Available models, capabilities and permissions depend on its catalog and the endpoint documentation.
Authorization: Bearer $GLOOP_API_KEYAuthentication schemes: BearerAuth
Request
Request headers
Idempotency-KeystringRequiredRetain the original request intent with the same key. After a network interruption, query recovery first; never blindly resend unknown states.
- Minimum length
1- Maximum length
191
Request body · multipart/form-data
- Type
- object
- Required fields
file- Additional properties
- false
Request body required
filestringRequiredThe only image part, with filename; non-animated JPEG/PNG/WebP <=10MiB.
- Format
"binary"
Responses and errors
HTTP 200
Reference image uploaded successfully
application/json
- Type
- object
- Required fields
idmime_typesize_byteswidthheightexpires_at
file_idstringOptionalPublic ID of a managed file for the same account and key.
idstringRequiredPublic identifier of this object, used for its corresponding detail path.
mime_typestringRequiredVerified file MIME type.
size_bytesintegerRequiredFile size in bytes.
widthintegerRequiredImage width in pixels.
heightintegerRequiredImage height in pixels.
expires_atintegerRequiredUnix seconds; 0 means no fixed expiration. Uploads are associated with managed files; reads require the same account and key.
HTTP 400
Invalid request fields or parameters.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 401
The key is missing, invalid, expired, or revoked.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 403
Insufficient IP, account, model, or tool permissions.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 404
Object/capability unavailable, or feature switch disabled.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 409
Idempotency/quote conflict, object not ready, or still referenced.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 429
Request/queue rate limit.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 500
Internal authentication or data storage failure.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional
HTTP 503
Service, pricing, or storage unavailable.
application/json
- Type
- object
- Required fields
error
errorobjectRequirederror child fields (4)
codestringOptionalmessagestringOptionaltypestringOptionalrequest_idstringOptional