Stable Diffusion API
Overview
The Stable Diffusion API is using SDXL as single model API. So you can't change model on this endpoint. This API is faster and creates images in seconds.
The available endpoints handle requests for generating images based on specific description and/or image provided.
You can also specify the number of images to be generated and set their height and width.
Currently the API supports the following image formats: PNG and JPG.
Available Endpoints
Text to Image Endpoint
This endpoint generates and returns an image from a text passed in the request.
You can write prompt and negative prompt. The prompt is for the things you would like to see in the image and the negative prompt is to refine you description by listing the things you do not want to have in the generated image.
Endpoint in Action
Image to Image Endpoint
This endpoint generates and returns an image from an image passed with its URL in the request.
Together with the image you can add your description of the desired result by passing prompt and negative prompt.
The generated image will be based on the original image with the modifications described in the prompts.
Endpoint in Action
Inpainting Endpoint
This endpoint generates and returns an image from an image and a mask passed with their URLs in the request.
Together with the image and the mask you can add your description of the desired result by passing prompt and negative prompt.
The generated image will be based on the original image with the applied mask in order to replace an element in the image according to the modifications described in the prompts.
Endpoint in Action
Fetch Queued Images Endpoint
This endpoint returns an already generated image by passing its ID with the endpoint location. This ID is specified by the id parameter in the response returned upon the request execution.
Sometimes the response to your request might be with a processing status. In this case, instead of an output image, you will get its ID and the eta (estimated time) needed for it to be generated. This is when the Fetch Queued Image endpoint comes in handy. Simply pass your API key as the request body to the endpoint location returned by the fetch_result
parameter.
Alternatively, in your generation request, you can pass a webhook, on which a post API call will be made.
System Load Endpoint
This endpoint returns information about any queued images, their processing time and the system status.
Super Resolution Endpoint
This endpoint generates and returns a scaled up high resolution image from an image passed with its URL in the request.
Endpoint in Action
Playground
You can try the available endpoints in our Playground section, just make sure to sign up first.