Skip to main content

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

FieldValue
API-KEY<api-key>
Content-Typeapplication/json

Parameters

ParameterTypeRequiredDescription
typestringYesFeature type identifier. Must be IMAGE_GENERATOR
modelstringYesAI model identifier. Must be stable-diffusion-xl-1024-v1-0
promptObjectobjectYesConfiguration object containing all generation parameters

Prompt Object Parameters

ParameterTypeRequiredDescriptionDefault
promptstringYesText description of the image to generate-
samplesnumberYesNumber of images to generate (1-10)1
sizestringYesImage dimensions1024x1024
cfg_scalenumberYesCFG (Classifier Free Guidance) scale (0-35)7
stepsnumberYesNumber of inference steps (10-50)30
seednumberYesRandom seed for reproducibility (0-4294967295)0
clip_guidance_presetstringNoCLIP guidance preset for enhanced qualityNONE
samplerstringNoSampling algorithmAuto
style_presetstringNoArtistic style presetAuto

Supported Image Sizes

SizeAspect RatioBest For
1024x10241:1Square images, social media
1152x8969:7Slightly wide landscape
1216x8323:2Standard landscape
1344x7687:4Wide landscape, banners
1536x64012:5Ultra-wide panoramic
640x15365:12Ultra-tall portrait
768x13444:7Tall portrait
832x12162:3Standard portrait
896x11527:9Slightly tall portrait

CLIP Guidance Presets

PresetDescription
NONENo CLIP guidance (fastest)
FAST_BLUEFast CLIP guidance with blue bias
FAST_GREENFast CLIP guidance with green bias
SIMPLEBasic CLIP guidance
SLOWHigher quality CLIP guidance
SLOWEREven higher quality CLIP guidance
SLOWESTHighest quality CLIP guidance

Sampling Methods

SamplerDescription
DDIMDenoising Diffusion Implicit Models
DDPMDenoising Diffusion Probabilistic Models
K_DPMPP_2MDPM++ 2M Karras
K_DPMPP_2S_ANCESTRALDPM++ 2S Ancestral
K_DPM_2DPM 2
K_DPM_2_ANCESTRALDPM 2 Ancestral
K_EULEREuler
K_EULER_ANCESTRALEuler Ancestral
K_HEUNHeun
K_LMSLinear Multi-Step

Style Presets

StyleDescription
3d-model3D rendered appearance
analog-filmFilm photography aesthetic
animeAnime/manga style
cinematicMovie-like quality
comic-bookComic book illustration
digital-artDigital artwork style
enhanceEnhanced realism
fantasy-artFantasy illustration
isometricIsometric perspective
line-artLine art style
low-polyLow polygon 3D style
modeling-compoundClay modeling aesthetic
neon-punkCyberpunk neon style
origamiPaper folding art
photographicRealistic photography
pixel-artRetro pixel art
tile-textureSeamless texture

Code Examples

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"
}
}'

Interactive Playground

API Playground

https://api.1min.ai/api/features
Describe 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

  1. 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"
  2. 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
  3. Steps:

    • 20-30 steps: Good balance of quality and speed
    • 30-50 steps: Higher quality, longer generation time
  4. 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
  5. 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