text_to_image
Generate images from text prompts using AI, with customizable aspect ratios and prompt optimization, saving files to a specified directory.
Instructions
Generate a image from a prompt.
COST WARNING: This tool makes an API call to Minimax which may incur costs. Only use when explicitly requested by the user.
Args:
model (str, optional): The model to use. Values range ["image-01"], with "image-01" being the default.
prompt (str): The prompt to generate the image from.
aspect_ratio (str, optional): The aspect ratio of the image. Values range ["1:1", "16:9","4:3", "3:2", "2:3", "3:4", "9:16", "21:9"], with "1:1" being the default.
n (int, optional): The number of images to generate. Values range [1, 9], with 1 being the default.
prompt_optimizer (bool, optional): Whether to optimize the prompt. Values range [True, False], with True being the default.
output_directory (str): The directory to save the image to.
Returns:
Text content with the path to the output image file.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | image-01 | |
| prompt | No | ||
| aspect_ratio | No | 1:1 | |
| n | No | ||
| prompt_optimizer | No | ||
| output_directory | No |