(the distilled, low-latency variant of Flux 2) hosted on the
RunComfy Model API
— no API key, async REST.
npx skills
add
agentspace-so/runcomfy-skills
--skill
flux-2-klein
-g
When to pick this model (vs siblings)
Flux 2 Klein's distinct strength is
latency-first creative iteration
sub-second feedback enables live art-direction sessions and rapid product visualization that batch-style models can't sustain. Pick it when
iteration speed matters more than ceiling resolution
.
You want
Use
Real-time / live art-direction sessions
Flux 2 Klein 4B
Fast iteration with strong detail at the end
Flux 2 Klein 9B
Multi-reference brand styling with consistent looks
Flux 2 Klein
2K–4K hero images, max resolution
Seedream 5
Maximum prompt adherence + extreme detail
Flux 2 Pro
Embedded text, logos, multilingual signage
GPT Image 2
Hyperrealistic portrait
Nano Banana Pro
If the user said "Flux 2 Klein" / "BFL Klein" / "flux klein" explicitly, route here regardless. If they said "Flux 2" generically, ask whether they want
Klein
(fast) or
Pro
(max quality) before defaulting.
Prerequisites
RunComfy CLI
—
npm i -g @runcomfy/cli
RunComfy account
—
runcomfy login
opens a browser device-code flow.
CI / containers
— set
RUNCOMFY_TOKEN=
instead of
runcomfy login
.
Endpoints + input schema
Two variants, same endpoint shape, same prompt grammar.
blackforestlabs/flux-2-klein/9b/text-to-image
The fidelity-first variant. Use for polish / final output.
Field
Type
Required
Default
Notes
prompt
string
yes
—
Up to ~512 tokens. Longer degrades.
steps
int
no
25
4–50.
Step-distilled architecture
— 4–8 enough for concepting; ~25 for polish; >25 buys little.
width
int
no
1024
512–1536 typical.
Aspect ratio capped at 16:9
, max ~2K total.
height
int
no
1024
Match
width
's aspect intent.
blackforestlabs/flux-2-klein/4b/text-to-image
The latency-first variant. Sub-second 4-step inference. Use for live iteration / concepting.
Same field set as 9B. Default
steps
is effectively 4 — the variant is built for that step count.
Reference images (both variants)
Up to
4 simultaneous reference images
are supported on the same endpoint for style transfer / guided composition. The exact field name in the JSON body is documented on the
model's API tab
— pass it through the CLI verbatim. Reference-image use enables editing-style workflows without a separate
/edit
endpoint.
How to invoke
Fast concepting (4B, sub-second):
runcomfy run blackforestlabs/flux-2-klein/4b/text-to-image
\
--input
'{"prompt": ""}'
\
--output-dir
<
absolute/path
>
Polish / final (9B, ~25 steps):
runcomfy run blackforestlabs/flux-2-klein/9b/text-to-image
\
--input
'{
"prompt": "",
"steps": 25,
"width": 1024,
"height": 1024
}'
\
--output-dir
<
absolute/path
>
Wide-format poster:
runcomfy run blackforestlabs/flux-2-klein/9b/text-to-image
\
--input
'{"prompt": "", "width": 1536, "height": 864}'
\
--output-dir
<
absolute/path
>
The CLI submits, polls every 2s until terminal, then downloads any
*.runcomfy.net
/
*.runcomfy.com
URL from the result into
--output-dir
. Stdout is the result JSON. Stderr is progress.
For pipe-friendly usage:
runcomfy
--output
json run blackforestlabs/flux-2-klein/4b/text-to-image
\
--input
'{"prompt":"..."}'
--no-wait
|
jq
-r
.request_id
Prompting — what actually works
These are model-specific patterns that empirically improve output quality.
Subject-first declarative grammar.
The structure Flux 2 Klein was trained on is
"Subject + action + scene + style + lighting + camera + quality"
. Front-load the subject; trail with directives. Example:
"A vibrant hummingbird mid-flight sipping nectar from a bright pink hibiscus, iridescent feathers in morning sun, soft bokeh tropical garden, macro photography, razor-sharp detail, cinematic lighting"
Not a self-hosted Flux runner. Not a capability grant — depends on a working RunComfy account. Not multi-tenant.
Security & Privacy
Token storage
:
runcomfy login
writes the API token to
~/.config/runcomfy/token.json
with mode 0600 (owner-only read/write). Set
RUNCOMFY_TOKEN
env var to bypass the file entirely in CI / containers.
Input boundary
the user prompt is passed as a JSON string to the CLI via
--input
. The CLI does NOT shell-expand the prompt; it transmits the JSON body directly to the Model API over HTTPS. No shell injection surface from prompt content.
Third-party content
image / mask / video URLs you pass are fetched by the RunComfy model server, not by the CLI on your machine. Treat external URLs as untrusted; image-based prompt injection is a known risk for any image-edit / video-edit model.
Outbound endpoints
only
model-api.runcomfy.net
(request submission) and
*.runcomfy.net
/
*.runcomfy.com
(download whitelist for generated outputs). No telemetry, no callbacks.
Generated-file size cap
the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.