# AI3D API v2 model: flux-2-klein-realtime Edit an image with FLUX.2 [klein] Realtime through fal.ai. - AI3D model ID: `flux-2-klein-realtime` - Task: `image_to_image` - AI3D provider adapter: `fal` - Availability: Check `GET https://api.ai3d.dev/v2/models`; deployment configuration and key model allowlists can affect access. - Shared implementation guide: - AI3D API reference: ## Request Use AI3D's v2 job API. Do not call the provider directly or put provider credentials in the client. - Method and URL: `POST https://api.ai3d.dev/v2/jobs` - Authentication: `Authorization: Bearer ` with write permission and this model allowed on the key. - Content type: `application/json` - Source: Required top-level `image_url`, a public HTTPS URL or an image uploaded with `POST /v2/uploads`. - `input` is optional model-specific JSON, limited to 16 KiB. Supported fields: - `prompt` (up to 4,000 characters; default: `Turn this into "Living oil painting, melting gold and sapphire"`) - `num_inference_steps` (integer 1–8; default 3) - `image_size` (`square` for 768×768 or `square_hd` for 1024×1024; default `square`) - `seed` (non-negative integer or `null`; default 35) - `schedule_mu` (0.3–2.5; default 2.3) - `output_feedback_strength` (0–1; default 1) - `enable_interpolation` (boolean; default `false`; returns an additional interpolated image) Example request body: ```json { "model": "flux-2-klein-realtime", "image_url": "https://example.com/source.jpg", "input": { "prompt": "Turn this into a watercolor painting", "num_inference_steps": 3, "image_size": "square" } } ``` ## Job lifecycle 1. Check `GET /v2/models` and `GET /v2/billing/prices`; use this model only if it is enabled and the price is available. 2. Submit the request to `POST /v2/jobs` with a fresh `Idempotency-Key`. A successful submission returns `202 Accepted` and a job ID. 3. Poll `GET /v2/jobs/{job_id}` until `status` is `succeeded`, `failed`, or `submission_unknown`. 4. On success, inspect `artifacts` and download each output using its authenticated `download_url`. The result is an image artifact; this model does not create a 3D viewer link. Fal requires the source as a base64 image data URI. AI3D fetches the supplied source image and converts it before provider submission. Fal recommends 704×704 JPEG input at 50% quality for optimal realtime performance; other accepted image sizes are resized automatically. The worker connects to Fal's realtime WebSocket with a short-lived, endpoint-scoped token, sends one MessagePack request, and archives the returned inline image. Your AI3D job still uses the normal `POST /v2/jobs` and polling flow; the Fal key and WebSocket token stay server-side. Fal currently lists a rate of $0.00194 per compute second. The price of one image is the compute seconds Fal actually bills at that rate, plus a fixed $0.001 AI3D platform fee that covers our infrastructure. A wallet reserves 10 compute seconds plus the fee ($0.0204) when the job starts and is refunded the difference once usage is known; typical images use 1 to 3 compute seconds, so the final charge is usually about $0.003 to $0.007. Fal reports usage a few seconds after the image is generated, so a finished job can briefly show `billing.state: "usage_pending"` with a null charge while the reservation stays held. Usage lookups are read-only and never generate another image. If usage cannot be confirmed within 24 hours the job goes to operator review. The platform fee is charged only for delivered images on customer wallets, never for failed jobs. Check `/v2/billing/prices` for the current rate, fee and reservation. When retrying a timed-out submission, resend the identical body with the same idempotency key. Never create a second job automatically when status is `submission_unknown`; provider acceptance and billing may need operator reconciliation. ## Provider reference -