🖼️Stable Diffusion XL
Stable Diffusion XL Models
List Models
GET
/sdxl/list
List all currently available Stable Diffusion XL models
Headers
Content-Type
application/json
Response
["SDXL_base", "DreamShaperXL_1.0", ...]
List Samplers
GET
/sdxl/sampler
List available samplers
Headers
Content-Type
application/json
Response
["Euler", "Euler a", "LMS", ...]
List Loras
GET
/sdxl/lora
List available Loras
You can use loras in your prompt with <lora:Name:weight>
Headers
Content-Type
application/json
Response
[
"3lectronics_v10",
"blu3print_v10",
"c0nst3llation_v10",
"cyborg_style_xl-v10",
...
]
List Embeddings
GET
/sdxl/embeddings
List available Embeddings
Headers
Content-Type
application/json
Response
[
"FastNegativeV2",
"easynegative"
]
Create Image
POST
/sdxl/:model
Send image prompt to Stable Diffusion XL
Headers
Content-Type
application/json
Authorization
Bearer <token>
Body
prompt
string
Image Prompt
none
negative_prompt
string
Negative prompt
custom
steps
number
Diffusion steps
20
cfg_scale
number
Prompt following
7
sampler
string
Diffusion sampler
DPM++ 2M Karras
Response
{
"data": "d2VsbF9oZWxsb190aGVyZV90Lm1lL3N5bmFwc2VfbGFicw....."
}
Example
const res = await fetch('https://synapselabs.onrender.com/sdxl/SDXL_base', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_api_key>'
},
body: JSON.stringify({
prompt: 'A cat',
steps: 20,
cfg_scale: 7,
sampler: 'DPM++ 2M Karras',
}),
});
const data = await res.json();
const buf = Buffer.from(data.data, 'base64');
fs.writeFileSync('test.png', buf);
Last updated