Image Generation Guide

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

View API Reference

Powered by SDNext

Arli AI Image Generation is powered by SDNext, the most advanced and feature-complete open-source image generation inference engine and interface. As such most of our available features will be similar to those available in SDNext.

https://github.com/vladmandic/sdnext

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 granted to the specific Image Generation models or Upscaler models you intend to use via the relevant endpoints (`/sd-models`, `/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 POST requests (txt2img, img2img, extra-single-image) typically return a JSON object containing a list of base64 encoded image(s) in the images field (or image for upscale) and an info field with generation parameters. Successful GET requests return JSON data as described in their respective sections.

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).
  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.
  • 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.
  • 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.
  • 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.

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.

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