Skip to main content

Dreambooth API V4

Overview

The Dreambooth API V4 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
Text to image endpoint result

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
Image to image endpoint result

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
Inpainting endpoint result

Text to Video Endpoint

This endpoint is used to create video from a text prompt based on trained or on public models.

Endpoint in Action
Text to video endpoint result

Fetch Queued Images Endpoint

This endpoint returns an already generated image by passing its ID in the request body to the Fetch endpoint. This ID is returned by the id parameter in the response upon the request execution.

note

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 and the ID as "request_id" in the request body to the fetch endpoint.

Alternatively, in your generation request, you can pass a webhook, on which a post API call will be made.

Reload Model Endpoint

The Dreambooth Reload Model API is used to reload an idle model that has not been used for more than 7 days.