Skip to main content
Glama

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
NameRequiredDescriptionDefault
modelNoimage-01
promptNo
aspect_ratioNo1:1
nNo
prompt_optimizerNo
output_directoryNo

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/swesmith-repos/MiniMax-AI__MiniMax-MCP.aa97ac39'

If you have feedback or need assistance with the MCP directory API, please join our Discord server