v1
latestOpenAPI 3.1.02026-07-24306.9 KBImage Generation
Request body
The text prompt for the image
What you don’t want in the image
String representing which model to use. If no value is set, our latest model will be used.
For Playground v3, width and height must be divisible by 32
For Playground v3, width and height must be divisible by 32
The number of iterations to take in the diffusion. Roughly corresponds to the resulting image’s detail and quality. Maximum 150.
Default: 3 with Playground_v2, 7 with other models. Scale for the amount of influence the prompt will have on the resulting image
Representing the scheduler to use
0 < seed < 2^16. Used to seed the random number generator
Base64 representation of the initial image for img2img. We support PIL image formats: https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html
For img2img, how much of the image will be reproduced (0 reproduces the init_image, 1 will be entirely new)
Uses an LLM to generate a prompt that is more aesthetic, diverse, and interesting
Run a model to verify that the prompt is safe across a number of bases. This may add up to 500ms of latency
A list of topics that should be rejected if the user prompt references / contains. Will be rejected with error code PROMPT_UNSAFE. For example: gambling, brand logos
Filter to apply to the prompt of the image. These do not use a separate image model.
Response
200
Example response
{
"images": [
"b64 encoded image here"
]
}