text-to-image
POST
/v1/generation/{engine_id}/text-to-imageGenerate a new image from a text prompt
Request
Path Params
engine_id
string
required
Example:
stable-diffusion-v1-6
Header Params
Accept
string
optional
The format of the response. Leave blank for JSON, or set to 'image/png' for a PNG image.
Organization
string
optional
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.
Example:
org-123456
Stability-Client-ID
string
optional
Used to identify the source of requests, such as the client application or sub-organization. Optional, but recommended for organizational clarity.
Example:
my-great-plugin
Stability-Client-Version
string
optional
Used to identify the version of the application or service making the requests. Optional, but recommended for organizational clarity.
Example:
1.2.1
Body Params application/json
No schema defined
Example
{
"cfg_scale": 7,
"clip_guidance_preset": "FAST_BLUE",
"height": 512,
"width": 512,
"sampler": "K_DPM_2_ANCESTRAL",
"samples": 1,
"steps": 30,
"text_prompts": [
{
"text": "A lighthouse on a cliff",
"weight": 1
}
]
}
Request samples
Responses
Success(200)
400(400)
401(401)
403(403)
404(404)
500(500)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
No schema defined
Example
Not configured
Last modified: 7 months ago