Skip to main content
Glama

text_to_image

Generate images from English text prompts. Adjust size, inference steps, and guidance scale to control output quality.

Instructions

Generate an image from text prompt using WaveSpeed AI.

Args:
    prompt (str): Required. Text description of the image to generate. MUST BE IN ENGLISH. Non-English prompts will be rejected or result in poor quality outputs.
    model (str, optional): Model to use for image generation.
    loras (list, optional): List of LoRA models to use, each with a path and scale. Format: [{"path": "model_path", "scale": weight_value}]. Default model used if not provided.
    size (str, optional): Size of the output image in format "width*height", e.g., "512*512". Default: 1024*1024.
    num_inference_steps (int, optional): Number of denoising steps. Higher values improve quality but increase generation time. Default: 30.
    guidance_scale (float, optional): Guidance scale for text adherence. Controls how closely the image matches the text description. Default: 7.5.
    num_images (int, optional): Number of images to generate. Default: 1.
    seed (int, optional): Random seed for reproducible results. Set to -1 for random. Default: -1.
    enable_safety_checker (bool, optional): Whether to enable safety filtering. Default: True.
    output_directory (str, optional): Directory to save the generated images. Uses a temporary directory if not provided.
    request_id (str, optional): Request correlation ID for tracing the entire request chain. Strongly recommended to provide a unique ID (e.g., UUID) to correlate logs across the request lifecycle.

Returns:
    WaveSpeedResult object with the result of the image generation, containing:
    - status: "success" or "error"
    - urls: List of image URLs if successful
    - base64: List of base64 encoded images if resource_mode is set to base64
    - local_files: List of local file paths if resource_mode is set to local
    - error: Error message if status is "error"
    - processing_time: Time taken to generate the image(s)
    
Examples:
    Basic usage: text_to_image(prompt="A golden retriever running on grass")
    Advanced usage: text_to_image(
        prompt="A golden retriever running on grass", 
        size="1024*1024", 
        num_inference_steps=50,
        seed=42
    )
    
Note: 
    For optimal results, always provide prompts in English, regardless of your interface language.
    Non-English prompts may result in lower quality or unexpected images.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
modelNo
lorasNo
sizeNo1024*1024
num_inference_stepsNo
guidance_scaleNo
num_imagesNo
seedNo
enable_safety_checkerNo
output_directoryNo
request_idNo
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses behavior: it generates images, includes a safety checker, specifies default values for steps and size, and outlines the return object (status, URLs, base64, local files, processing time). No contradictions or hidden behaviors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with Args, Returns, Examples, and Note sections. It is front-loaded with the purpose. Some detail is lengthy but necessary given the 0% schema coverage. Minor redundancy exists (e.g., English requirement repeated), but overall it earns its space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description fully specifies the return structure and includes examples. It covers all 11 parameters with defaults and constraints. The tool's complexity is high, but the description is complete and self-contained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema coverage is 0%, so the description must explain each parameter. It does so thoroughly: prompt is required and must be English, loras has a specific format, size is 'width*height', num_inference_steps affects quality/time, guidance_scale controls text adherence, etc. This adds significant meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear verb-resource pair: 'Generate an image from text prompt using WaveSpeed AI.' It explicitly states the action and resource, and the resource type (text-to-image) distinguishes it from sibling tools like generate_video and image_to_image.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage guidelines, such as requiring prompts in English and noting that non-English prompts will be rejected or produce poor quality. It also includes default values and parameter descriptions. However, it does not explicitly state when to use this tool over siblings, though the purpose implies it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/honeyvig/mcp-server'

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