v9

latestOpenAPI 3.1.0raw.githubusercontent.com2025-10-30102943.3 KB
generate

Text To Image

Generate images from text prompts.

post/api/generate/text-to-image

Request body

model_idstring

Hugging Face model ID used for image generation.

lorasstring

A LoRA (Low-Rank Adaptation) model and its corresponding weight for image generation. Example: { "latent-consistency/lcm-lora-sdxl": 1.0, "nerijs/pixel-art-xl": 1.2}.

promptstring required

Text prompt(s) to guide image generation. Separate multiple prompts with '|' if supported by the model.

heightinteger

The height in pixels of the generated image.

widthinteger

The width in pixels of the generated image.

guidance_scalenumber

Encourages model to generate images closely linked to the text prompt (higher values may reduce image quality).

negative_promptstring

Text prompt(s) to guide what to exclude from image generation. Ignored if guidance_scale < 1.

safety_checkboolean

Perform a safety check to estimate if generated images could be offensive or harmful.

seedinteger

Seed for random number generation.

num_inference_stepsinteger

Number of denoising steps. More steps usually lead to higher quality images but slower inference. Modulated by strength.

num_images_per_promptinteger

Number of images to generate per prompt.

Response

Successful Response

All 10 operations