Image Generation
Generate images from a text prompt using various AI models on Subnet 23.
POSTv1/23/text-to-image
Generate an image
Generate images from text descriptions using various models.
Required attributes
- Name
prompt
- Type
- string
- Description
The textual prompt used to generate the image.
- Name
model_name
- Type
- string
- Description
The name of the model to use for image generation. Options:
- AnimeV3
- DreamShaperXL
- JuggernautXL
- RealitiesEdgeXL
- StickerMaker
Optional attributes
- Name
seed
- Type
- integer
- Description
The seed value for the random number generator. Use 0 for a random seed. Default: 0.
- Name
aspect_ratio
- Type
- string
- Description
Ratio of image to generate. Options: "1:1" (default), "2:3", "3:2", "16:9", "9:16", "13:19", "19:13".
- Name
negative_prompt
- Type
- string
- Description
List of things to avoid in the generation. Default: empty string.
- Name
advanced_params
- Type
- object
- Description
Advanced parameters such as number of steps and guidance scale:
num_inference_steps
: Number of inference steps (default: 20)use_expansion
: Use prompt expansion for more aesthetic output (default: false)
This endpoint is authenticated. Get your API key
Request
POST
v1/23/text-to-imagecurl -X POST https://api.bitmind.ai/oracle/v1/23/text-to-image \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a cute cat",
"model_name": "AnimeV3",
"seed": 0,
"aspect_ratio": "13:19",
"negative_prompt": "low quality",
"advanced_params": {
"num_inference_steps": 20,
"use_expansion": true
}
}'
Response
{
"image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4n"
}
The image generation model
The image generation model contains the generated image.
Properties
- Name
image
- Type
- string
- Description
The generated image.