Execute directly against our high-throughput gateway. Replace YOUR_LUMOZ_API_KEY with your free developer key.
curl -X POST "https://lumozai.com/api/v4/run" \
-H "Authorization: Bearer YOUR_LUMOZ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sdxl-lightning",
"prompt": "Modern architectural glass villa in Norway fjords, sunset golden hour, photorealistic 8k",
"aspect_ratio": "1:1"
}'
import requests
url = "https://lumozai.com/api/v4/run"
headers = {"Authorization": "Bearer YOUR_LUMOZ_API_KEY"}
payload = {
"model": "sdxl-lightning",
"prompt": "Modern architectural glass villa in Norway fjords, sunset golden hour",
"aspect_ratio": "1:1"
}
# Costs only $0.0023 per call
res = requests.post(url, json=payload, headers=headers).json()
print("Image result:", res.get("output"))
const res = await fetch("https://lumozai.com/api/v4/run", {
method: "POST",
headers: { "Authorization": "Bearer YOUR_LUMOZ_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
model: "sdxl-lightning",
prompt: "Modern architectural glass villa in Norway fjords, sunset golden hour"
})
});
const data = await res.json();
console.log(data.output);