Dreambooth API
Overview
The Dreambooth API brings some cool features for interaction with community models. You can send request using own models or publicly available ones, just specify the model's ID.
You can find a list of available community models as well as their IDs here.
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 and model ID 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 as well as the desired model's ID.
Together with the image you can add your description of the expected result by passing prompt and negative prompt.
The generated image will be based on the original image with the modifications described in the prompts also affected by the model specified.
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 a model's ID.
You can also 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 and the selected model.
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.
Playground
You can try the available endpoints in our Playground section, just make sure to sign up first.