# Stable Diffusion XL > Stability AI's classic SDXL (85M+ runs) — the battle-tested text-to-image model with img2img, inpainting, refiner, and LoRA support. - **Provider**: replicate - **Model ID**: stability-ai/sdxl - **Category**: image_generation - **Credits**: 9 per request - **Pricing Type**: input_based ## API Endpoint Base URL: https://api.core.today/v1 ### Create Prediction POST /predictions ### Get Status GET /predictions/{job_id} ### Cancel DELETE /predictions/{job_id} ## Authentication Header: `X-API-Key: YOUR_API_KEY` ## Input Parameters - `refine_steps` (integer, optional): For base_image_refiner, the number of steps to refine, defaults to num_inference_steps - `guidance_scale` (number, optional): Scale for classifier-free guidance (Default: `7.5`; Range: min: 1, max: 50) - `seed` (integer, optional): Random seed. Leave blank to randomize the seed - `width` (integer, optional): Width of output image (Default: `1024`) - `apply_watermark` (boolean, optional): Applies a watermark to enable determining if an image is generated in downstream applications. If you have other provisions for generating or deploying images safely, you can use this to disable watermarking. (Default: `True`) - `high_noise_frac` (number, optional): For expert_ensemble_refiner, the fraction of noise to use (Default: `0.8`; Range: min: 0, max: 1) - `height` (integer, optional): Height of output image (Default: `1024`) - `scheduler` (string, optional): scheduler (Default: `K_EULER`; Options: `DDIM`, `DPMSolverMultistep`, `HeunDiscrete`, `KarrasDPM`, `K_EULER_ANCESTRAL`, `K_EULER`, `PNDM`) - `lora_scale` (number, optional): LoRA additive scale. Only applicable on trained models. (Default: `0.6`; Range: min: 0, max: 1) - `num_outputs` (integer, optional): Number of images to output. (Default: `1`; Range: min: 1, max: 4) - `num_inference_steps` (integer, optional): Number of denoising steps (Default: `50`; Range: min: 1, max: 500) - `mask` (string, optional): Input mask for inpaint mode. Black areas will be preserved, white areas will be inpainted. - `replicate_weights` (string, optional): Replicate LoRA weights to use. Leave blank to use the default weights. - `prompt` (string, optional): Input prompt (Default: `An astronaut riding a rainbow unicorn`) - `disable_safety_checker` (boolean, optional): Disable safety checker for generated images. This feature is only available through the API. See [https://replicate.com/docs/how-does-replicate-work#safety](https://replicate.com/docs/how-does-replicate-work#safety) (Default: `False`) - `prompt_strength` (number, optional): Prompt strength when using img2img / inpaint. 1.0 corresponds to full destruction of information in image (Default: `0.8`; Range: min: 0, max: 1) - `negative_prompt` (string, optional): Input Negative Prompt (Default: ``) - `image` (string, optional): Input image for img2img or inpaint mode - `refine` (string, optional): Which refine style to use (Default: `no_refiner`; Options: `no_refiner`, `expert_ensemble_refiner`, `base_image_refiner`) ## Example Request ```json { "model": "stability-ai/sdxl", "input": { "num_outputs": 1, "apply_watermark": false, "prompt_strength": 0.8, "refine": "expert_ensemble_refiner", "scheduler": "K_EULER", "high_noise_frac": 0.8, "lora_scale": 0.6, "negative_prompt": "", "guidance_scale": 7.5, "width": 768, "prompt": "An astronaut riding a rainbow unicorn, cinematic, dramatic", "height": 768, "num_inference_steps": 25 } } ``` ## Response Format ```json { "job_id": "abc123", "status": "pending", "provider": "replicate", "model": "black-forest-labs/flux-schnell", "created_at": "2026-01-01T00:00:00Z", "result": null, "error": null } ``` Status values: `pending`, `processing`, `completed`, `failed`, `cancelled` ## Usage Flow 1. POST /predictions with model and input → receive job_id 2. Poll GET /predictions/{job_id} until status is `completed` or `failed` 3. Result contains output URL(s) or data ## Output Type url ## Tags text-to-image, sdxl, stable-diffusion, img2img, inpainting, lora ## Documentation https://replicate.com/stability-ai/sdxl