Stable Diffusion XL 1.0 - Image Generator
Generate high-quality images from text prompts using Stable Diffusion XL 1.0. This model offers excellent image quality with a wide range of customization options including multiple aspect ratios, sampling methods, and style presets.
Endpoint
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Feature type identifier. Must be IMAGE_GENERATOR |
model | string | Yes | AI model identifier. Must be stable-diffusion-xl-1024-v1-0 |
promptObject | object | Yes | Configuration object containing all generation parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
prompt | string | Yes | Text description of the image to generate | - |
samples | number | Yes | Number of images to generate (1-10) | 1 |
size | string | Yes | Image dimensions | 1024x1024 |
cfg_scale | number | Yes | CFG (Classifier Free Guidance) scale (0-35) | 7 |
steps | number | Yes | Number of inference steps (10-50) | 30 |
seed | number | Yes | Random seed for reproducibility (0-4294967295) | 0 |
clip_guidance_preset | string | No | CLIP guidance preset for enhanced quality | NONE |
sampler | string | No | Sampling algorithm | Auto |
style_preset | string | No | Artistic style preset | Auto |
Supported Image Sizes
| Size | Aspect Ratio | Best For |
|---|---|---|
1024x1024 | 1:1 | Square images, social media |
1152x896 | 9:7 | Slightly wide landscape |
1216x832 | 3:2 | Standard landscape |
1344x768 | 7:4 | Wide landscape, banners |
1536x640 | 12:5 | Ultra-wide panoramic |
640x1536 | 5:12 | Ultra-tall portrait |
768x1344 | 4:7 | Tall portrait |
832x1216 | 2:3 | Standard portrait |
896x1152 | 7:9 | Slightly tall portrait |
CLIP Guidance Presets
| Preset | Description |
|---|---|
NONE | No CLIP guidance (fastest) |
FAST_BLUE | Fast CLIP guidance with blue bias |
FAST_GREEN | Fast CLIP guidance with green bias |
SIMPLE | Basic CLIP guidance |
SLOW | Higher quality CLIP guidance |
SLOWER | Even higher quality CLIP guidance |
SLOWEST | Highest quality CLIP guidance |
Sampling Methods
| Sampler | Description |
|---|---|
DDIM | Denoising Diffusion Implicit Models |
DDPM | Denoising Diffusion Probabilistic Models |
K_DPMPP_2M | DPM++ 2M Karras |
K_DPMPP_2S_ANCESTRAL | DPM++ 2S Ancestral |
K_DPM_2 | DPM 2 |
K_DPM_2_ANCESTRAL | DPM 2 Ancestral |
K_EULER | Euler |
K_EULER_ANCESTRAL | Euler Ancestral |
K_HEUN | Heun |
K_LMS | Linear Multi-Step |
Style Presets
| Style | Description |
|---|---|
3d-model | 3D rendered appearance |
analog-film | Film photography aesthetic |
anime | Anime/manga style |
cinematic | Movie-like quality |
comic-book | Comic book illustration |
digital-art | Digital artwork style |
enhance | Enhanced realism |
fantasy-art | Fantasy illustration |
isometric | Isometric perspective |
line-art | Line art style |
low-poly | Low polygon 3D style |
modeling-compound | Clay modeling aesthetic |
neon-punk | Cyberpunk neon style |
origami | Paper folding art |
photographic | Realistic photography |
pixel-art | Retro pixel art |
tile-texture | Seamless texture |
Code Examples
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_GENERATOR",
"model": "stable-diffusion-xl-1024-v1-0",
"promptObject": {
"prompt": "A majestic mountain landscape at sunset with vibrant colors",
"samples": 2,
"size": "1344x768",
"cfg_scale": 8,
"steps": 30,
"seed": 42,
"clip_guidance_preset": "SIMPLE",
"sampler": "K_DPMPP_2M",
"style_preset": "photographic"
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'IMAGE_GENERATOR',
model: 'stable-diffusion-xl-1024-v1-0',
promptObject: {
prompt: 'A majestic mountain landscape at sunset with vibrant colors',
samples: 2,
size: '1344x768',
cfg_scale: 8,
steps: 30,
seed: 42,
clip_guidance_preset: 'SIMPLE',
sampler: 'K_DPMPP_2M',
style_preset: 'photographic'
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "IMAGE_GENERATOR",
"model": "stable-diffusion-xl-1024-v1-0",
"promptObject": {
"prompt": "A majestic mountain landscape at sunset with vibrant colors",
"samples": 2,
"size": "1344x768",
"cfg_scale": 8,
"steps": 30,
"seed": 42,
"clip_guidance_preset": "SIMPLE",
"sampler": "K_DPMPP_2M",
"style_preset": "photographic"
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresDescribe the image you want to generate
Number of images to generate
Choose image dimensions
Controls how closely the image follows the prompt (0-35)
Number of inference steps (10-50)
Random seed for reproducibility (0-4294967295)
CLIP guidance for enhanced quality
Sampling algorithm
Artistic style preset
Generated cURL Command:
curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_GENERATOR",
"model": "stable-diffusion-xl-1024-v1-0",
"promptObject": {
"prompt": "A majestic mountain landscape at sunset with vibrant colors",
"samples": 1,
"size": "1024x1024",
"cfg_scale": 7,
"steps": 30,
"seed": 0,
"clip_guidance_preset": "NONE",
"sampler": "K_DPMPP_2M",
"style_preset": "photographic"
}
}'
Response Format
{
"aiRecord": {
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"userId": "user-12345",
"teamId": "team-67890",
"teamUser": {
"teamId": "team-67890",
"userId": "user-12345",
"userName": "John Doe",
"userAvatar": "https://example.com/avatar.jpg",
"status": "ACTIVE",
"role": "ADMIN",
"creditLimit": 100000000,
"usedCredit": 15000,
"createdAt": "2025-01-01T00:00:00.000Z",
"createdBy": "SYSTEM",
"updatedAt": "2025-01-15T10:30:00.000Z",
"updatedBy": "SYSTEM"
},
"model": "stable-diffusion-xl-1024-v1-0",
"type": "IMAGE_GENERATOR",
"metadata": null,
"rating": null,
"feedback": null,
"conversationId": null,
"status": "SUCCESS",
"createdAt": "2025-01-15T10:30:00.000Z",
"aiRecordDetail": {
"promptObject": {
"prompt": "A majestic mountain landscape at sunset with vibrant colors",
"samples": 2,
"size": "1344x768",
"cfg_scale": 8,
"steps": 30,
"seed": 42,
"clip_guidance_preset": "SIMPLE",
"sampler": "K_DPMPP_2M",
"style_preset": "photographic"
},
"resultObject": [
"development/images/2025_01_15_10_30_15_001_mountain_sunset.png",
"development/images/2025_01_15_10_30_15_002_mountain_sunset.png"
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2025_01_15_10_30_15_001_mountain_sunset.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=EXAMPLE_CREDENTIAL&X-Amz-Date=20250115T103000Z&X-Amz-Expires=604800&X-Amz-Signature=example_signature&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"
}
}
Use Cases
- Art Creation: Generate digital artwork, illustrations, and concept art
- Content Marketing: Create visual content for social media and marketing campaigns
- Product Design: Generate product concepts and design iterations
- Storytelling: Create visual narratives and storyboards
Tips for Best Results
-
Prompt Quality: Be descriptive and specific in your prompts
- Good: "A serene Japanese garden with cherry blossoms, stone lanterns, and a small pond reflecting the moonlight"
- Avoid: "A garden"
-
CFG Scale:
- Lower values (3-7): More creative, less adherence to prompt
- Higher values (7-15): Stronger adherence to prompt
- Very high values (15+): May cause artifacts
-
Steps:
- 20-30 steps: Good balance of quality and speed
- 30-50 steps: Higher quality, longer generation time
-
Aspect Ratios: Choose based on your use case:
- 1024x1024: Perfect for social media posts
- 1344x768: Great for banners and headers
- 832x1216: Ideal for portrait compositions
-
Style Presets: Experiment with different styles:
- photographic: For realistic images
- digital-art: For artistic illustrations
- cinematic: For movie-like quality
Notes
- Generation time varies based on complexity and parameters
- Higher step counts and advanced CLIP guidance increase generation time
- Seed values ensure reproducible results when other parameters remain constant