API reference · BFL
bfl/flux-general/rf-inversion
Integrate this model through SandBase's unified API, with production-ready schemas and examples.
Production endpoint
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
POST
https://api.sandbase.ai/v1/runModel ID
bfl/flux-general/rf-inversion01
Input Schema
28 parameters · 2 required · 26 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
image | string | Required | URL of image to be edited |
prompt | string | Required | The prompt to edit the image with |
seed | integer | Optional | The same seed and the same prompt given to the same version of the model will output the same image every time. |
loras | array | Optional | Default: [] |
nag_end | number | Optional | The proportion of steps to apply NAG. After the specified proportion of steps has been iterated, the remaining steps will use original attention processors in FLUX. · Max: 1 · Default: 0.25 |
nag_tau | number | Optional | The tau for NAG. Controls the normalization of the hidden state. Higher values will result in a less aggressive normalization, but may also lead to unexpected changes with respect to the original image. Not recommended to change this value. · Default: 2.5 |
max_shift | number | Optional | Max shift for the scheduled timesteps · Min: 0.01 · Max: 5 · Default: 1.15 |
nag_alpha | number | Optional | The alpha value for NAG. This value is used as a final weighting factor for steering the normalized guidance (positive and negative prompts) in the direction of the positive prompt. Higher values will result in less steering on the normalized guidance where lower values will result in considering the positive prompt guidance more. · Max: 1 · Default: 0.25 |
nag_scale | number | Optional | The scale for NAG. Higher values will result in a image that is more distant to the negative prompt. · Max: 10 · Default: 3 |
base_shift | number | Optional | Base shift for the scheduled timesteps · Min: 0.01 · Max: 5 · Default: 0.5 |
fill_image | string | Optional | Use an image input to influence the generation. Can be used to fill images in masked areas. |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 21:916:93:24:35:41:14:53:42:39:16 |
easycontrols | object[] | Optional | EasyControl Inputs to use for image generation. · Default: [] |
control_loras | object[] | Optional | The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs and they will be merged together to generate the final image. · Default: [] |
output_format | string | Optional | The format of the generated image. · Options: jpeg, png · Default: "png" jpegpng |
reference_end | number | Optional | The percentage of the total timesteps when the reference guidance is to be ended. · Min: 0 · Max: 1 · Default: 1 |
guidance_scale | number | Optional | Min: 0 · Max: 20 · Default: 3.5 |
sigma_schedule | string | Optional | Sigmas schedule for the denoising process. |
reference_start | number | Optional | The percentage of the total timesteps when the reference guidance is to bestarted. · Min: 0 · Max: 1 · Default: 0 |
use_beta_schedule | boolean | Optional | Specifies whether beta sigmas ought to be used. · Default: false |
reference_strength | number | Optional | Strength of reference_only generation. Only used if a reference image is provided. · Min: -3 · Max: 3 · Default: 0.65 |
num_inference_steps | integer | Optional | Min: 1 · Max: 50 · Default: 28 |
reference_image_url | string | Optional | URL of Image for Reference-Only |
reverse_guidance_end | integer | Optional | Timestep to stop guidance during reverse process. · Default: 8 |
reverse_guidance_start | integer | Optional | Timestep to start guidance during reverse process. · Default: 0 |
reverse_guidance_schedule | string | Optional | Scheduler for applying reverse guidance. · Options: constant, linear_increase, linear_decrease · Default: "constant" constantlinear_increaselinear_decrease |
controller_guidance_forward | number | Optional | The controller guidance (gamma) used in the creation of structured noise. · Min: 0.01 · Max: 3 · Default: 0.6 |
controller_guidance_reverse | number | Optional | The controller guidance (eta) used in the denoising process.Using values closer to 1 will result in an image closer to input. · Min: 0.01 · Max: 3 · Default: 0.75 |
02
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
03
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "bfl/flux-general/rf-inversion",
"image": "https://static.sandbase.ai/examples/bfl/flux-general/rf-inversion/input_image_0.png",
"loras": [],
"prompt": "Wearing glasses",
"nag_end": 0.25,
"nag_tau": 2.5,
"max_shift": 1.15,
"nag_alpha": 0.25,
"nag_scale": 3,
"base_shift": 0.5,
"easycontrols": [],
"control_loras": [],
"output_format": "png",
"reference_end": 1,
"guidance_scale": 3.5,
"reference_start": 0,
"use_beta_schedule": false,
"reference_strength": 0.65,
"num_inference_steps": 28,
"reverse_guidance_end": 8,
"reverse_guidance_start": 0,
"reverse_guidance_schedule": "constant",
"controller_guidance_forward": 0.6,
"controller_guidance_reverse": 0.75
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"
