Référence API
Téléverser une image de référence
/v1/image-assetsLa première et seule partie multipart est file, avec nom de fichier ; JPEG/PNG/WebP non animé, au plus 10 MiB avant et après réencodage.
Authentification et autorisations
Utilisez votre clé GloopAPI actuelle. Les modèles, capacités et autorisations disponibles dépendent de son catalogue et de la documentation du point de terminaison.
Authorization: Bearer $GLOOP_API_KEYSchémas d'authentification : BearerAuth
Requête
En-têtes de requête
Idempotency-KeystringObligatoireConserve l'intention initiale sous la même Key. Après interruption réseau, consultez d'abord la récupération ; aucune répétition aveugle pour un état inconnu.
- Longueur minimale
1- Longueur maximale
191
Corps de requête · multipart/form-data
- Type
- object
- Champs obligatoires
file- Propriétés supplémentaires
- false
Corps de requête obligatoire
filestringObligatoireUnique partie image avec filename ; JPEG/PNG/WebP <=10MiB, non animée.
- Format
"binary"
Réponses et erreurs
HTTP 200
Image de référence téléversée
application/json
- Type
- object
- Champs obligatoires
idmime_typesize_byteswidthheightexpires_at
file_idstringFacultatifID public du fichier hébergé du même compte et de la même Key.
idstringObligatoireIdentifiant public de l'objet, utilisé dans son chemin de détails.
mime_typestringObligatoireType MIME du fichier vérifié.
size_bytesintegerObligatoireTaille du fichier en octets.
widthintegerObligatoireLargeur de l'image en pixels.
heightintegerObligatoireHauteur de l'image en pixels.
expires_atintegerObligatoireSecondes Unix ; 0 signifie sans expiration fixe. Le téléversement est lié à un fichier hébergé ; lecture avec le même compte et la même Key.
HTTP 400
Champs ou paramètres de requête invalides.
application/json
- Type
- object
- Champs obligatoires
error
errorobjectObligatoireSous-champs de error (4)
codestringFacultatifmessagestringFacultatiftypestringFacultatifrequest_idstringFacultatif
HTTP 401
Key absente, invalide, expirée ou révoquée.
application/json
- Type
- object
- Champs obligatoires
error
errorobjectObligatoireSous-champs de error (4)
codestringFacultatifmessagestringFacultatiftypestringFacultatifrequest_idstringFacultatif
HTTP 403
Autorisations IP, compte, modèle ou outil insuffisantes.
application/json
- Type
- object
- Champs obligatoires
error
errorobjectObligatoireSous-champs de error (4)
codestringFacultatifmessagestringFacultatiftypestringFacultatifrequest_idstringFacultatif
HTTP 404
Objet/capacité indisponible ou fonctionnalité désactivée.
application/json
- Type
- object
- Champs obligatoires
error
errorobjectObligatoireSous-champs de error (4)
codestringFacultatifmessagestringFacultatiftypestringFacultatifrequest_idstringFacultatif
HTTP 409
Conflit d'idempotence/devis, objet non prêt ou encore référencé.
application/json
- Type
- object
- Champs obligatoires
error
errorobjectObligatoireSous-champs de error (4)
codestringFacultatifmessagestringFacultatiftypestringFacultatifrequest_idstringFacultatif
HTTP 429
Limitation de débit des requêtes/de la file.
application/json
- Type
- object
- Champs obligatoires
error
errorobjectObligatoireSous-champs de error (4)
codestringFacultatifmessagestringFacultatiftypestringFacultatifrequest_idstringFacultatif
HTTP 500
Défaillance interne d'authentification ou de stockage des données.
application/json
- Type
- object
- Champs obligatoires
error
errorobjectObligatoireSous-champs de error (4)
codestringFacultatifmessagestringFacultatiftypestringFacultatifrequest_idstringFacultatif
HTTP 503
Service, tarification ou stockage indisponible.
application/json
- Type
- object
- Champs obligatoires
error
errorobjectObligatoireSous-champs de error (4)
codestringFacultatifmessagestringFacultatiftypestringFacultatifrequest_idstringFacultatif