curl --location "https://randomseed.lol/v1/controlnet" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $RANDOMSEED_API_KEY" \
--data '{
"controlnet": {
"prompt": "Beautiful landscape with fluffy clouds, HDR lighting, high dynamic range, vibrant colors",
"negative_prompt": "((deformed face)), ((disfigured)), ((bad art)), ((deformed)), (disfigured face and eyes:1.1)",
"width": "1028",
"height": "512",
"number_of_images": "4",
"steps": "20",
"cfg_scale": 8,
"sampler_name": "Euler a",
"model_name": "realistic_vision_v4",
"controlnet_args": [
{
"input_image": "...",
"module": null,
"model": "control_v1p_sd15_qrcode_monster"
}
],
"webhook": "...",
"track_id": 1,
"seed": "-1"
}
}'
{
"message": "image generation in progress",
"result": {
"id": "...", // request id you're going to use for polling if webhook url is not provided
"status": "IN_QUEUE"
}
}
Endpoints
v1/controlnet
Generate an image from text & ControlNet models
curl --location "https://randomseed.lol/v1/controlnet" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $RANDOMSEED_API_KEY" \
--data '{
"controlnet": {
"prompt": "Beautiful landscape with fluffy clouds, HDR lighting, high dynamic range, vibrant colors",
"negative_prompt": "((deformed face)), ((disfigured)), ((bad art)), ((deformed)), (disfigured face and eyes:1.1)",
"width": "1028",
"height": "512",
"number_of_images": "4",
"steps": "20",
"cfg_scale": 8,
"sampler_name": "Euler a",
"model_name": "realistic_vision_v4",
"controlnet_args": [
{
"input_image": "...",
"module": null,
"model": "control_v1p_sd15_qrcode_monster"
}
],
"webhook": "...",
"track_id": 1,
"seed": "-1"
}
}'
{
"message": "image generation in progress",
"result": {
"id": "...", // request id you're going to use for polling if webhook url is not provided
"status": "IN_QUEUE"
}
}
API key
Create your account on RandomSeed & grab your api keyHeaders
Your API key. This is required by most endpoints to access our API programatically. You can get your api key by clicking on ‘API reference’ tab under your profile icon.
Body
This is the text prompt for the image you want generated. Loras can be used by adding this in the prompt
<lora:LORA_NAME:weight> where LORA_NAME is the name of the lora model and weight can be from 0 to 1, with decimal values supported.This is the number of the denoising steps used by the AI model when generating an image. A higher number results in a longer generation time, and does not necessarily guarantee higher image quality.
This is the number of the number you specify to control how closely AI model should follow the text prompt. 7 or 7.5 usually works best. You can increase the value if the generated image doesn’t match your prompt. Make sure to increment it by 0.5
This is the name of the sampler method you will be using to generate an image. Image output varies slightly depending on the method.
You can pick one of the following methods
Specify the name of the model you’d like to use. You can find the model names here
This is the value that determines the output of a random number generator. You can get ALMOST the same image if you provide the same parameters and the seed.
Response
curl --location "https://randomseed.lol/v1/controlnet" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $RANDOMSEED_API_KEY" \
--data '{
"controlnet": {
"prompt": "Beautiful landscape with fluffy clouds, HDR lighting, high dynamic range, vibrant colors",
"negative_prompt": "((deformed face)), ((disfigured)), ((bad art)), ((deformed)), (disfigured face and eyes:1.1)",
"width": "1028",
"height": "512",
"number_of_images": "4",
"steps": "20",
"cfg_scale": 8,
"sampler_name": "Euler a",
"model_name": "realistic_vision_v4",
"controlnet_args": [
{
"input_image": "...",
"module": null,
"model": "control_v1p_sd15_qrcode_monster"
}
],
"webhook": "...",
"track_id": 1,
"seed": "-1"
}
}'
{
"message": "image generation in progress",
"result": {
"id": "...", // request id you're going to use for polling if webhook url is not provided
"status": "IN_QUEUE"
}
}