By default, trained checkpoints are automatically deleted after 48h.
You can subscribe to a Plan to increase this duration: https://dreamlook.ai/pricing
We will explain step by step how to train a Stable Diffusion model using the API.
As you can see, a dummy job ID is returned, prefixed with "TEST_". This is not a real job: the job ID is not tracked, and you won't see it in your job list either from the API or from the website.
If you have specified a callback (see below), the callback will be sent along with some dummy data (including sample checkpoints, generated images, thumbnails, etc.).
Dry runs also work on our image_gen and dreambooth_image_gen endpoints.
Callbacks: Receive notifications when your jobs are done
You may want to add a callback to your request. Typically, this is a publicly accessible URL that points to your own backend and triggers further processing on your end after your job finishes. When the run has finished, the job payload (including results) will be sent via a POST request to this URL.
The payload corresponds to the job object, as returned by the /jobs/{job_type}/{job_id} endpoint.
Enter your publicly accessible URL into the field "Callback URL"
Click the button "Test it". This will send a POST request with a test payload to your endpoint. The test payload contains a signed URL that points to a untrained Stable Diffusion 1.5 model (regardless of your parameters).
You won't be charged for this action. The resulting job ID is a test ID ("TEST_") that is not tracked.
Keeping track of your jobs
Reading the state of a single job
During or after training, you can retrieve the status and results for an individual job using the /jobs/{job_type}/{job_id} endpoint. job_type can be one of dreambooth, image_gen, or dreambooth_image_gen.
Here's an example with a Dreambooth job with ID db_1ccb410f:
state: Can be one of queued, running, success, failure
config: Contains the configuration the job was started with
dreambooth_result: Any results from model training
checkpoints: List of checkpoints associated with this run. Checkpoints can be full checkpoints or LoRA checkpoints (checkpoint_type="lora") . Also note the training_step for each checkpoint.
image_gen_results: Any results from image generation (only for image-gen or dreambooth-image-gen jobs)
List all your jobs
In order to list all existing jobs, use the endpoint /jobs/{job_type} (e.g. /jobs/dreambooth). By default this lists the most recent 50 jobs.
Error codes
HTTP response code
Meaning
307
Temporary redirect. You may be using an outdated endpoint that is now deprecated.
404
The endpoint or resource does not exist.
401
Unauthorized. You need to provide a valid API key.
403
Forbidden. This may happen if you don't have enough quota (tokens) to fulfill the request.
422
Your job configuration/payload is invalid or not allowed.
5xx
Error codes of 500 or higher indicate that there is something wrong on our side. Please try again or reach out to us.