Image Generation Guide

Learn how to use our powerful image generation tools to create, modify, and upscale images.

View API Reference

Powered by SDNext and vLLM-Omni

Arli AI Image Generation runs on SDNext and vLLM-Omni. SDNext models expose a broad subset of the Stable Diffusion API (samplers, schedulers, detailer, IP-Adapter, ControlNet, and upscaling). vLLM-Omni models expose a fixed sampler/scheduler pipeline with OpenAI Images parameters such as size, steps, guidance, flow shift, and model-specific extra parameters.

https://github.com/vladmandic/sdnexthttps://github.com/vllm-project/vllm-omni

Authentication & Usage

All Image Generation API endpoints require authentication using a Bearer token or Basic Authentication via the Authorization header. Replace {ARLIAI_API_KEY} in the examples with your actual API key. For Basic Auth, use your API key as the password, Base64 encoded (e.g., Authorization: Basic Base64Encode(ARLIAI_API_KEY)).

API requests are routed to appropriate backend servers based on model requirements and availability. Ensure your account has access to the specific image generation models or upscaler models you intend to use via GET /v1/img-models, GET /sdapi/v1/sd-models, or GET /v1/upscalers.

Image generation and upscaling requests are subject to rate limits and concurrency limits based on your account plan. Exceeding limits may result in temporary account restrictions. Check your account dashboard for details on your limits.

API Key parameter overrides (set in your account settings) will merge with and take precedence over parameters sent in the request body for compatible parameters.

Successful SDNext-style POST requests (txt2img, img2img, control, extra-single-image) return a JSON object containing base64 encoded image(s) in the images field (or image for upscale) and an info field with generation parameters. OpenAI-style requests return images in data[].b64_json. Successful GET requests return JSON data as described in their respective sections.

vLLM-Omni Models and the OpenAI Images API

Some image models on Arli AI run on vLLM-Omni instead of SD.Next. The SDNext-compatible /v1/txt2img, /v1/img2img, /sdapi/v1/txt2img, and /sdapi/v1/img2img endpoints still work for both engines, and vLLM-Omni models also expose the OpenAI Images API.

  • SDNext-compatible text-to-image and img2img requests are translated automatically: width/height become size, steps becomes num_inference_steps, cfg_scale becomes guidance_scale, batch_size becomes n, and denoising_strength becomes strength. flow_shift and extra_params are forwarded for vLLM-Omni text-to-image.
  • vLLM-Omni models use a fixed sampler and scheduler. sampler_name, most scheduler fields, detailer, IP-Adapter, and ControlNet fields are not applied; schedulers_shift is used as a fallback for flow_shift on text-to-image. ControlNet generation and preprocessing are SD.Next-only.
  • Per-model limits are enforced by the API: maxSteps (default 40), maxBatchSize, maxCfgScale (default 30), and sizeMultiple. MOSS-Image requires dimensions in multiples of 16; MiniMax-H3-Image uses a 32-pixel grid. Read the exact values from GET /v1/img-models.
  • SDNext-style img2img requires supportsImg2Img, and sending a mask requires supportsInpaint. OpenAI edits require supportsImg2Img. MOSS-Image-SFT is text-to-image only.
  • OpenAI image edits use multipart form data and are supported by edit-capable vLLM-Omni models such as MiniMax-H3-Image. flow_shift and extra_params are text-to-image only and are not applied to edits.

OpenAI Images Endpoints

  • POST /v1/images/generations requires model and a healthy vLLM-Omni server. It accepts prompt, negative_prompt, size (or width/height), n, seed, num_inference_steps, guidance_scale, true_cfg_scale, flow_shift, extra_params, output_format, output_compression, generator_device, layers, resolution, strength, sigmas, num_frames, bot_task, system_prompt, use_system_prompt, and return_stage_metrics. response_format is accepted but images are always returned in data[].b64_json. n must be 1-10 and cannot exceed the model maxBatchSize.
  • POST /v1/images/edits requires model and supportsImg2Img. Send multipart image/image[] plus optional mask_image or reference_image, or JSON base64 image, images, init_images, mask, or mask_image. Edits accept prompt, negative_prompt, size (defaults to the input image or auto), n, num_inference_steps, guidance_scale, true_cfg_scale, strength, seed, generator_device, layers, resolution, output_format, output_compression, bot_task, system_prompt, and return_stage_metrics. flow_shift and extra_params are not applied to edits.
  • GET /v1/images/models lists only models with a healthy vLLM-Omni server in OpenAI model-list format. GET /v1/img-models returns the full catalog with engine, per-model limits, capability flags, and curated defaults. vLLM-Omni models can also be used through /sdapi/v1/txt2img, /v1/txt2img, /sdapi/v1/img2img, and /v1/img2img when their capability flags allow it.

Text-to-Image Generation

The Text-to-Image page allows you to create images from a text description (a "prompt"). You describe what you want to see, and the AI will generate it for you.

