Skip to main content

Automatically Buy Dreambooth Model

Overview

This endpoint allows you to buy a Dreambooth model automatically.

Request

--request POST 'https://stablediffusionapi.com/api/v3/dreambooth/buy_model' \
caution

Before calling this endpoint, make sure that you have enabled Dreambooth Auto Payment on your dashboard.

Send a POST request to https://stablediffusionapi.com/api/v3/dreambooth/buy_model endpoint and pass the quantity of the models you want to buy in the request body.

Attributes

ParameterTypeDescription
keyStringYour API Key used for request authorization
quantityStringThe number of models you want to buy

Example

Body

Body Raw
{
"key": "",
"quantity": "4"
}

Request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
"key": "",
"quantity": "4"
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://stablediffusionapi.com/api/v3/dreambooth/buy_model", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Response

{
"status": "success",
"messege": "Payment was charged successfuly",
"purchased_models": 4,
"used_models": 0,
"available_models": 42
}