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

Welcome

Contact Us

Try FLUX.2 [klein] 4B Text to Image for low-cost drafts and commercial visuals with eleven ratios, five megapixel tiers, seed control, 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] 4B Text to Image

by Black Forest LabsImage

Try FLUX.2 [klein] 4B Text to Image for low-cost drafts and commercial visuals with eleven ratios, five megapixel tiers, seed control, and API code.

Pricing

Standard Usage

0 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 cost2 Credits / image1 MP

Output

Ready for generation

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

--GPU-T4

From product campaigns to detailed scenes

Browse real API results across different aspect ratios, complete prompts, and visual detail.

Related image models

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

Higher-fidelity four-step output

FLUX.2 [klein] 9B

Use the 9B route when realism, typography, and detail matter more than the lowest cost.

Pro FLUX generation

FLUX.2 Pro

A higher-end FLUX option for final composition and resolution-sensitive output.

Low-cost Chinese-friendly generation

Z-Image

Compare simple ratio controls, Chinese prompts, and a flat per-image price.

Compare AI image APIs

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

Try FLUX.2 [klein] 4B Text to Image for low-cost drafts and commercial visuals with eleven ratios, five megapixel tiers, seed control, and API code.

The Playground and API use the same model ID: flux-2-klein-4b/text-to-image. This endpoint accepts text prompts only; reference-image editing uses the separate Image-to-Image route.

Provider
Black Forest Labs
Task
Text-to-Image
References
Not supported
Pricing
0 Credits / image

Model specifications

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

Reference images
Not supported
Output resolution
0.25 MP0.5 MP1 MP2 MP4 MP
Aspect ratios
1:116:99:163:22:34:33:45:44:521:99:21
Output formats
WEBPJPGPNG
Output quality
0-100 for JPG/WebP
Reproducibility
Optional seed
Prompt length
Required text prompt
Pricing
0.25 MP: 0 Credits / image0.5 MP: 1 Credits / image1 MP: 2 Credits / image2 MP: 5 Credits / image4 MP: 11 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 Text to Image

Choose the destination and aspect ratio before composing subject, scene, material, light, and text.

Subject
Scene
Camera and light
01

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/text-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/text-to-image",
  "input": {
    "prompt": "A cinematic product campaign with sharp text",
    "aspect_ratio": "1:1",
    "resolution": "1 MP",
    "output_format": "jpg",
    "output_quality": 95
  }
}'

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

Read the full API documentation

Frequently asked questions

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

It fits batch drafts, product concepts, social assets, and cost-sensitive iteration. Move to 9B when realism, typography, and fine detail matter more.

How should I choose between 0.25 and 4 MP?

Start with 0.25 or 0.5 MP for drafts, use 1 MP for typical web assets, and select 2 or 4 MP for larger output. Price changes by megapixel tier.

Which aspect ratios are supported?

1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 21:9, and 9:21.

How can I reproduce a composition direction?

Keep seed, prompt, ratio, megapixel tier, and output settings fixed while changing one variable at a time.

What belongs in the minimal API request?

POST /v1/tasks with model and input.prompt. Other settings may use defaults.

Describe subject and scene

Start with the subject, environment, and visual goal, then add material, light, camera, and exact text.

Draft

0.25 MP

Final

4 MP

02

Choose output settings

Choose one of eleven aspect ratios, a 0.25-4 MP resolution tier, format, compression quality, and optional seed.

Playground
POST /v1/tasks
03

Validate before integration

Confirm the result in Playground, then reuse the same prompt and model ID in an asynchronous task.