02-05-2024 SDXL API Optimization

We have successfully optimized our SDXL API,achieving a remarkable 45% increase in speed compared to our previous API and nearly 50% reduction in serving costs. These improvements significantly elevate the efficiency and affordability of our services, benefiting users with super-faster responses and lower expenses.

We've introduced two new parameters, optimize and enhance, both accepting Boolean values. When set to True, they enable the model to operate in a highly optimized manner, significantly enhancing processing speed.

Performance Improvements Overview

Our optimizations have been extensively tested across various scenarios and step counts. The outcomes demonstrate considerable performance improvements, with speed enhancements ranging from 24.15% to 44.96% across different samples and step counts.

Detailed Speed Improvements by Steps and Samples

# Samples% Faster (30 Steps)% Faster (40 Steps)% Faster (50 Steps)

2x High-Speed, 50% Lower-Cost, Quality Uncompromised

Old Unoptimized API (Cost - 8 Credits, 30 Steps)New Optimized API (Cost - 4 Credits, 30 Steps)
Old API 1New API 1
Old API 2New API 2
Old API 3New API 3

Round Trip Times: Before and After Optimization

# SamplesUnoptimized API (30 Steps)Optimized API (30 Steps)Unoptimized API (40 Steps)Optimized API (40 Steps)Unoptimized API (50 Steps)Optimized API (50 Steps)

Try the New Optimized SDXL API

Try out our newly optimized API to see the improvements firsthand. The integration is straightforward:

import requests

url = ""

payload = {
    "enhance": True,
    "optimize": True,
    "safe_filter": True,
    "prompt": "portrait of a model with raindrops in the foreground, wet look, slight smile, hyper-detailed skin texture illuminated by neon light, white dress, long hair, fickle face, perfect anatomy, wet-to-wet background technique by Misilbu. . hyper detailed 8k painting, 8k concept art portrait by Greg Rutkowski Artgerm WLOP Alphonse Beeple Caravaggio, muted colors, watercolor style, bokeh, f1.0 lens",
    "samples": 3,
    "steps": 40
headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "authorization": "Bearer YOUR_MONSTER_API_KEY"

response =, json=payload, headers=headers)


Additional Resources -

  1. SDXL Documentation