Skip to main content
Glama

submit_generate

Submit image generation requests asynchronously and get a job ID for polling status. Avoid waiting for the Stable Diffusion API to finish before continuing other work.

Instructions

Submit an image generation job without waiting. Returns the job ID for manual polling.

Args:
    pipeline: Pipeline to use — "sd15", "sdxl", or "illustrious"
    positive_prompt: Text prompt describing the desired image
    model_checkpoint: Model checkpoint filename to use
    negative_prompt: Negative prompt (things to avoid)
    width: Image width in pixels (256-2048)
    height: Image height in pixels (256-2048)
    steps: Number of inference steps (1-150)
    cfg_scale: Classifier-free guidance scale (1-30)
    seed: Random seed (-1 for random)
    scheduler: Noise scheduler name
    loras: Optional list of LoRA configs, each with "name" (str) and optional "strength" (float 0-1)
    custom_vae: Optional custom VAE checkpoint filename

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
lorasNo
stepsNo
widthNo
heightNo
pipelineYes
cfg_scaleNo
schedulerNoDPM++ 2M
custom_vaeNo
negative_promptNo
positive_promptYes
model_checkpointYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the async behavior (returns job ID, doesn't wait) and implies the tool is non-blocking. However, it doesn't disclose what happens on failure (does it throw an error or return a job ID that later fails?), rate limits, or whether the job is queued or immediately started. The description adds some value but lacks depth on error handling and lifecycle.

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 a clear one-sentence purpose statement followed by a parameter list. It's front-loaded with the key behavioral fact (async, returns job ID). The parameter list is concise and each line is informative. Minor waste: the parameter list repeats parameter names that are already in the schema, but since schema coverage is 0%, this is justified. No fluff.

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

Completeness4/5

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

The tool has 12 parameters, 3 required, and an output schema exists. The description covers all parameters with semantics and ranges. It explains the async behavior and return value (job ID). However, it doesn't mention how to poll (which sibling tool to use — get_job_status is a sibling), nor does it explain the output schema structure beyond 'job ID'. Given the complexity (12 params) and no annotations, this is fairly complete but could mention the polling mechanism.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It does: it explains each parameter's purpose (e.g., 'positive_prompt: Text prompt describing the desired image', 'cfg_scale: Classifier-free guidance scale', 'loras: Optional list of LoRA configs, each with name and optional strength'). It adds semantic meaning beyond the raw schema, including value ranges for width/height/steps/cfg_scale and the meaning of seed=-1. This is strong compensation for the 0% schema coverage.

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 clearly states the tool's purpose: 'Submit an image generation job without waiting. Returns the job ID for manual polling.' This is a specific verb (submit) + resource (image generation job) with a clear behavioral distinction from synchronous generation. It distinguishes itself from siblings like generate_image (which likely waits) and submit_inpaint (which is for inpainting).

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 explicitly states 'without waiting' and 'for manual polling', which tells the agent when to use this tool (async submission) versus alternatives. However, it doesn't explicitly name sibling tools like generate_image as the synchronous alternative, nor does it mention when NOT to use this tool (e.g., when you need the result immediately). The context is clear but exclusions are implicit.

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/mcaimi/sd-api-mcp'

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