🛝Playground
Create Image
POST
/playground
Prompt the playground model for an image
Headers
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Body
Name
Type
Description
Default
version
string
Model version
2.5
prompt
string
Image prompt
none
negative_prompt
string
Negative prompt
custom
guidance_scale
number
Prompt following
3
Response
{
"data": "d2VsbF9oZWxsb190aGVyZV90Lm1lL3N5bmFwc2VfbGFicw....."
}
Example
const res = await fetch('https://synapselabs.onrender.com/playground', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your_api_key>'
},
body: JSON.stringify({
prompt: 'A cat',
}),
});
const data = await res.json();
const buf = Buffer.from(data.data, 'base64');
fs.writeFileSync('test.png', buf);
Last updated