Image Generation APIs
Generate stunning images from text prompts using state-of-the-art diffusion models. Choose from FLUX.1-dev for best quality, SDXL for versatility, or Stable Diffusion for classic reliability.Endpoint
Basic Example
- Python
- cURL
Request Parameters
Required Parameters
Optional Parameters
SDXL-Specific Parameters
Response Format
The API returns a JSON object containing base64-encoded image data:Decoding the Response
Available Models
Model Recommendations
Supported Resolutions
All image models support the following resolutions:Pricing
Base rate: $0.01 per image at 1024x1024 resolution with 25 steps. Pricing formula:Pricing Examples
Image-to-Image Generation
Transform existing images using a reference image. Supported by Stable Diffusion models only.- Python
- cURL
Image-to-Image Parameters
Strength guide:
0.3-0.5: Subtle changes, preserves most of the original0.5-0.7: Moderate transformation0.7-1.0: Major changes, original is mostly a guide
LoRA Adapters
LoRA (Low-Rank Adaptation) adapters let you apply custom styles to your generated images. Available for SDXL and SD1.5 models.Available LoRAs
SDXL LoRAs:
SD1.5 LoRAs:
Using LoRAs
- Python
- cURL
Combining Multiple LoRAs
Mix multiple LoRAs by adjusting their weights (0.0-1.0):Backend Options
Tips for Better Results
Prompt Writing
- Be specific: “A golden retriever puppy playing in autumn leaves, soft sunlight” works better than “a dog”
- Include style: Add artistic style keywords like “photorealistic”, “oil painting”, “anime style”
- Describe lighting: Mention lighting conditions like “soft natural light”, “dramatic shadows”, “neon glow”
Using Negative Prompts
Exclude unwanted elements:Reproducible Results
Use theseed parameter to generate the same image:
CFG Scale Guide
- 1-5: More creative, may deviate from prompt
- 5-10: Balanced (recommended)
- 10-15: Closely follows prompt
- 15+: Very strict, may reduce quality
Next Steps
Text APIs
Generate text with large language models
Vision Language Models
Analyze images with multimodal AI
Audio APIs
Text-to-speech generation

