HiAPI
OverviewModel MarketplaceAPI KeysUsage StatisticsCall LogsBillingReferralPlaygroundStorageChangelogContact UsSettings
Display unit
N
Powered by hiapi
Settings

Welcome

Contact Us

A compact low-cost editing route for commercial refinements, background changes, recoloring, and rapid reference-based iteration.

Provider: Black Forest Labs

Category: image generation

Endpoint: /v1/tasks

Status: Available

Cost: See live page pricing

Back to Models

FLUX.2 [klein] 4B Image to Image

New
by Black Forest LabsImage

A compact low-cost editing route for commercial refinements, background changes, recoloring, and rapid reference-based iteration.

Pricing

Standard Usage

14 Credits/ image

Input

0 / 5000

More parameters

Generation settings

Controls saved image quality. PNG is usually unaffected; Range: 0 - 100, Integer only

Choose the output image file format

Advanced

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

Output

Ready for generation

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

--

Related image models

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

Fast image generation

Seedream 5.0 Lite

A low-cost route for multilingual commercial visuals and rapid iteration.

Typography and layout

Qwen Image 3.0

Compare poster typography, scene composition, and 1K/2K output.

Flexible image creation

Nano Banana 2

A general-purpose route with optional references and broad aspect-ratio coverage.

Compare AI image APIs

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

A compact low-cost editing route for commercial refinements, background changes, recoloring, and rapid reference-based iteration.

The Playground and API use the same model ID: flux-2-klein-4b/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
Pricing
14 Credits / image

Model specifications

Explore reference limits, sizes, formats and quality settings for FLUX.2 [klein] 4B Image to Image.

Reference images
1
Output resolution
0.25 MP0.5 MP1 MP2 MP4 MP
Aspect ratios
1:116:99:164:33:4
Output formats
PNGJPEG
Prompt length
Up to 20,000 characters
Pricing
Per image: 14 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] 4B 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-4b/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-4b/image-to-image",
  "input": {
    "prompt": "Change the product color and preserve its structure",
    "aspect_ratio": "match_input_image",
    "image_urls": [
      "https://example.com/reference.jpg"
    ],
    "output_format": "png",
    "output_quality": 95,
    "resolution": "1 MP"
  }
}'

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

Read the full API documentation
Need to compare models and billing tiers?View live pricing for all models

Frequently asked questions

What is FLUX.2 [klein] 4B Image to Image best for?

A compact low-cost editing route for commercial refinements, background changes, recoloring, and rapid reference-based iteration.

Does FLUX.2 [klein] 4B Image to Image accept reference images?

Yes. This route requires reference input and accepts up to 1 image.

Which output settings are supported?

The page exposes 0.25 MP, 0.5 MP, 1 MP, 2 MP, 4 MP and 1:1, 16:9, 9:16, 4:3, 3:4; use the Playground contract for the final available set.

How is FLUX.2 [klein] 4B Image to Image billed?

Billing is per successful generated image. Resolution or quality differences, when present, are reflected by the live page price.

How do I call the FLUX.2 [klein] 4B Image to Image API?

POST an asynchronous task to /v1/tasks with model set to flux-2-klein-4b/image-to-image and put generation fields inside input.

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.