HiAPI
OverviewModels MarketAPI KeysUsage StatisticsCall LogsBillingReferralPlaygroundStorageChangelogContact UsSettings
Display unit
N
Powered by hiapi
Settings

Welcome

Contact Us

Edit with FLUX.2 [klein] 9B Image to Image using one reference, real cleanup and text-replacement examples, five ratios, four to eight inference steps, and API code.

Provider: Black Forest Labs

Category: image generation

Endpoint: /v1/tasks

Status: Available

Cost: See live page pricing

Back to Models

FLUX.2 [klein] 9B Image to Image

by Black Forest LabsImage

Edit with FLUX.2 [klein] 9B Image to Image using one reference, real cleanup and text-replacement examples, five ratios, four to eight inference steps, and API code.

Pricing

Standard Usage

62 Credits/ image

Input

0 / 5000

More parameters

Generation settings

Choose the output image file format

Inference steps used for generation; Range: 4 - 8, Integer only

Advanced

For repeatable results · integer 0-2147483647
Estimated cost62 Credits / imageper image

Output

Ready for generation

Configure your parameters and click "Run" to see the output here.

--GPU-T4

From references to edited results

Each case separates references, the edit instruction, and the complete result, with image zoom and prompt copy.

Turn an amateur snapshot into a catalog image · After
Turn an amateur snapshot into a catalog image · Before
BeforeAfter

1 reference image(s) / 864 × 1152

Turn an amateur snapshot into a catalog image

The bottle shape and cap stay fixed while clutter, color cast, reflections, framing, and background are rebuilt.

Prompt · English

Keep the water bottle exactly as it is: same brushed stainless steel body, same matte black screw cap, same proportions and shape. Remove the cluttered counter, coffee mug, and towel completely. Replace the background with a seamless pure white studio background. Correct the lighting to even, shadowless studio lighting from the front, center the bottle in the frame, sharp focus, no reflections, no smudges, clean e-commerce catalog product photography.

Replace two lines of magazine copy · After
Replace two lines of magazine copy · Before
BeforeAfter

1 reference image(s) / 864 × 1152

Replace two lines of magazine copy

The masthead and subhead change while the photo, cream border, accent color, font weight, and placement remain.

Prompt · English

Keep the cream background border, sage-green accent color, layout, and mountain trail sunrise photo exactly unchanged. Replace only the masthead text FIELD NOTES with ROAM QUARTERLY in the same bold sans-serif style, and replace the subhead line Slow Travel Fast Ideas with Stories From The Road, keeping the same font weight and position

Rewrite neon text without moving the storefront · After
Rewrite neon text without moving the storefront · Before
BeforeAfter

1 reference image(s) / 1344 × 768

Rewrite neon text without moving the storefront

The sign changes from LUNA RECORDS to VELVET DINER while glow, mounting, reflections, night light, and camera remain.

Prompt · English

Keep the storefront, rain-slicked sidewalk reflections, night lighting, and cinematic composition exactly unchanged. Change only the neon sign text from LUNA RECORDS to VELVET DINER, keeping the same pink and blue neon glow style and mounting position

Related image models

Choose an adjacent model by task, output tier, and reference-image needs.

Higher-resolution FLUX editing

FLUX.2 Pro Image to Image

Use the Pro route when final resolution and complex detail preservation matter.

Up to 14 references

Seedream 5.0 Lite

Choose it for multi-reference composites and 2K or 4K output at one flat price.

Campaign-grade multi-reference editing

Seedream 5.0 Pro

A higher-fidelity option for final campaign assets and demanding preservation work.

Compare AI image APIs

About FLUX.2 [klein] 9B Image to Image

Edit with FLUX.2 [klein] 9B Image to Image using one reference, real cleanup and text-replacement examples, five ratios, four to eight inference steps, and API code.

The Playground and API use the same model ID: flux-2-klein-9b/image-to-image. Reference images provide subject, product, scene, or style facts, while the prompt assigns each role and limits the edit.

Provider
Black Forest Labs
Task
Image-to-Image / Editing
References
1-1
Pricing
62 Credits / image

Model specifications

These specifications reflect the current FLUX.2 [klein] 9B Image to Image request contract.

Reference images
1-1
Inference steps
4-8 steps (default 4)
Aspect ratios
1:14:33:416:99:16
Output formats
JPEGPNGWEBP
Prompt length
Required text prompt
Pricing
Per image: 62 Credits / image

Final cost depends on the output tier and input add-ons. Check the live page price and task record for the final charge.

How to use FLUX.2 [klein] 9B Image to Image

References provide visual facts; the prompt assigns their roles and limits the edit.

Subject
Scene

API Quickstart

Copy a minimal request below. See Docs for parameters, callbacks, task retrieval, and errors.

Endpoint
POST /v1/tasks
Model ID
flux-2-klein-9b/image-to-image
cURL
curl -X POST https://api.hiapi.ai/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "flux-2-klein-9b/image-to-image",
  "input": {
    "prompt": "Change the product color and preserve its structure",
    "image_urls": [
      "https://example.com/reference.jpg"
    ],
    "aspect_ratio": "1:1",
    "num_inference_steps": 4,
    "output_format": "png"
  }
}'

The create request immediately returns a taskId; image generation continues asynchronously.

Read the full API documentation

Frequently asked questions

How many references does FLUX.2 [klein] 9B Image to Image accept?

It currently accepts one JPEG, PNG, or WebP reference. image_urls must contain exactly one public image URL.

Which editing tasks is it best for?

It is suited to product cleanup, background replacement, in-image text rewriting, color changes, and commercial edits that preserve subject and camera.

How do I set inference steps?

num_inference_steps accepts integers from 4 to 8 and defaults to 4. The current price does not change with the step count.

Which ratios and formats are supported?

Ratios: 1:1, 4:3, 3:4, 16:9, and 9:16. Formats: JPEG, PNG, and WebP.

How do I submit the reference through the API?

Pass one public image URL in input.image_urls when posting to /v1/tasks, together with the prompt. Ratio, seed, steps, and format are optional.

Style
Up to 1
01

Upload references

Choose 1 to 1 publicly accessible images without redundant or conflicting roles.

What to change
What to preserve
02

Define changes and constraints

Describe the requested edit and the subject, text, composition, lighting, and positions that must remain.

Playground
POST /v1/tasks
03

Validate before integration

Check the reference relationship in Playground, then create asynchronous tasks with the same model ID.