How to Use

  1. Select a Model Checkpoint that fits your desired style.
  2. Write a detailed Prompt describing the image you want to create.
  3. (Optional) Use the Negative Prompt to list things you want to avoid.
  4. Choose a Sampler and set the number of Steps (20-30 is a good start). vLLM-Omni models use a fixed sampler, so only the step count applies.
  5. Adjust the CFG Scale to control how closely the AI follows your prompt (6 is a good default).
  6. Set your desired Resolution and Batch Size.
  7. Click "Generate Image".

Core Features

  • Prompt & Negative Prompt: Describe your desired image in the prompt. Use the negative prompt to specify what to avoid (e.g., "low quality, blurry").
  • Model Checkpoint: This is the most important setting. Each model has a unique artistic style. Some models are better for realism, others for anime or fantasy. Experiment to find your favorite.
  • Loading Defaults: Each model may have recommended prompts and sampler settings. Use the "Load Defaults" buttons next to the Prompt and Sampler sections to apply these optimized settings. This is a great way to get started with a new model.
  • Sampler & Steps: The sampler determines how the AI generates the image from noise. Different samplers produce different results. More steps can add detail but take longer to generate. A good starting point is 20-30 steps. vLLM-Omni models use a fixed sampler and scheduler; only Steps, CFG/guidance, size, batch size, seed, flow shift, and model-specific extra parameters apply.
  • CFG Scale: "Classifier-Free Guidance" controls how strictly the AI follows your prompt. Lower values (e.g., 4-6) give the AI more creative freedom. Higher values (e.g., 7-10) make it adhere more closely to your description.
  • Resolution: Set the width and height of your image. Use the presets for common aspect ratios or set custom dimensions with the sliders.
  • Batch Size: Generate multiple images at once. This is useful for exploring variations of a prompt.
  • Seed: A number that determines the initial noise pattern. Using the same seed with the same settings will produce a nearly identical image. Use -1 for a random seed, which is the default.

Advanced Features

  • Detailer Pass: This is an optional second pass that runs after the main image is generated. It's designed to fix and improve small details, especially faces and hands, which can sometimes be distorted. You can select specific models (like `face-yolo8n` for faces) and even provide a separate, more detailed prompt for this pass. The "Detailer Strength" controls how much the detailer alters the original generation. Detailer passes are SD.Next-only and are hidden for vLLM-Omni models.
  • Upscaling: Enable this to automatically upscale your generated image to a higher resolution as part of the same process. Select an upscaler model and a resize factor. This is a convenient way to get a high-quality final image in one step. Upscaling is provided by SD.Next and is hidden for vLLM-Omni models.
  • History: The right-hand panel keeps a detailed history of your generations. Clicking on any item will load its exact settings, including the prompt, model, seed, and all other parameters, allowing you to perfectly recreate or iterate on a previous image.
Text-to-Image Settings 1Text-to-Image Settings 2Text-to-Image Settings 3

Image-to-Image

This tool transforms an existing image based on your text prompt. Img2img is available only for models whose supportsImg2Img capability is not false; inpainting also requires supportsInpaint. MOSS-Image-SFT is text-to-image only.

How to Use (Img2Img)

  1. Upload your starting Input Image.
  2. Write a Prompt describing how you want to transform the image.
  3. Set the Denoising Strength. This is key: low values make subtle changes, high values create a new image based on your prompt.
  4. Adjust other settings like Sampler, Steps, and CFG scale as needed.
  5. Click "Generate Image".

How to Use (Inpaint)

  1. Upload your starting Input Image.
  2. Select the Inpaint tab.
  3. Use the brush to draw a mask over the area you want to change.
  4. Write a Prompt describing what you want to see in the masked area.
  5. Adjust Denoising Strength and other settings.
  6. Click "Generate Image".

Modes

  • Img2Img: The standard mode where the entire input image is transformed based on your prompt and settings.
  • Inpaint: This mode allows you to "mask" a specific area of the image. Only the masked (painted) area will be regenerated by the AI, which is perfect for targeted edits like changing an object, adding an element, or fixing a mistake.

Key Settings

  • Input Image: Upload the image you want to transform.
  • Denoising Strength: This is the most important setting for Img2Img. It controls how much the original image is changed. A low value (e.g., 0.2-0.4) will make minor changes that respect the original composition. A high value (e.g., 0.7-0.9) will create a very different image that is more heavily influenced by your prompt.

Inpainting Features

  • Brush/Eraser: Use the brush to draw a mask over the area you want to change. You can switch to an eraser to refine the mask edges.
  • Mask Blur: Blurs the edges of your mask. This helps create a smoother, more seamless transition between the original and the newly generated parts of the image.
  • Inpaint Full Res: When checked, inpainting is performed on the full, original resolution of the image, which provides the highest quality result. When unchecked, the image is downscaled for the inpainting process, which is faster but may have slightly less detail. When this is unchecked, the main resolution sliders are disabled and automatically match the input image dimensions.
Image-to-Image Settings 1Image-to-Image Settings 2Image-to-Image Settings 3

Image Upscaling

Increase the resolution of your images while adding detail. Upscaling is served by SD.Next upscaler models; vLLM-Omni models do not provide an upscaling path.

How to Use

  1. Upload the image you want to upscale.
  2. Select an Upscaler model.
  3. Choose the Upscale Factor (e.g., 2x, 4x).
  4. Click "Upscale Image".
Image Upscaling