Image generation
Open-weights diffusion via a local ComfyUI sidecar. OpenAI-compat shape: drop-in for POST api.openai.com/v1/images/generations. Sync (default) or async; pick per request.
Endpoint
POST https://api.genie.tech/v1/images/generations
Authorization: Bearer sk-genie-{your-key}
Content-Type: application/jsonTry it
Try it nowImage generation (async kickoff)
Sign in to tryPOST /api/v1/images/generations
SDK + curl
curl https://api.genie.tech/v1/images/generations \
-H "Authorization: Bearer $GENIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "sdxl-turbo",
"prompt": "a tiny cat astronaut",
"size": "512x512",
"n": 1
}'Request body
model:flux-schnell|sdxl-turbo(defaultflux-schnell). Free-tier orgs always servedsdxl-turbo; substitution surfaced in response.prompt: required. 1–4000 chars. Pre-flight content moderation rejects unsafe prompts before fleet dispatch.n: number of images (1–10).size:256x256|512x512|1024x1024|1792x1024|1024x1792.seed,negative_prompt: optional.image: optional reference image for continuity: anhttps://URL or adata:image/...;base64,URI, or an array of 1–8 (character sheet / multi-reference). https URLs are SSRF-guarded; data URIs are capped at ~12MB decoded.strength: optional0.0–1.0img2img denoise (0 = near-copy of reference, 1 = ignore it). Requiresimage.reference_type: optionalimg2img|subject|style. Requiresimage.mask: optionaldata:image/...;base64,PNG for inpaint/edit (regenerate only the masked region). Requiresimage.mode:sync(default, returns the URL once gen completes) |async(returns 202 + job id; poll/v1/jobs/:id). See Async jobs.webhook:{ url, secret? }; called when an async job finishes. Supply only withmode=async.
Response
{
"created": 1731020000,
"data": [{ "url": "https://blob.genie.tech/.../image-0.png" }],
"model_substituted": null
}Image URLs are Vercel Blob: public-readable, no expiry. Save them yourself if you need long-term retention.