API reference
Edit images
/v1/images/editsEdit one or more images with an editing model. Multipart requests support image or repeated image[] fields; mask is unsupported and n must be 1. Idempotency-Key is required. A persistent task is created, and created/data is returned after settlement. If the task is still incomplete after approximately 55 seconds, the response is 504 with error.task_id: query that original task and never automatically resend with a different idempotency key. X-Image-Task-ID identifies the original task. With response_format=url, the result URL is relative to the site root and requires Bearer authentication with the original API Key. Prompt enhancement is unsupported. Input storage capacity and expiry follow file-service limits. Output is limited to 64 MiB.
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-KeystringRequired- Maximum length
191
Request body · multipart/form-data
- Type
- object
- Required fields
modelprompt- Additional properties
- false
Request body required
modelstringRequiredPublic model ID from the current key's catalog.
- Maximum length
191
promptstringRequiredNonempty, at most 32000 UTF-8 bytes. OpenAPI maxLength counts characters, so no artificial character limit is specified.
resolutionstringOptionalSelect values from the model's operation_options. When tiers are available, resolution/quality must be specified explicitly. Configurations without prices cannot be used.
qualitystringOptionalSelect values from the model's operation_options. When tiers are available, resolution/quality must be specified explicitly. Configurations without prices cannot be used.
aspect_ratiostringOptionalSelect values from the model's operation_options. When tiers are available, resolution/quality must be specified explicitly. Configurations without prices cannot be used.
output_formatstringOptionalEditing only; defaults to png.
- Enum
["png","jpeg","jpg","webp"]
imagestringOptionalUse either image or image[], not both. Each image must be at most 10 MiB and remain within the asset size limit after normalization. The entire multipart request is limited to 128 MiB.
- Format
"binary"
nintegerOptional- Enum
[1]
response_formatstringOptional- Default value
"b64_json"- Enum
["b64_json","url"]
image[]arrayOptionalRepeated file field. Input order is preserved; model capabilities may further limit the count.
- Maximum items
14
image[] child fields (1)
[]stringOptional- Format
"binary"
Responses and errors
HTTP 200
Completed and settled
application/json
- Type
- object
HTTP 400
Invalid parameters or file
application/json
- Type
- object
errorobjectOptional
HTTP 409
Idempotency key conflict
application/json
- Type
- object
errorobjectOptional
HTTP 502
Execution failed or the outcome is unknown; error.task_id identifies the original task.
application/json
- Type
- object
errorobjectOptional
HTTP 504
Wait timed out; error.task_id identifies the original task that is still processing.
application/json
- Type
- object
errorobjectOptional