---
title:   SDXL 2 API | Text to Image | ModelsLab
description: Generate images from text with   SDXL 2. High-resolution AI image generation. Pay-per-use. Free tier.
url: https://modelslab.com/models/community-model/sdxl2/api.md
canonical: https://modelslab.com/models/community-model/sdxl2/api.md
type: product
component: Playground/Endpoint/Index
generated_at: 2026-04-17T11:41:19.994474Z
---

[![- SDXL 2 thumbnail](https://assets.modelslab.ai/livewire-tmp/owDfnXBcCbwP7jdW3nAWP09ibiYAEz-metac3Zndmlld2VyLXBuZy1vdXRwdXQtMi5wbmc=-.png)](https://modelslab.com/models/modelslab) SDXL 2
---

[by ModelsLab](https://modelslab.com/models/modelslab)Generate photorealistic and imaginative images from text prompts with advanced detail, inpainting, and image-to-image translation features, ideal for creatives and marketers.

`sdxl2`

Open Source Model [Unlimited Usage](https://modelslab.com/pricing) [LLMs.txt](https://modelslab.com/models/modelslab/sdxl2/llms.txt)

[API Playground](/models/community-model/sdxl2) [API Documentation](/models/community-model/sdxl2/api)Vibe CodeRelated ModelsDeveloper SupportModel SpecsEnterprise Deployment

Input
---

prompt 

R3alisticF, hauntingly beautiful oriental necromancer, long flowing brown hair, bangs, darkly tanned skin, earrings, bone necklaces, dark eyeshadow, red lips, vibrant, front-laced transparent, filmy silk blouse, cleavage, holding skull, in a sandstone room lit by candles, High Detail, Perfect Composition, high contrast, silhouetted, chiascuro

Model 

lora Model 

Select models...

Width 

Height 

Advanced Settings Customize your input with more control.

Configure

Add FundsLogin to Generate

**Per image generation** will cost **0.0047$** 
**For premium plan image generation** will cost **0.00$** i.e **Free.**

Output
---

Idle

Unknown content type

Related Models
---

Discover similar models you might be interested in

 [View all Models](https://modelslab.com/models)

[![TA86 Beautiful women around the World - SDXL_V1](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/93542a7c-f224-4455-bd2c-6bdd9796f0f5/original=true/110590911.jpeg)](https://modelslab.com/models/modelslab/ta86-beautiful-women-around-the-world-sdxl-v1)[ModelsLab](https://modelslab.com/models/modelslab)

 [TA86 Beautiful women around the World - SDXL\_V1

Open Source Model](https://modelslab.com/models/modelslab/ta86-beautiful-women-around-the-world-sdxl-v1)

[![Aston Martin One 77 - 2009 - v1.0 SDXL](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/3cda28ac-083d-4715-8838-5a3d7c2c4f0a/original=true/120578149.jpeg)](https://modelslab.com/models/modelslab/aston-martin-one-77-2009-v1-0-sdxl)[ModelsLab](https://modelslab.com/models/modelslab)

 [Aston Martin One 77 - 2009 - v1.0 SDXL

Open Source Model](https://modelslab.com/models/modelslab/aston-martin-one-77-2009-v1-0-sdxl)

[![- v1 (RC)](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/90c1924c-4d73-40dd-a83a-63ba0bfbab47/width=1736/26630536.jpeg)](https://modelslab.com/models/modelslab/v1rc)[ModelsLab](https://modelslab.com/models/modelslab)

 [\- v1 (RC)

Open Source Model](https://modelslab.com/models/modelslab/v1rc)

[![VistaX Landscapes XL - V1.0 SDXL 1.0](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/797da925-e8d1-4632-afbb-ff2db8559730/width=1680/25083113.jpeg)](https://modelslab.com/models/modelslab/vistax-landscapes-xl-v1-0-sdxl-1-0)[ModelsLab](https://modelslab.com/models/modelslab)

 [VistaX Landscapes XL - V1.0 SDXL 1.0

Open Source Model](https://modelslab.com/models/modelslab/vistax-landscapes-xl-v1-0-sdxl-1-0)

[![- SDXL_Niji_V2](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/86b52d23-6bff-4cfd-aa8a-1645dcbdf125/width=1432/1954035.jpeg)](https://modelslab.com/models/modelslab/sdxlnijiv2)[ModelsLab](https://modelslab.com/models/modelslab)

 [\- SDXL\_Niji\_V2

Open Source Model](https://modelslab.com/models/modelslab/sdxlnijiv2)

[![NBN-Hel (NordicByNature) - SDXL_V0.8](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/995aae1f-f198-45b5-996e-9ad085e4d029/width=1792/78200923.jpeg)](https://modelslab.com/models/modelslab/nbn-hel-nordicbynature-sdxl-v0-8)[ModelsLab](https://modelslab.com/models/modelslab)

 [NBN-Hel (NordicByNature) - SDXL\_V0.8

Open Source Model](https://modelslab.com/models/modelslab/nbn-hel-nordicbynature-sdxl-v0-8)

[![NC - NCV1](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/9d6f8c29-33ae-42f4-946e-d1bf21f68b63/original=true/108058596.jpeg)](https://modelslab.com/models/modelslab/nc-ncv1)[ModelsLab](https://modelslab.com/models/modelslab)

 [NC - NCV1

Open Source Model](https://modelslab.com/models/modelslab/nc-ncv1)

[![Rookie Survivor (Azusawa Kohane) / Project SEKAI - AnimagineXL V3.1](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/90f9041a-2347-4c76-87d3-d1ea6809293a/width=96/NekonoMikeko.jpeg)](https://modelslab.com/models/modelslab/rookie-survivor-azusawa-kohane-project-sekai-animaginexl-v3-1)[ModelsLab](https://modelslab.com/models/modelslab)

 [Rookie Survivor (Azusawa Kohane) / Project SEKAI - AnimagineXL V3.1

Open Source Model](https://modelslab.com/models/modelslab/rookie-survivor-azusawa-kohane-project-sekai-animaginexl-v3-1)

[![Firefly 流萤 ホタル (SD1.5 & XL & Pony) - v4.0-SDXL](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/a3e38613-1852-43fa-b2f6-58a2c587f08a/width=1800/47836306.jpeg)Popular](https://modelslab.com/models/modelslab/fireflysd15xlpony-v40sdxl)[ModelsLab](https://modelslab.com/models/modelslab)

 [Firefly 流萤 ホタル (SD1.5 & XL & Pony) - v4.0-SDXL

Open Source Model](https://modelslab.com/models/modelslab/fireflysd15xlpony-v40sdxl)

[![Surrealism style XL + F1D + Illu + Pony - Surrealism XL v1.0](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/ed4081d9-70a8-4324-90bc-80c2862b3696/width=1024/9323475.jpeg)Popular](https://modelslab.com/models/modelslab/surrealism-style-xl-f1d-illu-pony-surrealism-xl-v1-0)[ModelsLab](https://modelslab.com/models/modelslab)

 [Surrealism style XL + F1D + Illu + Pony - Surrealism XL v1.0

Open Source Model](https://modelslab.com/models/modelslab/surrealism-style-xl-f1d-illu-pony-surrealism-xl-v1-0)

[![Nichika Nanakusa / - v1.2(animagine)](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/8b19807c-8d68-4dbc-8e67-66c4126d4a49/width=1344/21975383.jpeg)](https://modelslab.com/models/modelslab/nichika-nanakusa-v1-2-animagine)[ModelsLab](https://modelslab.com/models/modelslab)

 [Nichika Nanakusa / - v1.2(animagine)

Open Source Model](https://modelslab.com/models/modelslab/nichika-nanakusa-v1-2-animagine)

[![akai_haato_noobxl_eps_1.0 - v1.0](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/305e045b-d6b5-4bdc-a708-490491df3e80/width=768/56537619.jpeg)](https://modelslab.com/models/modelslab/akai-haato-noobxl-eps-1-0-v1-0)[ModelsLab](https://modelslab.com/models/modelslab)

 [akai\_haato\_noobxl\_eps\_1.0 - v1.0

Open Source Model](https://modelslab.com/models/modelslab/akai-haato-noobxl-eps-1-0-v1-0)

[![Fantasyland - v1.1 Fantasyland XL Turbo](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/f8aaf6f9-58ee-4f95-82d8-125514f30534/width=896/55280990.jpeg)](https://modelslab.com/models/modelslab/fantasyland-v1-1-fantasyland-xl-turbo)[ModelsLab](https://modelslab.com/models/modelslab)

 [Fantasyland - v1.1 Fantasyland XL Turbo

Open Source Model](https://modelslab.com/models/modelslab/fantasyland-v1-1-fantasyland-xl-turbo)

[![Sam (Captain N Fan Reboot) - XL](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/1b356eef-9364-4b6c-813b-e6b64e8846f2/original=true/5873846.jpeg)](https://modelslab.com/models/modelslab/sam-captain-n-fan-reboot-xl)[ModelsLab](https://modelslab.com/models/modelslab)

 [Sam (Captain N Fan Reboot) - XL

Open Source Model](https://modelslab.com/models/modelslab/sam-captain-n-fan-reboot-xl)

[![Unicron from Transformers G1 (Pony/SDXL/IL) - SDXL](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/d321914f-f2e0-4ba5-a07d-7034cf5db329/original=true/49587308.jpeg)](https://modelslab.com/models/modelslab/unicron-from-transformers-g1-pony-sdxl-il-sdxl)[ModelsLab](https://modelslab.com/models/modelslab)

 [Unicron from Transformers G1 (Pony/SDXL/IL) - SDXL

Open Source Model](https://modelslab.com/models/modelslab/unicron-from-transformers-g1-pony-sdxl-il-sdxl)

[![Event Horizon XL - v3.0](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/0253a3e9-9c0b-4514-8b3e-753755667297/original=true/108380409.jpeg)Popular](https://modelslab.com/models/modelslab/event-horizon-xl-v3-0)[ModelsLab](https://modelslab.com/models/modelslab)

 [Event Horizon XL - v3.0

Open Source Model](https://modelslab.com/models/modelslab/event-horizon-xl-v3-0)

[![ZavyChromaXL - v6.0](https://images.stablediffusionapi.com/?Image=https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/dc7d6447-0c3f-4a6a-8cb6-8ca63da99861/width=1800/8758014.jpeg)Popular](https://modelslab.com/models/modelslab/zavychromaxl-v6-0)[ModelsLab](https://modelslab.com/models/modelslab)

 [ZavyChromaXL - v6.0

Open Source Model](https://modelslab.com/models/modelslab/zavychromaxl-v6-0)

[![Unrealdreamxl](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/03c07fa4-0efa-40c5-9ce3-754b85d068e1-0.png)Popular](https://modelslab.com/models/modelslab/unrealdreamxl)[ModelsLab](https://modelslab.com/models/modelslab)

 [Unrealdreamxl

Open Source Model](https://modelslab.com/models/modelslab/unrealdreamxl)

About  SDXL 2
---

 SDXL 2 is a ai generation AI model available on ModelsLab. Access  SDXL 2 through our API with pay-per-use pricing and no minimum commitments.

### Technical Specifications

Model IDsdxl2ProviderModelslabTaskAI GenerationPrice$0.0047 per API callAddedJune 15, 2025

### Quick Start

Integrate  SDXL 2 into your application with a single API call. Get your API key from the [pricing page](https://modelslab.com/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v6/images/text2img"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "sdxl2",
        "prompt": "your prompt here",
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

View the [full API documentation](https://modelslab.com/models/modelslab/sdxl2/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

 SDXL 2 API costs $0.0047 per API call. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab.com/pricing)

[Browse All Models](https://modelslab.com/models) [More from Modelslab](https://modelslab.com/models/modelslab) [View Pricing](https://modelslab.com/pricing)

 SDXL 2 FAQ
---

### What is SDXL 2?

 SDXL 2 is a ai generation AI model available on ModelsLab. Access it through our API with pay-per-use pricing and no minimum commitments.

### How do I use the SDXL 2 API?

You can integrate SDXL 2 into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "sdxl2" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does SDXL 2 cost?

 SDXL 2 costs $0.0047 per API call. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the SDXL 2 model ID?

The model ID for SDXL 2 is "sdxl2". Use this ID in your API requests to specify this model.

### Does SDXL 2 have a free tier?

Yes, ModelsLab offers a free tier that lets you try SDXL 2 and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-04-17*