Images from a prompt and a size.
Image generation runs Z-Image Turbo (Apache 2.0) on the network's image nodes. The API has the shape of OpenAI's Images API: a prompt and a size are enough.
curl https://swyrmcompute.com/v1/images/generations -H "Authorization: Bearer $SWYRM_API_KEY" -H "Content-Type: application/json" -d '{"model":"swyrm/z-image-turbo","prompt":"a red fox in the snow at dawn","size":"1024x1024"}'
Response: {"id","status":"succeeded","data":[{"url","width","height","seed"}],"usage":{"megapixels","cost_usd"}}. Links are signed and expire after 24 hours; the files are then deleted.
Options
| Field | Default | Notes |
|---|---|---|
size | 1024x1024 | WxH, multiples of 16, 256–2048 px per side, at most 4.2 megapixels |
n | 1 | 1–4 images |
seed | random | same seed and prompt → the same composition; image k uses seed + k |
steps | 8 | 1–8; fewer is not much faster, 8 is the tuned value |
output_format | png | png, jpeg, webp |
response_format | url | url or b64_json |
async | false | true (or header Prefer: respond-async) returns 202 {id, poll_url} at once |
webhook_url | — | public https URL; we POST the result, signed with X-Swyrm-Signature: sha256=HMAC(secret, timestamp + "." + body) |
Poll an async job with GET /v1/images/generations/{id}. Send an Idempotency-Key header to make retries safe.
Price
$0.0025 per megapixel, billed in steps of 512×512 (a quarter of a 1024×1024 image), rounded up: exactly $0.0025 for 1024×1024. Only delivered images are charged; failed, refused or filtered requests cost nothing. For comparison, hosted Z-Image Turbo is $0.005/MP on fal.ai and about $0.0032 per 1024×1024 image on Runware.
Content policy
Prompts are checked before any work starts. Sexual content involving minors, sexual images of real people and other illegal content are refused, and repeated attempts suspend the key. Every PNG carries an AI-Generated marker in its metadata.
ComfyUI
The free SwyrmCompute node pack brings Z-Image Turbo into ComfyUI: an Image node (prompt + size → a standard IMAGE batch you can wire into upscalers, savers or video models), a Prompt Writer that turns a short idea in any language into a detailed prompt, a Prompt Batch node for many variations and a Chat node for the long-context LLM.
Download comfyui-swyrm.zip (7 KB)
| Compatibility | |
|---|---|
| ComfyUI | Any recent version: desktop app, portable build or git install |
| System | Windows, Linux or macOS |
| GPU | None needed: images are rendered on the network, so it also runs on a laptop or a CPU-only ComfyUI |
| Python packages | None to install: standard library plus the torch, numpy and Pillow that ComfyUI already has |
- Unzip into
ComfyUI/custom_nodes/(you getcustom_nodes/comfyui-swyrm). - Create an API key in the console and fund your balance.
- Set it once as the environment variable
SWYRM_API_KEY(on Windows:setx SWYRM_API_KEY sw_live_...) and restart ComfyUI. The nodes appear under SwyrmCompute.
Same price as the API: $0.0025 per 1024×1024 image, only delivered images are charged, and every request carries an Idempotency-Key so a retry never charges twice. Hosting images on your own AMD GPU instead? That is the host app, which installs its own ComfyUI or uses yours.