Edit request containing the source image, prompt, and optional mask.
Generation result with the edited image(s).
When the provider is not initialised.
When the Stability API returns an HTTP error status.
Upscales an image with Stability AI's fast upscaler,
/v2beta/stable-image/upscale/fast, which takes the image alone and
returns it at four times its resolution. The request's scale, width
and height are not used: no Stability upscaler takes a target size,
and the conservative and creative upscalers require a prompt, which an
upscale request does not carry (Stability's API specification,
https://api.stability.ai/v2alpha/openapi).
Upscale request with the source image.
Generation result with the upscaled image.
When the provider is not initialised.
When the Stability API returns an HTTP error status.
The model a style transfer reports: Stability's style-transfer endpoint takes no model, so an empty id and STABILITY_STYLE_TRANSFER_MODEL are the only ones accepted.
The model the call names, or an empty string.
For any other model.
Restyles an image after a style reference with Stability AI's style
transfer, /v2beta/stable-image/control/style-transfer, which takes the
source as init_image and the reference as style_image and answers
with one image of 1 MP at the source's aspect ratio (Stability's API
reference). strength is sent as style_strength, where 0 leaves the
source as it is; the endpoint takes no model and no size.
Before the request: both images must be JPEG, PNG or WebP, the request
within 10 MiB, the prompt and negative prompt at most 10,000 characters,
the seed an integer from 0 to 4,294,967,294, compositionFidelity from 0
to 1 and changeStrength from 0.1 to 1.
The source, the reference and the prompt.
Generation result with the restyled image.
When the provider is not initialised, the model or an argument is refused, the API returns an HTTP error status, or the answer holds no image.
Readonly providerOptional default
Edits an image with Stability AI, on the endpoint the request needs (Stability's API specification, https://api.stability.ai/v2alpha/openapi):
/v2beta/stable-image/generate/sd3withmode=image-to-image,imageandstrength. The route takes the SD3 models only, and itsimageandstrengthare valid in that mode only;/v2beta/stable-image/edit/inpaintwithimageandmask(white is repainted, black kept). It takes no model and no strength.The request's
modeis not read:'outpaint'runs as image-to-image.