v1alpha/generation
text-to-image
Generate an image from text - deprecated, use v1beta/text-to-image instead
post/generation/{engine_id}/text-to-image
Path parameters
engine_idstring required
Example:stable-diffusion-512-v2-0
Headers
Accept'application/json' | 'image/png'
Example:application/json
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.
Authorizationstring required
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
}
]