# auray-serverless/bfl-flux-2-klein-9b-kv `POST https://queue.auray.run/auray-serverless/bfl-flux-2-klein-9b-kv` submits; the response carries a `request_id` and the three URLs to use next. `POST https://auray.run/auray-serverless/bfl-flux-2-klein-9b-kv` is the same request run synchronously: the connection is held and the response is the model's OUTPUT, the same document the result URL would have answered. A request that usually takes longer than a run may hold its connection is refused `400 model_not_synchronous` there before anything is charged, naming `expected_seconds` and `wait_ceiling_seconds` — submit it to the queue instead. Past the deadline a run is `504 run_timed_out` with `X-Auray-Request-Timeout-Type: user` — the request is still alive, running and charged or, while it waits to start, not yet charged (`charged` says which) — so poll `status_url` rather than resending, or resend with the same `idempotency_key` to be handed this request again instead of a second one. A run holds one of the connections this platform, this product and your account may keep waiting; with all of them in use it is refused `429 wait_capacity` with `Retry-After` before anything is charged (`charged: false`), and retrying after that pause is safe. One of Auray's catalogue models, billed once in credits. Whether it runs right now is `GET /v1/catalogue`'s `addresses` (no key needed): `connected` runs; `described` answers `501 model_not_connected` and `paused` `503 model_disabled`, both before anything is charged. Price: Credits per megapixel (counted as `width*height*steps@4`): 0.1344 for acceleration=none; acceleration=low; acceleration=medium; acceleration=high. From 1.0486 to 52.4288 megapixels a request. Quoted when you submit, at the most the request can cost; the charge settles to what the job cost and never above the quote. Fields as published for this model. Every error code is explained at https://auray.ai/docs/api/errors. Address: auray-serverless/bfl-flux-2-klein-9b-kv Servers: https://queue.auray.run · https://auray.run Scope: image:write Auth: Authorization: Bearer auray_sk_… API enabled: yes ## Input - inputs.referenceImages (array of url, optional) — List of reference images (an http(s) URL; upload a local file first and send its read URL). Documented range: 1 to 4. - positivePrompt (string, required) — Text prompt describing elements to include in the generated output. Documented range: 1 to 10,000 characters. - negativePrompt (string, optional) — Prompt to guide what to exclude from generation. Ignored when guidance is disabled (CFGScale ≤ 1). Documented range: 2 to 3,000 characters. - width (integer, required, default: 1024) — Width of the generated media in pixels. Documented range: 128 to 2,048. - height (integer, required, default: 1024) — Height of the generated media in pixels. Documented range: 128 to 2,048. - seed (integer, optional) — Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range. Documented range: 0 to 9,223,372,036,854,776,000. - steps (integer, optional, default: 4) — Total number of denoising steps. Higher values generally produce more detailed results but take longer. Documented range: 1 to 50. - scheduler (string, optional, one of: "DDIM", "DDIMScheduler", "DDPMScheduler", "DEISMultistepScheduler", "Default", "DPM++", "DPM++ 2M", "DPM++ 2M Beta", "DPM++ 2M Exponential", "DPM++ 2M Karras", "DPM++ 2M SDE", "DPM++ 2M SDE Beta", "DPM++ 2M SDE Exponential", "DPM++ 2M SDE Karras", "DPM++ 2M SDE Uniform", "DPM++ 2M Uniform", "DPM++ 3M", "DPM++ 3M Beta", "DPM++ 3M Exponential", "DPM++ 3M Karras", "DPM++ 3M SDE Uniform", "DPM++ 3M Uniform", "DPM++ Beta", "DPM++ Exponential", "DPM++ Karras", "DPM++ SDE", "DPM++ SDE Beta", "DPM++ SDE Exponential", "DPM++ SDE Karras", "DPM++ Uniform", "DPM++ Uniform Beta", "DPM++ Uniform Exponential", "DPM++ Uniform Karras", "DPMSolverMultistepInverse", "DPMSolverMultistepScheduler", "DPMSolverSinglestepScheduler", "EDMDPMSolverMultistepScheduler", "EDMEulerScheduler", "Euler", "Euler a", "Euler Beta", "Euler Exponential", "Euler Karras", "EulerAncestralDiscreteScheduler", "EulerDiscreteScheduler", "FlowMatchEulerDiscreteScheduler", "Heun", "HeunDiscreteScheduler", "Heun Karras", "IPNDMScheduler", "IPNDM Uniform", "IPNDM Uniform Beta", "IPNDM Uniform Exponential", "IPNDM Uniform Karras", "KDPM2AncestralDiscreteScheduler", "KDPM2DiscreteScheduler", "LCM", "LCMScheduler", "LMS", "LMSDiscreteScheduler", "LMS Karras", "PNDMScheduler", "TCDScheduler", "UniPC", "UniPC 2M", "UniPC 2M Karras", "UniPC 2M Uniform", "UniPC 3M", "UniPC 3M Karras", "UniPC 3M Uniform", "UniPC Karras", "UniPC Uniform", "UniPC Uniform Beta", "UniPC Uniform Exponential", "UniPC Uniform Karras") — Scheduler to use for the diffusion process. - CFGScale (number, optional, default: 3.5) — Guidance scale representing how closely the output will resemble the prompt. Higher values produce results more aligned with the prompt. Documented range: 1 to 20. - acceleration (string, optional, default: "high", one of: "none", "low", "medium", "high") — Optimization level. - acceleratorOptions.cacheEndStep (integer, optional) — Absolute step number to end caching. Must be greater than `cacheStartStep` and less than or equal to `steps`. Documented range: 1 or more. - acceleratorOptions.cacheEndStepPercentage (integer, optional) — Percentage of steps to end caching. Alternative to `cacheEndStep`. Must be greater than `cacheStartStepPercentage`. Documented range: 1 to 100. - acceleratorOptions.cacheMaxConsecutiveSteps (integer, optional, default: 3) — Limits the maximum number of consecutive steps that can use cached computations before forcing a fresh computation. Documented range: 1 to 5. - acceleratorOptions.cacheStartStep (integer, optional) — Absolute step number to start caching. Must be less than `cacheEndStep`. Documented range: 0 or more. - acceleratorOptions.cacheStartStepPercentage (integer, optional) — Percentage of steps to start caching. Alternative to `cacheStartStep`. Must be less than `cacheEndStepPercentage`. Documented range: 0 to 99. - acceleratorOptions.teaCache (boolean, optional) — TeaCache acceleration for transformer-based models. Estimates step differences to skip redundant computations. - acceleratorOptions.teaCacheDistance (number, optional, default: 0.5) — Controls the aggressiveness of the TeaCache feature. Lower values prioritize quality, higher values prioritize speed. Documented range: 0 to 1. - acceleratorOptions.dbCache (boolean, optional) — DB Cache (CacheDiT) acceleration. Caches and reuses intermediate transformer block outputs to skip redundant computations. - acceleratorOptions.dbCacheThreshold (number, optional, default: 0.25) — Controls the sensitivity threshold for DB Cache. Lower values reuse cached blocks more aggressively, higher values prioritize quality. Documented range: 0 to 1. - acceleratorOptions.dbCacheSkipInterval (integer, optional, default: 5) — Controls how many steps to skip between cache refreshes. Higher values skip more steps for faster generation at the cost of quality. Documented range: 1 or more. - lora[].model (string, optional) — LoRA model identifier. - lora[].weight (number, optional, default: 1) — Strength of the LoRA influence. A value of 0 means no influence. Higher values increase the influence, and negative values can be used to steer away from the LoRA's style. Documented range: -4 to 4. - outputType (string, optional, default: "URL", one of: "URL") — Image output type. - outputFormat (string, optional, default: "JPG", one of: "JPG", "PNG", "WEBP") — Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities. - \`JPG\`: Best for photorealistic images with smaller file sizes (no transparency). - \`PNG\`: Lossless compression, supports high quality and transparency (alpha channel). - \`WEBP\`: Modern format providing superior compression and transparency support. - \`MP4\`: Widely supported video container (H.264), recommended for general use. - \`WEBM\`: Optimized for web delivery. - \`MOV\`: QuickTime format, common in professional workflows (Apple ecosystem). - \`GIF\`: Animated image format (no audio), suitable for short loops or previews. - \`MP3\`: Compressed audio, smaller file size. - \`WAV\`: Uncompressed, high-quality audio. - \`FLAC\`: Lossless compression. - \`OGG\`: Open-source compressed audio format (Vorbis codec). - \`SVG\`: Scalable Vector Graphics. - \`TIFF\`: High-quality output supporting layers. - \`GLB\`: Binary glTF format for 3D models, including geometry, textures, and PBR materials. > [!NOTE] > \*\*Transparency\*\*: If you are using features like background removal or LayerDiffuse that require transparency, you must select a format that supports an alpha channel (e.g., \`PNG\`, \`WEBP\`, \`TIFF\`). \`JPG\` does not support transparency. - outputQuality (integer, optional, default: 95) — Compression quality of the output. Higher values preserve quality but increase file size. Documented range: 20 to 99. - safety.checkContent (boolean, optional) — Enable or disable content safety checking. Increases total generation time. Always on: a false is sent as true. - advancedFeatures.watermark.text (string, optional) — Watermark text. Documented range: 2 to 32 characters. - advancedFeatures.watermark.image (url, optional) — Watermark image (an http(s) URL; upload a local file first and send its read URL). - advancedFeatures.watermark.displayPosition (string, optional, one of: "top-left", "top-center", "top-right", "center-left", "center-center", "center-right", "bottom-left", "bottom-center", "bottom-right", "tiled") — Watermark position. - advancedFeatures.watermark.opacity (number, optional) — Watermark opacity. Documented range: 0.1 to 1. - advancedFeatures.watermark.fontColor (string, optional) — Text color in hex format. - advancedFeatures.watermark.bgColor (string, optional) — Background color in hex format. - idempotency_key (string, optional) — Your own name for this request. Send the same one twice and the second call is answered with the first request rather than charged again. `Idempotency-Key:` as a header is accepted as an alias — that is the spelling a retrying proxy replays, and the one to use when running a model on `auray.run`, where a request that outlives its connection is answered 504 and recovered by replay. Omit it and the platform mints one. ## Rules Across fields, as the model's documentation states them; judged before any charge, and warned (Deprecation) until enforcement starts. - Send `height` whenever `width` is sent. Send `width` whenever `height` is sent. - Do not send `acceleration` together with `acceleratorOptions`. - Do not send `acceleratorOptions.cacheStartStep` and `acceleratorOptions.cacheStartStepPercentage` together. Do not send `acceleratorOptions.cacheEndStep` and `acceleratorOptions.cacheEndStepPercentage` together. Do not send a request where `acceleratorOptions.teaCache` is true and `acceleratorOptions.dbCache` is true. - `lora` must hold at least 1 item. In every item of `lora`: `lora[].model` is required. - When `advancedFeatures.watermark` is sent: send exactly one of `advancedFeatures.watermark.text` or `advancedFeatures.watermark.image`. ## Response A submit answers the status document (`status`: IN_QUEUE, IN_PROGRESS or COMPLETED; `request_id`; `queue_position` while queued; `logs`; `metrics`) and then, beside it: - product (string) — Which of this platform's products ran it. - provider_job_id (string) — The id the job runs under, once it has been handed to its model — possibly while still `queued`; null before. Quote it to support. - model (string) — The address that ran it, echoed back. - engine (string) — The service's own name for the model that ran, where it reports one — a catalogue model's is its `id` on GET /v1/models; null otherwise. What `model` carried before it carried the address. - attribution (string) — The credit line the model's licence requires you to show; null where none is required. - credits_charged (integer) — What this job cost. 0 on a replay, or when a pass or a promotion paid for it (`coverage` says which). - credits_quoted (integer) — What this job costs, in credits: the price it was quoted at submit. Equal to `credits_charged` once it has been charged; while it waits in the queue to start, `credits_charged` is 0 and this is what it will be charged when it starts (a cancel before then costs nothing) — and a replay of a job still waiting quotes the body that job was queued with, which is the one it runs, not the replay's. For a catalogue model it is the hold, and the settle may give part of it back — a settled read's `credits_charged` says what it finally cost. - coverage (object) — Present when a pass or a promotion paid for this job — `{"by": "pass", "pass": "seedance-2-5"}` or `{"by": "promotion"}`, and `credits_charged` is 0 — or when you hold a pass for this model that did not cover this job: `{"by": null, "miss": {"pass": "video", "why": "door"}}`, `why` being `door` (the pass does not work here) or `shape` (it does not cover this kind of job). Absent otherwise. Send `X-Auray-Covered-Only: 1` to run a job only if a pass or a promotion pays for it. - credits_remaining (integer) — The balance after it. - expected_seconds (integer) — A rough render time, for a progress bar; 0 where nothing is published. - give_up_after_seconds (integer) — The longest this job may take from its submit: the longest it may wait to start (your X-Auray-Request-Timeout, or the product's queue deadline) plus the longest it may run before it is stopped and refunded. Waiting longer is waiting for nothing; the official clients wait this long by default. For a catalogue model the part it may run is its own reap as its registry row states it (`lifecycle.stall_ceiling_seconds` on GET /v1/models); otherwise these are the published limits: we may lengthen them during an incident, never shorten them. - replayed (boolean) — `true` when your `idempotency_key` matched a job this platform already had. Nothing was charged and nothing was rendered twice. - waited (boolean) — Present when `wait` was asked for. The rest of this group comes with it. - timed_out (boolean) — The wait ran out before the job settled. Still a 2xx, never a 408 or 504 — a library that retries on those would resubmit and you would pay twice. Poll `status_url`. - wait_declined (string) — No seat was free to hold the connection with, so the request was answered at once. `platform_busy`: no product would have helped. `product_busy`: another product's queue might. `account_busy`: you are already waiting on every seat your plan's lanes allow. The job is running either way; poll it. - status_url (string) — Poll this. - response_url (string) — Fetch the result from this once the status is COMPLETED. - cancel_url (string) — `PUT` to this to ask for a cancellation. Poll `status_url`, fetch `response_url` once COMPLETED, `PUT` `cancel_url` to stop it. ## Price Price: Credits per megapixel (counted as `width*height*steps@4`): 0.1344 for acceleration=none; acceleration=low; acceleration=medium; acceleration=high. From 1.0486 to 52.4288 megapixels a request. Quoted when you submit, at the most the request can cost; the charge settles to what the job cost and never above the quote. ## Paths POST https://queue.auray.run/auray-serverless/bfl-flux-2-klein-9b-kv Run auray-serverless/bfl-flux-2-klein-9b-kv GET https://queue.auray.run/auray-serverless/bfl-flux-2-klein-9b-kv/requests/{request_id} The result GET https://queue.auray.run/auray-serverless/bfl-flux-2-klein-9b-kv/requests/{request_id}/status The status PUT https://queue.auray.run/auray-serverless/bfl-flux-2-klein-9b-kv/requests/{request_id}/cancel Ask for a cancellation ## Example ```bash curl -X POST https://queue.auray.run/auray-serverless/bfl-flux-2-klein-9b-kv \ -H 'Authorization: Bearer auray_sk_…' \ -H 'Content-Type: application/json' \ -d '{"positivePrompt":"a brass orrery on a walnut desk, morning light from a window to the left","width":1024,"height":1024}' ``` ## Full contract https://api.auray.ai/v1/models/auray-serverless/bfl-flux-2-klein-9b-kv/openapi.json