Page cover

Stable Diffusion XL 1.0

Base-Path:

https://api.hyprlab.io/v1

Image Path:

https://api.hyprlab.io/v1/images/generations

Making Request:

curl https://api.hyprlab.io/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $HYPRLAB_API_KEY" \
  -d '{
    "model": "sdxl-1.0",
    "prompt": "A cute cat",
    "cfg_scale": 5,
    "sampler": "K_DPM_2_ANCESTRAL",
    "steps": 20,
    "style_preset": "pixel-art",
    "height": 1024,
    "width": 1024,
    "response_format": "url",
    "output_format": "webp"
  }'
📌 Request Body Documentation

prompt (string, required)

  • Description: A non-empty string that acts as the prompt text for processing.

  • Validation:

    • Must be a defined string.

    • Must not be an empty or whitespace-only string.

height and width (integer, optional)

  • Description: Dimensions of the output, defined in pixels. Both height and width are optional but default to 1024 if not provided.

  • Validation:

    • Allowed dimensions (in pixels):

      • 1024x1024

      • 1152x896

      • 1216x832

      • 1344x768

      • 1536x640

      • 640x1536

      • 768x1344

      • 832x1216

      • 896x1152

    • When passed, both height and width must match an allowed dimension pair either directly or in reverse.

cfg_scale (number, optional)

  • Description: A scalar value that adjusts how strictly the model follows the prompt.

  • Validation:

    • Must be a number between 0 and 35.

sampler (string, optional)

  • Description: The algorithm used to sample images.

  • Validation:

    • Must be one of the following:

      • DDIM

      • DDPM

      • K_DPMPP_2M

      • K_DPMPP_2S_ANCESTRAL

      • K_DPM_2

      • K_DPM_2_ANCESTRAL

      • K_EULER

      • K_EULER_ANCESTRAL

      • K_HEUN

      • K_LMS

seed (integer, optional)

  • Description: A seed for generating deterministic outputs.

  • Validation:

    • Must be an integer between 0 and 4294967295.

steps (integer, optional)

  • Description: The number of processing steps for generating output.

  • Validation:

    • Must be an integer between 1 and 50.

style_preset (string, optional)

  • Description: A preset style to be applied to the generated image.

  • Validation:

    • Must be one of the following allowed presets:

      • 3d-model

      • analog-film

      • anime

      • cinematic

      • comic-book

      • digital-art

      • enhance

      • fantasy-art

      • isometric

      • line-art

      • low-poly

      • modeling-compound

      • neon-punk

      • origami

      • photographic

      • pixel-art

      • tile-texture

response_format (string, optional)

  • Description: Specifies the format of the response.

  • Validation:

    • Must be "url" or "b64_json".

output_format (string, optional)

  • Description: The format for the output image.

  • Validation:

    • Must be one of: "png", "jpeg", "webp".


🏞️ Stable Diffusion XL 1.0

Model Name:
  • sdxl-1.0

Discount:
  • 70% off

Price:
  • $0.015 / Image

Last updated