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": "flux-kontext-pro",
"prompt": "Replace the office background with a sunlit Scandinavian living room with green monstera plants",
"image": "https://example.com/source-photo.jpg",
"aspect_ratio": "1:1"
}'
import requests
url = "https://lumozai.com/api/v4/run"
headers = {"Authorization": "Bearer YOUR_LUMOZ_API_KEY"}
payload = {
"model": "flux-kontext-pro",
"prompt": "Replace background with a modern Tokyo coffee shop interior",
"image": "https://example.com/input.jpg"
}
resp = requests.post(url, json=payload, headers=headers).json()
print("Contextual output:", resp.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: "flux-kontext-pro",
prompt: "Place the product onto a clean white marble countertop",
image: "https://example.com/product.png"
})
});
const result = await res.json();
console.log(result.output);