Create AI-generated images with Arli AI via the API or playground
Describe the image you want to create. Be specific about style, lighting, composition, and subject.
| Good | "a photorealistic golden retriever playing in autumn leaves, warm sunlight, bokeh background, 4K, detailed fur" |
| Bad | "dog" |
| Good | "cyberpunk city at night, neon signs, rain reflections on wet streets, cinematic lighting, ultra detailed" |
| Bad | "city" |
Tip: Include style keywords (photorealistic, anime, oil painting), lighting (golden hour, dramatic), and quality tags (4K, detailed, high quality).
Use the API or the web playground to generate your image.
curl -X POST https://api.arliai.com/v1/txt2img \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"prompt": "a photorealistic golden retriever playing in autumn leaves, warm sunlight, bokeh background",
"negative_prompt": "blurry, low quality, distorted",
"steps": 25,
"sampler_name": "Euler a",
"width": 1024,
"height": 768,
"cfg_scale": 7
}' | python3 -c "
import sys, json, base64
data = json.load(sys.stdin)
img = base64.b64decode(data['images'][0])
with open('output.png', 'wb') as f:
f.write(img)
print('Saved output.png')
"
curl -X POST https://api.kim8.s4s.host/api/v1/images/generations \
-H "Content-Type: application/json" \
-d '{
"model": "stable-diffusion-xl-base-1.0",
"prompt": "a photorealistic golden retriever playing in autumn leaves",
"n": 1,
"size": "1024x1024"
}'
Visit generate.kim8.s4s.host, select a model, type your prompt, and click Generate.
The API returns base64-encoded image data:
{
"images": ["iVBORw0KGgoAAAANSUhEUgAA... (base64 PNG)"],
"info": {
"prompt": "a photorealistic golden retriever...",
"seed": 1234567890,
"steps": 25,
"width": 1024,
"height": 768
}
}
Decode the base64 to save as a file. The playground displays images directly in your browser.
| Image to Image | Transform existing images with a text prompt | Playground Guide |
| Upscale | Increase image resolution by 2x-4x | Upscale Guide |
| Model Guide | Find the best model for your use case | Model Guide |
| Full API Reference | All endpoints, parameters, and examples | API Reference |
steps: 20-30 for good quality without being slowcfg_scale: 7 as a starting point, increase for more prompt adherence"blurry, low quality, distorted, deformed"