FLUX.2-pro Image Generation

v1.1.0

Generate images using Black Forest Labs FLUX.2-pro via Azure AI Foundry. Use when asked to create, generate, or produce images, illustrations, photos, artwor...

0· 424·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for zwcih/azure-flux-image-gen.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "FLUX.2-pro Image Generation" (zwcih/azure-flux-image-gen) from ClawHub.
Skill page: https://clawhub.ai/zwcih/azure-flux-image-gen
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required env vars: FLUX_ENDPOINT, FLUX_API_KEY
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install azure-flux-image-gen

ClawHub CLI

Package manager switcher

npx clawhub@latest install azure-flux-image-gen
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, SKILL.md, references/api.md, and scripts/generate.mjs all describe the same capability: calling a FLUX.2-pro endpoint to generate one image. The only required secrets (FLUX_ENDPOINT, FLUX_API_KEY) are appropriate for that purpose.
Instruction Scope
Runtime instructions and the bundled script only read the declared env vars and perform image generation and optional Canvas overlay. They write the generated image to disk (expected) and log output. There are no steps that read unrelated files, scan system state, or post data to other endpoints.
Install Mechanism
No install spec is provided (instruction-only), and included code is a small local Node script. The SKILL.md suggests optionally installing the 'canvas' npm package and a CJK font for text overlay — those are reasonable, explicit developer/user actions and not automatically fetched by the skill.
Credentials
Only FLUX_ENDPOINT and FLUX_API_KEY are required and declared; primaryEnv is FLUX_API_KEY. The code does not access other environment variables or credential/config paths.
Persistence & Privilege
The skill is not marked always:true, is user-invocable, and does not modify other skills or system-wide configuration. Allowing autonomous invocation is the platform default and not by itself a problem here.
Assessment
This skill appears to do what it claims. Before installing: ensure the FLUX_ENDPOINT you supply is the intended Azure Foundry resource and the FLUX_API_KEY is scoped/rotated appropriately (treat it like any API secret). The local script writes image files to disk — confirm you are comfortable with that output path. If you need Chinese text overlay, you'll have to install the 'canvas' package and provide a CJK font file locally. Also confirm your Node runtime supports fetch and AbortSignal.timeout (or run with a compatible Node version). Finally, follow content-policy guidance for prompts and avoid sharing your API key in public contexts.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

EnvFLUX_ENDPOINT, FLUX_API_KEY
Primary envFLUX_API_KEY
latestvk974se3bvaec1zvret97nc4g1583an2y
424downloads
0stars
3versions
Updated 1mo ago
v1.1.0
MIT-0

FLUX.2-pro Image Generation

Generate high-quality images from text prompts using FLUX.2-pro on Azure AI Foundry.

Setup

Set environment variables (typically in OpenClaw config or shell profile):

export FLUX_ENDPOINT="https://<resource>.services.ai.azure.com/providers/blackforestlabs/v1/flux-2-pro?api-version=preview"
export FLUX_API_KEY="YOUR_KEY_HERE"

Quick Generation

Use the bundled script:

node scripts/generate.mjs --prompt "a red fox in autumn forest" --output fox.png
node scripts/generate.mjs --prompt "cute robot" --width 1440 --height 816 --output robot.png

Direct API Call

When the script isn't suitable, call the API directly:

curl -s -X POST "$FLUX_ENDPOINT" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $FLUX_API_KEY" \
  -d '{"prompt":"a cat","width":1024,"height":1024,"n":1,"model":"FLUX.2-pro"}' \
  | node -e "process.stdin.on('data',d=>{const j=JSON.parse(d);require('fs').writeFileSync('out.png',Buffer.from(j.data[0].b64_json,'base64'))})"

Critical parameters: "n": 1 and "model": "FLUX.2-pro" are mandatory. Omitting them causes HTTP 500.

Chinese Text Overlay

FLUX cannot render CJK characters. Overlay text with Node.js Canvas:

import { createCanvas, loadImage, registerFont } from "canvas";
registerFont("NotoSansCJK-Bold.otf", { family: "NotoSansCJK" });

const img = await loadImage("base.png");
const canvas = createCanvas(img.width, img.height);
const ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0);
ctx.font = 'bold 48px "NotoSansCJK"';
ctx.fillStyle = "#ffffff";
ctx.fillText("你好世界", 100, 100);

Requires: npm install canvas + a CJK font file (e.g., NotoSansCJK-Bold.otf).

Best Practices

  • Serialize requests — avoid parallel API calls; use sequential generation
  • Set 180s timeout — generation can take 30–120 seconds
  • Prompt in English — FLUX works best with English prompts
  • Content filter — avoid violent, sexual, or otherwise filtered content in prompts
  • Print quality — use 1240×1754 for A3, scale up as needed

API Reference

See references/api.md for full request/response schema and size options.

Comments

Loading comments...