Text to image
POST/v1/text-to-image
Create an image given a prompt describing the image. See available models at this pricing table.
Request
Header Parameters
ID of a team to run request as.
- multipart/form-data
Body
Code of the model to use. See available model list.
A text description of the desired image(s).
A text specifying what you don't want in your image(s).
Possible values: <= 16
The number of images to generate. Must be between 1 and 16. Only 1 output will be generated when not provided.
Possible values: <= 500
The number of inference steps for denoising process. 50 steps will be taken when not provided.
Guidance scale to control how much generation process adheres to the text prompt. When not provided, it is set to 7.5.
Seed to control random procedure. If nothing is given, the API generate the seed randomly.
Possible values: [raw
, png
, jpeg
, url
]
Default value: url
The format in which the generated images are returned.
Responses
- 200
- 422
Successfully generated image(s).
- application/json
- Schema
Schema
- Array [
- raw
- png
- jpeg
- url
- ]
data object[]required
Generation data.
Possible values: [raw
, png
, jpeg
, url
]
Format of the generated images in response.
Random seed used for the generation.
The base64-encoded JSON of the generated image.
Random seed used for the generation.
The base64-encoded JSON of the generated image.
Random seed used for the generation.
The base64-encoded JSON of the generated image.
Random seed used for the generation.
Url to download generated images.
Validation Error
- application/json
- Schema
Schema
- Array [
- ]
detail object[]
Location of the error point.
Error message.
Error type.