Generate images based on the provided prompt and parameters
Body
Required
-
Number of images to generate
Default value is
1. -
Desired image dimensions, format: WIDTHxHEIGHT
Values are
1:1,9:16,16:9,4:3, or3:4. Default value is1:1. -
Values are
block_most,block_some,block_few, orblock_fewest. Default value isblock_few. -
Values are
dont_allow,allow_adult, orallow_all. Default value isallow_all.
POST
/image/generate
curl \
--request POST 'http://localhost:8080/api/image/generate' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"prompt":"string","model":"string","provider":"string","number_of_images":1,"aspect_ratio":"1:1","safety_filter_level":"block_few","person_generation":"allow_all","seed":42,"negative_prompt":"string"}'
Request examples
{
"prompt": "string",
"model": "string",
"provider": "string",
"number_of_images": 1,
"aspect_ratio": "1:1",
"safety_filter_level": "block_few",
"person_generation": "allow_all",
"seed": 42,
"negative_prompt": "string"
}
Response examples (200)
{
"images": [
"string"
],
"error": "string",
"count": 1
}