v1/generation
text-to-image
Generate a new image from a text prompt
post/generation/{engine_id}/text-to-image
Path parameters
engine_idstring required
Example:stable-diffusion-v1-5
Headers
Accept'application/json' | 'image/png'
The format of the response. Leave blank for JSON, or set to 'image/png' for a PNG image.
Organizationstring
Allows for requests to be scoped to an organization other than the user's default. If not provided, the user's default organization will be used.
Request body
Example request
{
"cfg_scale": 7,
"clip_guidance_preset": "FAST_BLUE",
"height": 512,
"sampler": "K_DPM_2_ANCESTRAL",
"samples": 1,
"seed": 0,
"steps": 75,
"text_prompts": [
{
"text": "A lighthouse on a cliff",
"weight": 1
}
],
"width": 512
}Response
OK response.
Example response
[
{
"base64": "Sed corporis modi et.",
"finishReason": "CONTENT_FILTERED",
"seed": 1229191277
}
]