# flowpx API guide

Your own system sends an image to a flow shared with your organization, or to one of our tools, gets a run id at once, and then waits for the finished image, asks for it, or is told by a signed webhook. Every answer says what the run cost and what is left on your balance. Each tool below shows its price; the plans and a price list per tool are on our pricing page: https://www.flowpx.io/en/pricing.

Base URL: `https://www.flowpx.io/api/v1`. Your flows, with calls ready to copy: [your Settings page](https://www.flowpx.io/account). New here, or an AI agent? Start with [Flows: start from a template](#templates), then pick tools under [Tools](#tools): each section says which tool to start with.

## Your API key

Every call carries your own API key: `Authorization: Bearer fpx_…`. Each member of your organization has their own, on their Settings page; regenerating it makes a new one and stops the old one at once. A run started with a key belongs to the key's owner: only their own key reads it (a teammate's key gets `not_found`), and it is paid from the organization's balance. A key stops as soon as we learn its owner has left the organization (Clerk tells us within seconds), so run a production integration on a member kept for it (for example an "api@" address of your company), not on a person's own account. Keep the key on your server: never in a browser or an app. The examples read it from `FLOWPX_API_KEY`.

```bash
export FLOWPX_API_KEY=fpx_…
curl https://www.flowpx.io/api/v1/flows -H "Authorization: Bearer $FLOWPX_API_KEY"
```

`GET /api/v1/flows` lists your flows (those you built in the app, those a teammate shared with you, and those we shared with your organization) with their images, settings and `upToUsd`: the most one run is expected to cost you (for a flow built in the app or a template, also the cap a run gets unless you set `maxCostUsd`). A typical run costs less: the app's cards and the templates below say "about". Our templates are not in it: they are open to every organization, with their ids under [Flows: start from a template](#templates) and as JSON in `GET /api/v1/templates`, in the same shape. It is free, so it is also a quick check that your key works.

`GET /api/v1/tools` lists every tool as JSON, by section with which tool to start with: its images, every setting with its type, choices, range and default, and its price for your organization. `GET /api/v1/tools/<id>` gives one tool, with what it can do and what it is best at. Both are free and say the same as [Tools](#tools).

**With an AI agent** (Claude Code, Codex, Cursor): put the key in the environment yourself, in your terminal or your project's `.env` file, and let the agent read `$FLOWPX_API_KEY`. Never paste the key into a prompt or a chat: whatever is in the conversation can end up in logs and transcripts. If a key was pasted somewhere, regenerate it on the Settings page.

## Use with AI agents (MCP)

AI agents such as Claude Code, Cursor and Codex can use flowpx directly over MCP: list the tools, run one and get the result, without reading this guide. The server is `https://www.flowpx.io/api/mcp` and takes the same key. Put the key in your environment first (`export FLOWPX_API_KEY=fpx_…`, in your terminal or shell profile); each setup below reads it from there, so it is never written in a file.

**Claude Code**, in your project's `.mcp.json`:

```json
{
  "mcpServers": {
    "flowpx": {
      "type": "http",
      "url": "https://www.flowpx.io/api/mcp",
      "headers": { "Authorization": "Bearer ${FLOWPX_API_KEY}" }
    }
  }
}
```

**Cursor**, in `~/.cursor/mcp.json` (or `.cursor/mcp.json` in your project):

```json
{
  "mcpServers": {
    "flowpx": {
      "url": "https://www.flowpx.io/api/mcp",
      "headers": { "Authorization": "Bearer ${env:FLOWPX_API_KEY}" }
    }
  }
}
```

**Codex**, in `~/.codex/config.toml`:

```toml
[mcp_servers.flowpx]
url = "https://www.flowpx.io/api/mcp"
bearer_token_env_var = "FLOWPX_API_KEY"
tool_timeout_sec = 120
```

**Claude on the web (claude.ai)**: Settings → Connectors (Plugins) → Add → Add custom connector. Name `flowpx`, URL
`https://www.flowpx.io/api/mcp`, Continue. Under Authentication choose **No sign-in** (Claude marks "Sign in now" as detected:
ignore it), then under Request headers add `authorization` with the value `Bearer fpx_…` (the word Bearer, a space, your
key), check that No sign-in is still chosen, and Add. The connector shows Connected with the flowpx tools. Request headers
are a Claude beta that not every account has yet; on a Team or Enterprise plan the owner adds the key once and everyone in
that Claude organization uses it, so their runs are the key owner's.

Then ask, for example: "Which flowpx tool removes a background best? Run it on ./photo.jpg and save the result." The tools: `list_tools` and `describe_tool` (every tool, its images, settings and price), `list_flows` (templates and your flows, each with its images, settings, price and steps; with `flow` set, one flow in full with every step's settings), `describe_flow`, `create_flow`, `update_flow` and `delete_flow` (build and change your own flows, below under [Build and change flows](#build); `delete_flow` asks you first), `run_tool` and `run_flow` (start a run and wait up to 45 seconds, so the answer comes before an agent's own 60-second limit for a call; each needs an `idempotencyKey`, so a call the agent sends again never runs or charges twice), `get_run` (a run that took longer) and `create_upload` (a link to send a local file to). They do exactly what the calls below do: the same checks, the same prices, the same `maxCostUsd` and balance, and a run belongs to the key's owner. Results come back as links that work for an hour. ChatGPT on the web needs a sign-in instead of a key, which flowpx does not offer yet.

## Start a run

`POST /api/v1/flows/<flow>/runs` runs a flow: one you built, one a teammate shared with you (the run is yours, and everyone it is shared with sees it in the flow), one we shared with your organization, or one of our templates (open to every organization). `POST /api/v1/tools/<tool>/runs` runs a single tool of our catalog the same way (every tool, its images and its settings are under [Tools](#tools); in the app, Use via API on a tool's quick start shows its calls). The images go under the flow's or tool's own input names, three ways:

- **A link:** JSON `{ "inputs": { "image": { "url": "https://…" } } }`. https only, up to 50 MB; we fetch it once.
- **A file in the call:** a multipart form, `-F image=@logo.png`, up to about 4 MB in all (settings as JSON fields: `-F 'params={…}'`).
- **A bigger file:** `POST /api/v1/uploads` with `{ "contentType": "image/png" }` gives an `uploadUrl` to PUT the file to (up to 50 MB, 10 minutes) and its name; then `{ "inputs": { "image": { "upload": "uploads/…" } } }`. Uploads belong to your organization and are deleted after 30 days.

Also in the body: `params` (the flow's settings; one the flow leaves to each call, like a prompt, is required, and a tool's prompt is too), and, all optional, `maxCostUsd` (the most this run may be charged; by default five times its typical cost), `webhookUrl`, on a flow your organization built `version` (below) and, on a flow whose recipe is open to you, `stepParams` (below). Images: PNG, JPEG, WebP, AVIF or HEIC.

The answer comes at once: `202` with the run (`status: "queued"`). Keep its `id`.

To chain tools, start the next run with the finished run's `result.url` as its image link.

## Wait, or ask again

Add `?wait=60` (0 to 60 seconds) to the start call or to `GET /api/v1/runs/<id>`: the answer comes when the run has finished (`200`, `status` `"done"` or `"failed"`) or when the time is up (`202`, still running: ask again). So check the run's `status`, not only the HTTP status: a run that failed is a `200` with `status: "failed"` and the reason in `error`. A dropped connection loses nothing; the run goes on, and `GET /api/v1/runs/<id>` always has it. More than 60 is refused.

## Worked example

A flow with one image input, `image`. Put your flow's id in place of `your-flow-id`: your flow's own page under Settings has these calls ready, with its real inputs and settings. Some curl examples read the answer with `jq` (macOS: `brew install jq`; Debian or Ubuntu: `sudo apt install jq`); Send a file and wait needs none.

### Send a file and wait

The image in the call itself (up to about 4 MB), and the finished run in the answer when it takes less than a minute.

```bash
curl -X POST "https://www.flowpx.io/api/v1/flows/your-flow-id/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

```js
import { readFile } from 'node:fs/promises'

const form = new FormData()
form.append('image', new Blob([await readFile('image.png')], { type: 'image/png' }), 'image.png')

const res = await fetch('https://www.flowpx.io/api/v1/flows/your-flow-id/runs?wait=60', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.FLOWPX_API_KEY}` },
  body: form,
})
const run = await res.json()
if (!res.ok) throw new Error(`${run.code}: ${run.error}`)
// 200: finished (done or failed). 202: still running after 60 s; ask GET /api/v1/runs/<id> later.
console.log(res.status, run.status, run.result?.url, 'cost', res.headers.get('x-cost'))
```

```py
import os
import requests

res = requests.post(
    "https://www.flowpx.io/api/v1/flows/your-flow-id/runs?wait=60",
    headers={"Authorization": f"Bearer {os.environ['FLOWPX_API_KEY']}"},
    files={"image": ("image.png", open("image.png", "rb"), "image/png")},
    timeout=90,
)
run = res.json()
if not res.ok:
    raise RuntimeError(f"{run['code']}: {run['error']}")
# 200: finished (done or failed). 202: still running after 60 s; ask GET /api/v1/runs/<id> later.
print(res.status_code, run["status"], (run["result"] or {}).get("url"), "cost", res.headers["X-Cost"])
```

### Send a link, then ask for the run

An https link to the image. The answer comes at once with the run’s id; ask for the run until it has finished.

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/flows/your-flow-id/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

```js
const headers = { Authorization: `Bearer ${process.env.FLOWPX_API_KEY}`, 'Content-Type': 'application/json' }

const started = await fetch('https://www.flowpx.io/api/v1/flows/your-flow-id/runs', {
  method: 'POST',
  headers,
  body: JSON.stringify({
    "inputs": {
      "image": {
        "url": "https://example.com/image.png"
      }
    }
  }),
})
let run = await started.json()
if (!started.ok) throw new Error(`${run.code}: ${run.error}`)

// Each call waits up to 60 s for the run to finish.
while (run.status === 'queued' || run.status === 'running') {
  const res = await fetch(`https://www.flowpx.io/api/v1/runs/${run.id}?wait=60`, { headers })
  run = await res.json()
  if (!res.ok) throw new Error(`${run.code}: ${run.error}`)
}
console.log(run.status, run.result?.url, 'cost', run.costUsd)
```

```py
import os
import requests

headers = {"Authorization": f"Bearer {os.environ['FLOWPX_API_KEY']}"}

res = requests.post("https://www.flowpx.io/api/v1/flows/your-flow-id/runs", headers=headers, json={
    "inputs": {
        "image": {
            "url": "https://example.com/image.png"
        }
    }
}, timeout=30)
run = res.json()
if not res.ok:
    raise RuntimeError(f"{run['code']}: {run['error']}")

# Each call waits up to 60 s for the run to finish.
while run["status"] in ("queued", "running"):
    res = requests.get(f"https://www.flowpx.io/api/v1/runs/{run['id']}?wait=60", headers=headers, timeout=90)
    run = res.json()
    if not res.ok:
        raise RuntimeError(f"{run['code']}: {run['error']}")
print(run["status"], (run["result"] or {}).get("url"), "cost", run["costUsd"])
```

### Get a webhook when it is done

Your server is told when the run ends, with a signed POST. Check the signature with your webhook signing secret (see the API guide).

```bash
curl -X POST "https://www.flowpx.io/api/v1/flows/your-flow-id/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}},"webhookUrl":"https://your-server.example.com/flowpx-webhook"}'
# When the run ends, your address gets a signed POST: { "type": "run.finished", "run": { … } }
```

```js
const res = await fetch('https://www.flowpx.io/api/v1/flows/your-flow-id/runs', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.FLOWPX_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "inputs": {
      "image": {
        "url": "https://example.com/image.png"
      }
    },
    "webhookUrl": "https://your-server.example.com/flowpx-webhook"
  }),
})
const run = await res.json()
if (!res.ok) throw new Error(`${run.code}: ${run.error}`)
console.log('started', run.id) // keep the id: the webhook names it, and GET /api/v1/runs/<id> always has the result
```

```py
import os
import requests

res = requests.post(
    "https://www.flowpx.io/api/v1/flows/your-flow-id/runs",
    headers={"Authorization": f"Bearer {os.environ['FLOWPX_API_KEY']}"},
    json={
        "inputs": {
            "image": {
                "url": "https://example.com/image.png"
            }
        },
        "webhookUrl": "https://your-server.example.com/flowpx-webhook"
    },
    timeout=30,
)
run = res.json()
if not res.ok:
    raise RuntimeError(f"{run['code']}: {run['error']}")
print("started", run["id"])  # keep the id: the webhook names it, and GET /api/v1/runs/<id> always has the result
```

### A bigger file (up to 50 MB)

```bash
# 1. Ask for an upload link (it works for 10 minutes)
UPLOAD=$(curl -s -X POST "https://www.flowpx.io/api/v1/uploads" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contentType": "image/png"}')

# 2. Send the file straight to storage (up to 50 MB)
curl -sS -o /dev/null -w "upload: %{http_code}\n" -X PUT "$(echo "$UPLOAD" | jq -r .uploadUrl)" \
  -H "Content-Type: image/png" --data-binary @big.png

# 3. Start the run with it
curl -X POST "https://www.flowpx.io/api/v1/flows/your-flow-id/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$(echo "$UPLOAD" | jq '{inputs: {"image": {upload: .upload}}}')"
```

## The run

The same shape in `GET /api/v1/runs/<id>`, a `?wait=` answer and the webhook. `status` is `"queued"`, `"running"`, `"done"` or `"failed"`: a finished run is `"done"` (not `succeeded`). `result.url` is the finished image, a link that works for an hour (`expiresAt`); every GET gives a fresh one. `result.files` lists every file the result made, that one first: a step that gives several (layers, several versions, a ZIP of masks) adds the others there. Check each file's `contentType`: an extra file is not always an image (`application/zip`). Files are kept 30 days: after that a run has `filesDeleted: true` and no result, so save what you want to keep. A run of a flow your organization built has `version`, the version it ran. `costUsd` is what the run was charged (while it runs, what it has cost so far), `maxCostUsd` the most it may be charged, both in what you pay. `steps` shows each step with its status (a step that did not need to run is `skipped`, with why), cost and time; a tool's run has one step, the tool. A model may answer in another format than you expect (WebP where you expected PNG): read each file's `contentType`, which its name ending matches, or add Convert File Format (`format-converter`) for a fixed one. A failed run has `error` in plain words and `errorCode` to act on: `refused` (an input or its content was refused, by our checks before anything was paid, by the step itself (e.g. a cut-out step given an image without a transparent background) or by the model's content filter; change the input. The words say why, except in a flow whose recipe is not shared with you, where they name only the step), `max_cost` (raise `maxCostUsd`), `stopped` (a flow ended itself on purpose, e.g. because a check found the image unusable; also `stopped: true`) or `internal` (our fault: the words have the run id, tell us). A run that has not failed has `errorCode: null`. When a step searched Google (Web search or Image search on Nano Banana), the run has `googleSearch`: `suggestions`, Google's search suggestions as HTML, and the `queries` it ran. Google's terms ask you to show the suggestions, unchanged, to whoever sees that result: put the HTML in a sandboxed iframe (`srcdoc`, without allow-scripts or allow-same-origin), never in your page through innerHTML.

```json
{
  "id": "0b9d3c1e-5f0a-4c55-9a51-2f1f7e3a8c11",
  "flow": "your-flow-id",
  "status": "done",
  "error": null,
  "errorCode": null,
  "createdAt": "2026-10-20T09:12:03.120Z",
  "finishedAt": "2026-10-20T09:12:41.870Z",
  "costUsd": 0.0187,
  "maxCostUsd": 0.5,
  "result": {
    "url": "https://…/result.png?…",
    "contentType": "image/png",
    "expiresAt": "2026-10-20T10:13:02.000Z",
    "fields": {},
    "files": [
      {
        "url": "https://…/result.png?…",
        "contentType": "image/png",
        "expiresAt": "2026-10-20T10:13:02.000Z"
      }
    ]
  },
  "steps": [
    {
      "id": "check",
      "label": "Check the image",
      "status": "done",
      "costUsd": 0.0021,
      "ms": 3120,
      "reason": null
    },
    {
      "id": "clean-up",
      "label": "Clean it up",
      "status": "done",
      "costUsd": 0.0021,
      "ms": 3120,
      "reason": null
    },
    {
      "id": "enlarge",
      "label": "Enlarge it",
      "status": "skipped",
      "costUsd": 0,
      "ms": null,
      "reason": "not needed for this image (decided by step \"check\")"
    }
  ]
}
```

## Webhooks

Start a run with `webhookUrl` (https, up to 2,048 characters) and your server gets a POST when it ends: `{ "type": "run.finished", "run": { … } }`. Answer with any 2xx within 10 seconds. Without one, we try again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours (6 attempts in all), then stop. Redirects are not followed. The run itself is never affected: `GET /api/v1/runs/<id>` always has its result.

Every webhook is signed in the Standard Webhooks format, with your organization's **webhook signing secret** (`whsec_…`, one for the whole organization, shown on the Settings page to every member; an admin can regenerate it, which stops the old one at once). The headers: `webhook-id` (the same on every attempt: drop repeats you have seen), `webhook-timestamp` and `webhook-signature`. Check the signature against the raw body before you trust it, with the `standardwebhooks` library (npm, PyPI) or these few lines:

### JavaScript (Node)

```js
import { createHmac, timingSafeEqual } from 'node:crypto'

// secret: your webhook signing secret (whsec_…) from your Settings page.
// headers: the request's headers; body: the request's raw body as text.
export function verifyWebhook(secret, headers, body) {
  const id = headers['webhook-id']
  const timestamp = headers['webhook-timestamp']
  const signatures = headers['webhook-signature']
  if (!id || !timestamp || !signatures) return false
  // Older than 5 minutes: refuse it, so a captured webhook cannot be sent again later.
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false
  const key = Buffer.from(secret.replace(/^whsec_/, ''), 'base64')
  const expected = createHmac('sha256', key).update(`${id}.${timestamp}.${body}`).digest()
  return signatures.split(' ').some((signature) => {
    const [version, value] = signature.split(',')
    const given = Buffer.from(value ?? '', 'base64')
    return version === 'v1' && given.length === expected.length && timingSafeEqual(given, expected)
  })
}
```

### Python

```py
import base64
import hashlib
import hmac
import time


def verify_webhook(secret: str, headers, body: bytes) -> bool:
    """secret: your webhook signing secret (whsec_...); headers: the request's headers; body: its raw bytes."""
    msg_id = headers.get("webhook-id")
    timestamp = headers.get("webhook-timestamp")
    signatures = headers.get("webhook-signature")
    if not (msg_id and timestamp and signatures):
        return False
    # Older than 5 minutes: refuse it, so a captured webhook cannot be sent again later.
    if abs(time.time() - int(timestamp)) > 300:
        return False
    key = base64.b64decode(secret.removeprefix("whsec_"))
    expected = hmac.new(key, f"{msg_id}.{timestamp}.".encode() + body, hashlib.sha256).digest()
    for signature in signatures.split(" "):
        version, _, value = signature.partition(",")
        try:
            given = base64.b64decode(value)
        except ValueError:
            continue
        if version == "v1" and hmac.compare_digest(given, expected):
            return True
    return False
```

## Flows whose recipe is open to you

Most flows we build for you keep their recipe to us: you see each step's name, status, cost and time. A flow agreed to be yours is shared with its recipe open: its page, `GET /api/v1/flows` and each run also show every step's tool, model and settings, and a run may change any step's settings: `"stepParams": { "<step>": { "<setting>": … } }` (a fallback is `<step>:fallback`). Unknown steps or settings are refused. On other flows, `stepParams` is refused.

## Your flow's versions

A flow your organization builds in the app gets a new version each time it is changed and then run there (version 1, 2, 3, …). A flow that has never run can be called at once: the first call runs it as it is saved in the app and fixes that as its first version (if it cannot run yet, the call gives `flow_not_ready` with what to fix). Then pin the `version` that run's answer shows (`GET /api/v1/flows` and `list_flows` list every version in `versions`). After that, a call runs its latest version unless it names one: `"version": 3` in the body (`-F version=3` in a form) runs exactly version 3, however the flow changes later, and `"version": "draft"` runs the flow as it is saved now and makes that its latest version (see [Build and change flows](#build)). The calls in a flow's Use via API are pinned to its latest version, so a change in the app never changes what your integration runs until you move it to a newer version. `GET /api/v1/flows` lists each of your flows with its latest `version` and all its `versions`; a flow that has never run is listed as it is saved, with `version: null`, and only once it can run. A version that does not exist gives `unknown_version` (404).

## Errors

Always JSON: `{ "error": "what went wrong, in plain words", "code": "…" }`. Act on the `code`; the words may improve.

| code | Status | Means |
|---|---|---|
| `missing_key` | 401 | No Authorization header. |
| `invalid_key` | 401 | The key is wrong, or it was regenerated (the old one stops at once). The message shows how the key you sent starts, to compare with your Settings page. |
| `bad_request` | 400 | Something in the call is wrong: the message says what. |
| `insufficient_balance` | 402 | The balance does not cover the most this run may cost, or, without credit, this month's 20 free runs are used. Top up on your Settings page. |
| `no_organization` | 403 | The organization is not set up yet: open your Settings page once. |
| `read_only` | 403 | Only the person who made this flow can change or delete it or run its draft (a flow shared with you, or a template): `create_flow` with its draft makes your own copy. |
| `conflict` | 409 | Someone saved the flow after the `revision` you sent: read it again and apply your change to the new draft. |
| `not_found` | 404 | No such flow or tool for your key's owner, or no such run of theirs (another organization's, a teammate's private flow and a teammate's run look the same). |
| `flow_not_ready` | 400 | Your flow cannot run yet: the message says what to fix in the app. |
| `unknown_version` | 404 | Your flow has no such version: the message names its latest. |
| `payload_too_large` | 413 | The call is larger than 4.5 MB: send big files through an upload link. A call that creates or changes a flow takes at most 64 KB. |
| `too_many_runs` | 429 | Your organization's runs at once (1 on Free, 10 on Team, 25 on Enterprise, unless agreed otherwise) are all going. Try again when one has finished. |
| `daily_limit` | 429 | This run would take your organization past its daily limit ($50 a day unless agreed otherwise). It starts again at midnight UTC; write to hello@flowpx.io for a higher limit. |
| `internal` | 500 | Our fault. The message has a request id (and the run id, if a run exists): tell us. |

## Headers, costs and balance

Every answer to a valid key has `X-Cost` (what this run was charged, or has cost so far; 0 for an answer without a run) and `X-Balance-Remaining`, plus `X-Request-Id`. A 401 has no organization, so no cost headers. A run is charged for everything it ran (every step and every paid attempt, failed ones too), from your prepaid balance, when it ends, and never more than its `maxCostUsd`. Before each paid step we work out what it may cost with the settings it runs with; a step that could take the run past `maxCostUsd` is not started, and the run fails with an error that says so (raise `maxCostUsd` and run it again). A run starts only when your balance, less what your running runs may still cost, covers its `maxCostUsd`.

## Limits

Your organization's plan sets the first one: Free ($0), Team ($149 a month) or Enterprise (from $499 a month, agreed with us). What you pay for a plan becomes balance to run for 12 months. An admin changes the plan under Settings → Plan in the app; prices: https://www.flowpx.io/en/pricing.

- Runs at once per organization: 1 on Free, 10 on Team, 25 on Enterprise, unless agreed otherwise (more gives 429).
- Without credit: 20 free runs per calendar month (UTC).
- $50 a day per organization unless agreed otherwise, in what you pay: what today's runs (UTC) were charged plus what your running runs may still cost. A run that would pass it is refused with `daily_limit` (free runs never are), and runs already going finish.
- 50 MB per image; about 4 MB per call (Vercel takes at most 4.5 MB per request).
- Wait at most 60 seconds per call; result links work for 1 hour.
- Uploads and results are deleted after 30 days.
- maxCostUsd has an upper limit per run; a higher one is refused with the highest allowed.
- 200 flows per person; a call that creates or changes a flow takes at most 64 KB.

## Sending a call twice

Add an `Idempotency-Key` header (any text up to 255 characters, e.g. your own order id) to a start call. The same Idempotency-Key from the same person (the API key's owner) within 24 hours returns the same run instead of starting, and charging, a second one (a teammate's call with the same Idempotency-Key starts their own run). So a call that timed out can safely be sent again.

## Versions

`/api/v1/` only grows: new fields, new endpoints, new error codes. Ignore fields you do not know. Anything that would break your code comes as `/api/v2/`, announced in advance.

## Build and change flows

Set up a flow you run again and again (cut-out, shadow, square, 1000 px on every catalog photo) without opening the app. The flow is yours and private, exactly as if you had made it in the app, and it opens there like any other flow. These calls are free: only a run costs money.

| Call | MCP tool | What it does |
|---|---|---|
| `GET /api/v1/flows/<id>` | `describe_flow` | One of your flows, one shared with you, or a template, as a draft: `draft`, `revision` (null on a template), `problems`, the `inputs` and `params` a run of the draft takes, `version` (what a call without a version runs; null until it has run), `versions` and `editable` |
| `POST /api/v1/flows` | `create_flow` | `{ "draft": … }` makes a new flow: `201` with its `id`, `name`, `revision` and `problems` |
| `PUT /api/v1/flows/<id>` | `update_flow` | `{ "revision": 3, "draft": … }` replaces the draft: answers the new `revision`, `problems` and `version`: the version a call without a version runs now, which saving does not change (`"version": "draft"` runs the new draft) |
| `DELETE /api/v1/flows/<id>` | `delete_flow` | Deletes it: `{ "id": …, "deleted": true }`. Its runs stay |

**The draft.** The easiest start is `describe_flow` on the template closest to the job: change its draft and send it to `create_flow`. In full:

- `name`: up to 120 characters.
- `inputs`: up to 4, each `{ "name": "image", "label": "Product photo", "kind": "image" }`. Names are `image`, `image_2`, … (`video`, `video_2`, … for a video).
- `steps`: up to 30, each `{ "id": "s1", "tool": "<tool id>", "images": { … }, "params": { … } }`. Ids are `s1`, `s2`, …; a step you add on `update_flow` takes the next number, never a removed step's id (that is refused, naming the id to use). `images` gives each of the tool's image names (under [Tools](#tools), or `describe_tool`) an input name or an earlier step's id. `params` sets the tool's settings by name; one left out takes its default. `label` is optional: a step is named after its tool.
- `apiParams`, optional on a step: `{ "<setting>": "<parameter name>" }` makes that setting a parameter each run may send in `params`. Each parameter name is unique in the flow (and not an input's name), so one name drives exactly one setting: for width and height, use two names. `"apiParams": { "width": "size" }` on a Resize Image step means a run sends `"params": { "size": 800 }`; left out, the step's own value is used.

- **Conditions** (a step that sends each image down its own path): a step with the tool `condition` is a Condition. Its `type` (`gemini`, `background`, `transparency`, `resolution`, `quality`) decides what it looks at, and its answers are exits: `"<step id>:<answer>"`, with the answer as the Condition gives it (`Transparent`, `Solid` or `Photo` for `background`; `Yes` or `No` for `transparency`; `High` or `Low` for `resolution` and `quality`; or one of the answers you wrote for `gemini`). A step that reads an exit (`"images": { "image": "s1:No" }`) gets the image that came into the Condition, untouched, and runs only on that answer; the steps after it on that path read it as usual. Where paths meet again, give a list (`"image": ["s2", "s1:Yes"]`): the step takes the image from the path that ran, and an exit in the list hands on the untouched image for an answer whose path has no step. Two exits of the same Condition in one list run the step on either answer; exits of two different Conditions in one list, as "A or B", are refused. Once one answer of a Condition has a step, every other answer needs one too, or must be in a join; an answer left without is a draft problem (in the app: "the path … leads nowhere"). A Condition no step reads is a result itself, to see what it answers. A path that ends on its own is a result of its own, missing from the run when that path was not taken, and the run's `steps` show each step not taken as `skipped`.

`layout` (the boxes' places on the canvas, which `describe_flow` shows) is optional: leave it out. A box without a place is placed when the flow opens in the app, and `update_flow` without `layout` keeps the places someone arranged there. Anything else is refused with `bad_request` and words that name the step and field ("step s2: Resize Image has no setting widht"). A draft that is not finished yet (an image not chosen, an empty prompt) is saved: `problems` lists what stops it from running, in plain words, and is empty once it can run.

```json
{
  "name": "Catalog: cut-out, shadow, 1000 px square",
  "inputs": [{ "name": "image", "label": "Product photo", "kind": "image" }],
  "steps": [
    { "id": "s1", "tool": "recraft-remove-background", "images": { "image": "image" }, "params": {} },
    { "id": "s2", "tool": "add-shadow", "images": { "image": "s1" }, "params": {} },
    { "id": "s3", "tool": "smart-crop", "images": { "image": "s2" }, "params": { "format": "square" } },
    { "id": "s4", "tool": "resize-image", "images": { "image": "s3" }, "params": { "width": 1000, "height": 1000, "fit": "cover" } }
  ]
}
```

With a Condition: cut-outs skip the background removal, the rest go through it, and both are squared.

```json
{
  "name": "Catalog: cut out only what needs it",
  "inputs": [{ "name": "image", "label": "Product photo", "kind": "image" }],
  "steps": [
    { "id": "s1", "tool": "condition", "images": { "image": "image" }, "params": { "type": "transparency" } },
    { "id": "s2", "tool": "recraft-remove-background", "images": { "image": "s1:No" }, "params": {} },
    { "id": "s3", "tool": "smart-crop", "images": { "image": ["s2", "s1:Yes"] }, "params": { "format": "square" } }
  ]
}
```

**Changing it.** `describe_flow`, change the draft, and send it back with the `revision` you read. If someone saved the flow since (a person in the app, or another call), the call gives `conflict` (409): read it again and apply your change to the new draft. Rename a flow by changing `draft.name`; copy one with `describe_flow` and `create_flow`. Only the person who made a flow changes or deletes it or runs its draft: on a flow shared with you, and on a template, the call gives `read_only` (403). Sharing a flow with your team is done in the app. Each person keeps at most 200 flows.

**Saving never changes what your integration runs.** A call without a `version` runs the version that last ran, and a pinned `version` runs that version forever. To run your changed draft, start a run with `"version": "draft"`: it runs the saved draft, fixes it as a new version and, as a Run in the app does, makes it the version calls without a `version` run from then on. A flow that has never run needs no `version`: its first run runs its draft.

## Flows: start from a template

Our templates are tested recipes, a good start for what most shops need, and open to every organization. Run one in a single call, as it is: `POST /api/v1/flows/<template id>/runs` with its images (`GET /api/v1/flows` does not list them: the ids are below). For a product in a lifestyle scene, start with `template-lifestyle`: one product photo, and AI makes the scene around it (to write your own prompt, run its first step, `gpt-image-2-5-sunburst`, on its own). When the product must stay exactly as photographed (labels, text, shape), use `template-products-scene` instead: your own scene and a product photo, cut out and placed, never redrawn by AI. To change a template, or to build your own flow, read the template closest to the job first: its steps below show which tool each step runs, with which settings, and which step's result it gets, for example a lifestyle scene into a product video, or placing the real product into a scene without AI redrawing it. Use them as a guide, not a rule, and combine tools as you like. To run your own chain in one call, make it a flow: `describe_flow` on a template gives its draft to change and send to `create_flow` ([Build and change flows](#build)); a flow saved in the app runs in one call too (its Use via API shows the call). Or chain tools yourself: start each step as its own run with the previous run's `result.url` as its image, and let a check's `result.fields` decide what runs next. A template runs exactly as below: it takes no `params` and no `stepParams` (to change a step's settings, run its tool on its own). Each step has an id (`s1`, `s3`, …), the one the run's `steps` show. The price is about what one run costs at our standard prices; the run's `costUsd` says what it really cost.

### Lifestyle image from a product photo (`template-lifestyle`)

Your product in a scene you describe. Images: `image`. About $0.03 a run.

1. Step `s1`: `gpt-image-2-5-sunburst`: `image` ← your `image`, settings `{"prompt":"Place the product from the image in a bright, natural lifestyle scene that suits it, in soft daylight. Keep the product exactly as it is: its shape, colours, materials, text and every detail.","quality":"medium","background":"auto","moderation":"low"}`
2. Step `s3`: `format-converter`: `image` ← step `s1`, settings `{"format":"webp","quality":85,"max_size":1200}`

### Product video from a photo (`template-product-video`)

Your product in a scene and close up, as video. Images: `image`. About $1.21 a run (a video).

1. Step `s1`: `gpt-image-2-5-sunburst`: `image` ← your `image`, settings `{"size":"1024x1024","prompt":"Place the product from the image in a premium lifestyle setting that naturally fits the product, as a square photo with depth: the product sharp in the middle ground, something from the setting softly blurred in the near foreground, and the space behind the product softly out of focus. Leave generous space above the product so the setting feels spacious. Beautiful natural light with soft shadows, shot like a premium advertising photo. Keep the product exactly as it is: its shape, colours, materials, text, logo and every detail.","quality":"medium","background":"auto","moderation":"low"}`
2. Step `s2`: `gpt-image-2-5-sunburst`: `image` ← step `s1`, `image_reference` ← your `image`, settings `{"size":"1024x1024","prompt":"A close-up photo from this exact scene: the camera is close to the product shown in the second image, so a part of it, its material, texture and details, fills most of the square frame, with the rest of the scene softly blurred behind it. Same light, shadows and colours as the scene. Keep the product exactly as in the second image: its shape, colours, materials, texture and every detail. Photorealistic.","quality":"medium","background":"auto","moderation":"low"}`
3. Step `s3`: `minimax-h3`: `first_frame_image` ← step `s1`, settings `{"prompt":"The camera trucks sideways past the product in its setting, about one metre over the whole clip, at one steady pace from the first frame to the last. Wide lens, verticals stay straight. The light and the shadows stay fixed to the scene; only the camera moves. The product keeps its exact shape, colour, material and texture. Photorealistic, one continuous shot, no cuts.","duration":4,"resolution":"768P","ratio":"1:1"}`
4. Step `s4`: `minimax-h3`: `first_frame_image` ← step `s2`, settings `{"prompt":"The camera trucks sideways along the product, close to it, in the same direction, about thirty centimetres over the whole clip, at one steady pace from the first frame to the last. Wide lens, verticals stay straight. The light and the shadows stay fixed to the scene; only the camera moves. The product keeps its exact shape, colour, material and texture. Photorealistic, one continuous shot, no cuts.","duration":4,"resolution":"768P","ratio":"1:1"}`
5. Step `s5`: `join-videos`: `image` ← step `s3`, `image_2` ← step `s4`, settings `{"transition":"cut","clip_seconds":"4","remove_sound":true}`

### Hero image (`template-hero`)

Your product as a clean hero picture, never redrawn. Images: `image`, `image_2`, `image_3`. About $0.01 a run.

1. Step `s1`: `recraft-remove-background`: `image` ← your `image`
2. Step `s2`: `combine-images`: `image` ← step `s1`, `background` ← your `image_2`, `badge` ← your `image_3`, settings `{"placement":"manual","enhance_with_ai":false,"aspect_ratio":"1:1","badge_place":"left","badge_size":45,"shadow":"medium","light":"left"}`

### Product banner (`template-banner`)

Your product on a banner with a headline. Images: `image`, `image_2`, `image_3`. About $0.01 a run.

1. Step `s1`: `recraft-remove-background`: `image` ← your `image`
2. Step `s2`: `make-banner`: `image` ← step `s1`, `logo` ← your `image_2`, `background` ← your `image_3`, settings `{"headline":true,"text":"ICE COLD | 24 HOURS | **€39** €29","font":"barlow-semi-condensed-extrabold-italic","text_color":"#1E3A2B","layout":"text-right","aspect_ratio":"9:16","emphasis":"strikethrough","mark_weight":"bold","emphasis_color":"#E4572E","arrow":"curved","arrow_weight":"bold","band":"bottom","band_color":"#1E3A2B","shadow":"soft","light":"right"}`

### Reframe to a new format (`template-reframe`)

Your image in a new shape. Images: `image`. About $0.03 a run.

1. Step `s1`: `gpt-image-2-5-sunburst`: `image` ← your `image`, settings `{"size":"1536x1024","prompt":"Recompose this image into the new format. Keep the product exactly as it is, whole and uncropped, with its shape, colours, text and every detail. Extend the background naturally on every side so it fills the frame, matching its light and surfaces.","quality":"medium","background":"auto","moderation":"low"}`
2. Step `s3`: `format-converter`: `image` ← step `s1`, settings `{"format":"webp","quality":85,"max_size":1200}`

### Match your site’s format (`template-site-format`)

Every product image in your site’s format. Images: `image`. About $0.03 a run.

1. Step `s1`: `condition`: `image` ← your `image`, settings `{"type":"background"}`
2. Step `s2`: `bria-remove-background`: `image` ← step `s1`, answer Solid
3. Step `s3`: `smart-crop`: `image` ← step `s1`, answer Transparent or step `s2`, settings `{"format":"square","subject_scale":80,"background":"transparent"}`
4. Step `s4`: `gemini-find-and-crop`: `image` ← step `s1`, answer Photo, settings `{"prompt":"This photo is from an online store. Find the product the photo shows.","format":"square","margin":12,"if_no_fit":"border","border_color":"#ffffff","keep_people":true}`
5. Step `s5`: `resize-image`: `image` ← step `s3` or step `s4`, settings `{"width":1000,"height":1000,"fit":"cover"}`
6. Step `s6`: `format-converter`: `image` ← step `s5`, settings `{"format":"webp","quality":85,"max_size":0}`

### Products in a scene, untouched by AI (`template-products-scene`)

Your product in a scene, never redrawn. Images: `image_2`, `image`. About $0.15 a run.

1. Step `s3`: `recraft-remove-background`: `image` ← your `image_2`
2. Step `s1`: `add-product-to-lifestyle-image`: `scene` ← your `image`, `image_2` ← step `s3`
3. Step `s2`: `format-converter`: `image` ← step `s1`, settings `{"format":"webp","quality":85,"max_size":0}`

### Change color from a sample (`template-color`)

The same product in the colour of a sample. Images: `image`, `image_2`. About $0.03 a run.

1. Step `s1`: `gpt-image-2-5-sunburst`: `image` ← your `image`, `image_reference` ← your `image_2`, settings `{"prompt":"Change the colour of the product in image 1 to the colour of the sample in image 2. Keep its shape, materials, texture, text and every other detail exactly as they are. Plain white background.","quality":"medium","background":"auto","moderation":"low"}`
2. Step `s3`: `format-converter`: `image` ← step `s1`, settings `{"format":"webp","quality":85,"max_size":1200}`

## Tools

Every tool below runs on its own with `POST /api/v1/tools/<id>/runs`: send its images under the names shown (PNG, JPEG, WebP, AVIF or HEIC, also another run's `result.url`) and any of its settings in `params` (left out, a setting takes its default; where a text says what blank does (Auto, Use original, No limit …), leave the setting out). Where a setting shows a recommended value (`recommendedValue` in the JSON), that is flowpx's tested choice for e-commerce images and what a new step in the app starts at; the default is what a call that leaves it out gets, so set the recommended value to get the app's result (Trim Transparent Background's `subject_scale`: default `0`, recommended `75`). A tool's price is for its recommended values: a dearer default (GPT Image 2.5's `quality` `auto`) can cost more, and `priceDependsOn` names the settings that change it. Each section starts with which tool to pick first, and each tool's **Best at** says when it is the right one. **Kind** says whether a tool is an AI model or a script that gives the same result every time. The price is about what one run costs at our standard prices; the run's `costUsd` says what it really cost. The same as JSON: `GET /api/v1/tools`, or one tool with `GET /api/v1/tools/<id>`.

### Generate or edit images

Start with **GPT Image 2.5** (`gpt-image-2-5-sunburst`): ranked #1 on Arena.ai, and good at edits that must keep shape and text. If the result is not right, try **Nano Banana Pro** (`nano-banana-pro`) as a second model. For speed and a lower price, **Nano Banana 2.1** (`nano-banana-2-1`). For a natural, photographic new setting, **Seedream 5 Pro** (`seedream-5-pro`) (slow). **Flux 2 Pro** (`flux-2-pro`) is another fast choice. To change only one area and keep the rest exactly, use an inpainting tool: it repaints only the white area of a mask you send with the image (make the mask with the tools under Create and use masks). Use **Flux Fill Pro** (`flux-fill-pro`) (the image and its mask) when you can describe the change in words, or **Nano Banana Pro Inpaint** (`nb-pro-inpaint`) (the image, its mask and a reference image) when you have a reference image to follow. If the product's text and proportions must stay exact, use the tools under Create product images untouched by AI instead.

#### GPT Image 2.5 (`gpt-image-2-5-sunburst`)

Creates or edits images from a description. #1 on Arena.ai for images and edits: a great first choice. About $0.029 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Create an image from a text description
- Edit an image the way you describe it
- Use extra images as references
- Give a transparent background (a cut-out)
- Make up to 10 versions at once, to pick from

**Best at:** Clean edits where shape and text must stay the same, such as tidying a graphic or cutting out a product. Colors can shift slightly, so follow it with Correct Colors when exact colors matter. To change exactly one area and keep the rest as it was, use Flux Fill Pro or Nano Banana Pro Inpaint with a mask. Editing with a reference image costs a little more than creating from text.

**Images:**

- `image`: The image to change. Leave it empty to create a new image from the prompt.
- `image_reference`: Optional: a second image to use, for example a style or a material to follow.
- `image_3` to `image_16`: up to 14 more images.

**Settings** (in `params`):

- `prompt` (string; up to 4000 characters; required): What you want, in words. When editing, say what must stay the same as clearly as what should change.
- `background` (string; one of `auto`, `transparent`, `opaque`; default `auto`): "transparent" gives a cut-out with no background (needs png or webp). "opaque" always fills the background. "auto" lets the model decide.
- `quality` (string; one of `auto`, `low`, `medium`, `high`, `xhigh`, `max`; default `auto`; recommended `medium`): Higher quality gives finer detail, takes longer and costs more.
- `size` (string; one of `auto`, `1024x1024`, `1536x1024`, `1024x1536`, `1536x864`, `864x1536`, `1280x960`, `960x1280`, `1280x1024`, `1024x1280`, `1680x720`; default `auto`): The size of the result in pixels. "auto" follows the shape of your image.
- `output_format` (string; one of `png`, `jpeg`, `webp`; default `png`): The file format of the result. Transparency needs png or webp.
- `output_compression` (integer; 0 to 100; default `100`): How much detail a jpeg or webp result keeps, from 0 to 100: 100 keeps the most, lower gives smaller files. Not used for png.
- `moderation` (string; one of `auto`, `low`; default `auto`; recommended `low`): How strict OpenAI's content check is, for new images and edits alike. "low" stops harmless images, like product photos, from being blocked by mistake.
- `n` (integer; 1 to 10; default `1`): How many versions to make from one prompt, up to 10, to pick the best. The first goes on to the next step; the others can be downloaded. Each version costs as one image.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/gpt-image-2-5-sunburst/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F 'params={"prompt":"your prompt"}'
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/gpt-image-2-5-sunburst/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}},"params":{"prompt":"your prompt"}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Nano Banana Pro (`nano-banana-pro`)

Creates or edits images from a description. Google's premium image model. About $0.18 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Create an image from a text description
- Edit an image the way you describe it
- Follow one or more reference images, such as a color or material sample
- Write readable text in images

**Best at:** Product variants where a color, pattern or material must follow a sample closely.

**Images:**

- `image`: The image to change ("image 1" in the prompt). Leave it empty to create a new image from the prompt.
- `image_reference`: Optional: a second image to follow, such as a style, material or product. In the prompt, refer to it as "image 2", e.g. "the pattern from image 2".
- `image_3` to `image_14`: up to 12 more images.

**Settings** (in `params`):

- `prompt` (string; up to 4000 characters; required): What you want, in words. Refer to your images as "image 1" and "image 2".
- `temperature` (number; 0 to 2): How much the model is allowed to vary. Low gives results that stay close to your images; high gives more surprising results.
- `top_k` (integer; 1 to 64): How many options the model chooses between at each step: only the most likely ones, up to this number. Lower means fewer options, so results are more consistent from run to run; higher gives more variety.
- `top_p` (number; 0 to 1): Like `top_k`, but counted by likelihood instead of by number: the model only chooses among the most likely options that together make up this share (0.95 = the top 95%). Lower means only the safest choices, so results are more consistent; higher gives more variety.
- `seed` (integer; 0 to 2147483647): A number that fixes the model's random start. The same seed, prompt and images give nearly the same result again.
- `thinking_level` (string; one of `low`, `high`): How long the model thinks before it draws. "high" (Google's default) can follow a complex prompt better but costs a little more (thinking is billed); "low" is faster and costs a little less.
- `aspect_ratio` (string; one of `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`): The shape of the result, as width:height. Use original keeps your image's shape; without an image the model chooses.
- `image_size` (string; one of `1K`, `2K`, `4K`; default `1K`; recommended `2K`): The size of the result. 1K and 2K cost the same; 4K costs almost twice as much.
- `safety_filter_level` (string; one of `BLOCK_LOW_AND_ABOVE`, `BLOCK_MEDIUM_AND_ABOVE`, `BLOCK_ONLY_HIGH`, `BLOCK_NONE`; recommended `BLOCK_ONLY_HIGH`): How strict Google's content filter is. A stricter filter can refuse harmless product images.
- `web_search` (boolean; default `false`): Lets the model look things up on Google before it draws, for what it cannot know by itself: a new product, a current event, the weather. Each search adds a small cost.
- `time_range_start` (string; up to 40 characters): When the model searches: only results from this moment on, written like 2026-10-01T00:00:00Z. Set `time_range_end` too.
- `time_range_end` (string; up to 40 characters): When the model searches: only results from before this moment, written like 2026-10-31T00:00:00Z. Set `time_range_start` too.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/nano-banana-pro/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F 'params={"prompt":"your prompt"}'
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/nano-banana-pro/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}},"params":{"prompt":"your prompt"}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Nano Banana Pro Inpaint (`nb-pro-inpaint`)

Repaints only the masked area of an image. Can follow a material or pattern sample. About $0.18 a run.

**Kind:** script with an AI step inside: the AI part can differ from run to run.

- Repaint only the masked area of a photo
- Apply a reference, such as a material or pattern sample
- Keep everything outside the mask exactly as it was

**Best at:** Changing one part of a product, such as its color or material, while everything else must stay the same. Set the shape to match the photo: a square shape adds borders to other photos. When the change can be described in words, Flux Fill Pro is another choice; for a freer edit of the whole image, GPT Image 2.5 Sunburst is usually best.

**Images:**

- `image` (required): The product photo.
- `image_mask` (required): A black-and-white image of the area to change: white is changed, black stays. Use the result of a mask step, such as SAM 3. Same size as the product photo.
- `image_reference`: Optional: a photo of the material, pattern or color to put on the white area, such as a fabric swatch.

**Settings** (in `params`):

- `prompt` (string; up to 4000 characters; default `Replace the highlighted area of the subject image. If a reference image is provided, apply that material/texture/colour; otherwise, follow the rest of this prompt. Match the subject's lighting, shadows, and surface direction. Keep the frame, background, and all other elements identical to the original.`): What the model should do, in words. Only the masked area can change.
- `negative_prompt` (string; up to 4000 characters; default ``): Things to avoid, added to the prompt.
- `aspect_ratio` (string; one of `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`): The shape of the result, as width:height. Use original keeps your mask's shape (the nearest of these shapes; the small difference is padded).
- `image_size` (string; one of `1K`, `2K`, `4K`; default `1K`; recommended `2K`): How much detail the model works at. The result keeps the mask's pixel size. 1K and 2K cost the same; 4K costs almost twice as much.
- `temperature` (number; 0 to 2; default `0.3`): How much the model is allowed to vary. Low gives results that stay close to your images; high gives more surprising results.
- `top_k` (integer; 1 to 64; default `64`): How many options the model chooses between at each step: only the most likely ones, up to this number. Lower means fewer options, so results are more consistent from run to run; higher gives more variety.
- `top_p` (number; 0 to 1; default `0.95`): Like `top_k`, but counted by likelihood instead of by number: the model only chooses among the most likely options that together make up this share (0.95 = the top 95%). Lower means only the safest choices, so results are more consistent; higher gives more variety.
- `max_output_tokens` (string; up to 8 characters; default ``): An upper limit on the model's answer; empty uses the model's own. Rarely needed.
- `safety_filter_level` (string; one of `BLOCK_LOW_AND_ABOVE`, `BLOCK_MEDIUM_AND_ABOVE`, `BLOCK_ONLY_HIGH`, `BLOCK_NONE`; default `BLOCK_ONLY_HIGH`): How strict Google's content filter is. A stricter filter can refuse harmless product images.
- `blend_strength` (number; 0 to 1; default `1`): How fully the new material replaces the old inside the mask: 1 is fully; below 1 mixes in some of the original photo.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/nb-pro-inpaint/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F image_mask=@image_mask.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/nb-pro-inpaint/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"},"image_mask":{"url":"https://example.com/image_mask.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Seedream 5 Pro (`seedream-5-pro`)

Creates or edits images from a description. ByteDance's top image model. About $0.059 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Create an image from a text description
- Place your product in a new setting, the way you describe it
- Follow a reference image, such as a style or a room
- Split an image into its parts, each as its own picture to download
- Remove the objects from an image and keep the empty background, filled in where they stood

**Best at:** Product photos in a new setting, such as a bag on a table in a bright room, with a natural, photographic look. It is slow: about 2 to 2.5 minutes per image.

**Images:**

- `image`: The image to change ("image 1" in the prompt). Leave it empty to create a new image from the prompt.
- `image_reference`: Optional: a second image to follow, such as a style, material or product. In the prompt, refer to it as "image 2", e.g. "the pattern from image 2".
- `image_3` to `image_10`: up to 8 more images.

**Settings** (in `params`):

- `prompt` (string; up to 4000 characters; required): What you want, in words. Refer to your images as "image 1" and "image 2".
- `size` (string; one of `1K`, `1.5K`, `2K`, `auto`; default `2K`; recommended `1K`): The size of the result. 1K is about 2 megapixels (1728 × 1152 for a landscape photo); 2K is larger and costs twice as much. 1.5K and auto (sized from your image) only work with `layer_decomposition`.
- `aspect_ratio` (string; one of `match_input_image`, `1:1`, `4:3`, `3:4`, `16:9`, `9:16`, `3:2`, `2:3`, `21:9`; default `match_input_image`): The shape of the result, as width:height.
- `output_format` (string; one of `png`, `jpeg`; default `png`): The file format of the result: png is exact and larger, jpeg is smaller.
- `layer_decomposition` (boolean; default `false`): Splits your image into its parts, such as the product, a vase or a lamp, each cut out as its own picture with a transparent background, plus the background with the parts removed. The background goes on to the next step; the parts can be downloaded. Takes one image; the prompt can name the parts to split out. Each part costs extra (at 1K, about half the price of an image), up to 17 in all.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/seedream-5-pro/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F 'params={"prompt":"your prompt"}'
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/seedream-5-pro/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}},"params":{"prompt":"your prompt"}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Nano Banana 2.1 (`nano-banana-2-1`)

Creates or edits images from a description. Fast, at about a third of Nano Banana Pro's price. About $0.052 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Create an image from a text description
- Edit an image the way you describe it
- Follow one or more reference images, such as a style or a material

**Best at:** Many images at a lower price, such as product photos in a new setting. For the closest match to a color or material sample, Nano Banana Pro is stronger.

**Images:**

- `image`: The image to change ("image 1" in the prompt). Leave it empty to create a new image from the prompt.
- `image_reference`: Optional: a second image to follow, such as a style, material or product. In the prompt, refer to it as "image 2", e.g. "the pattern from image 2".
- `image_3` to `image_14`: up to 12 more images.

**Settings** (in `params`):

- `prompt` (string; up to 4000 characters; required): What you want, in words. Refer to your images as "image 1" and "image 2".
- `temperature` (number; 0 to 2): How much the model is allowed to vary. Low gives results that stay close to your images; high gives more surprising results.
- `top_k` (integer; 1 to 64): How many options the model chooses between at each step: only the most likely ones, up to this number. Lower means fewer options, so results are more consistent from run to run; higher gives more variety.
- `top_p` (number; 0 to 1): Like `top_k`, but counted by likelihood instead of by number: the model only chooses among the most likely options that together make up this share (0.95 = the top 95%). Lower means only the safest choices, so results are more consistent; higher gives more variety.
- `seed` (integer; 0 to 2147483647): A number that fixes the model's random start. The same seed, prompt and images give nearly the same result again.
- `thinking_level` (string; one of `minimal`, `medium`, `high`; default `medium`): How long the model thinks before it draws. "high" can follow a complex prompt better but takes longer and costs a little more (thinking is billed); "minimal" is fastest.
- `media_resolution` (string; one of `MEDIA_RESOLUTION_LOW`, `MEDIA_RESOLUTION_MEDIUM`, `MEDIA_RESOLUTION_HIGH`): How much detail of your images the model reads. MEDIA_RESOLUTION_LOW reads each image with far less detail (70 instead of 1,120 tokens in a test), so many images cost a little less, but small details such as text on a label can be lost; MEDIUM and HIGH read more.
- `aspect_ratio` (string; one of `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`, `1:4`, `4:1`, `1:8`, `8:1`): The shape of the result, as width:height. Use original keeps your image's shape; without an image the model chooses.
- `image_size` (string; one of `1K`, `2K`, `4K`; default `1K`): The size of the result. Larger costs more: 2K about one and a half times the price of 1K, 4K about three times.
- `safety_filter_level` (string; one of `BLOCK_LOW_AND_ABOVE`, `BLOCK_MEDIUM_AND_ABOVE`, `BLOCK_ONLY_HIGH`, `BLOCK_NONE`; recommended `BLOCK_ONLY_HIGH`): How strict Google's content filter is. A stricter filter can refuse harmless product images.
- `web_search` (boolean; default `false`): Lets the model look things up on Google before it draws, for what it cannot know by itself: a new product, a current event, the weather. Each search adds a small cost.
- `image_search` (boolean; default `false`): Lets the model look up pictures on Google before it draws, for how a real thing looks: a product, a place, a building. It can be on with `web_search` or alone. Each search adds a small cost.
- `time_range_start` (string; up to 40 characters): When the model searches: only results from this moment on, written like 2026-10-01T00:00:00Z. Set `time_range_end` too.
- `time_range_end` (string; up to 40 characters): When the model searches: only results from before this moment, written like 2026-10-31T00:00:00Z. Set `time_range_start` too.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/nano-banana-2-1/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F 'params={"prompt":"your prompt"}'
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/nano-banana-2-1/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}},"params":{"prompt":"your prompt"}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Flux 2 Pro (`flux-2-pro`)

Creates or edits images from a description. Black Forest Labs' most advanced model, and fast. About $0.10 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Create an image from a text description
- Edit an image the way you describe it
- Follow a reference image, such as a style or a material
- Finish in seconds, not minutes

**Best at:** Fast edits and new settings for a product, in about 15 seconds. The price grows with the size of the images in and out.

**Images:**

- `image`: The image to change ("image 1" in the prompt). Leave it empty to create a new image from the prompt. A very large one is shrunk to 4 megapixels first, automatically.
- `image_reference`: Optional: a second image to follow, such as a style, material or product. In the prompt, refer to it as "image 2", e.g. "the pattern from image 2". A very large one is shrunk to 4 megapixels first.
- `image_3` to `image_8`: up to 6 more images.

**Settings** (in `params`):

- `prompt` (string; up to 4000 characters; required): What you want, in words. Refer to your images as "image 1" and "image 2".
- `aspect_ratio` (string; one of `match_input_image`, `custom`, `1:1`, `16:9`, `3:2`, `2:3`, `4:5`, `5:4`, `9:16`, `3:4`, `4:3`; default `1:1`): The shape of the result, as width:height. match_input_image keeps your image's shape; custom uses Width and Height instead.
- `resolution` (string; one of `match_input_image`, `0.5 MP`, `1 MP`, `2 MP`, `4 MP`; default `1 MP`): The size of the result in megapixels (1 MP is about 1000 × 1000). Larger costs more; the largest side is at most 2048 pixels, so 4 MP is only reached on a square. match_input_image keeps about the size of your image and works only with `aspect_ratio`: `match_input_image`; other shapes are refused before the run starts. Not used with `aspect_ratio`: `custom`.
- `width` (integer; 256 to 2048): The width of the result in pixels, from 256 to 2048, rounded to a multiple of 16. Used only when `aspect_ratio` is custom; set Height too.
- `height` (integer; 256 to 2048): The height of the result in pixels, from 256 to 2048, rounded to a multiple of 16. Used only when `aspect_ratio` is custom; set Width too.
- `output_format` (string; one of `webp`, `jpg`, `png`; default `webp`): The file format of the result: webp and jpg are small, png is exact and larger.
- `output_quality` (integer; 0 to 100; default `80`): How much detail a webp or jpg result keeps, from 0 to 100. Higher gives larger files. Not used for png.
- `seed` (integer): A number that fixes the model's random start. The same seed, prompt and images give nearly the same result again.
- `safety_tolerance` (integer; 1 to 5; default `2`): How strict the maker's content filter is: 1 is the strictest, higher lets more through. A stricter filter can refuse harmless product images.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/flux-2-pro/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F 'params={"prompt":"your prompt"}'
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/flux-2-pro/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}},"params":{"prompt":"your prompt"}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Flux Fill Pro (`flux-fill-pro`)

Repaints only the masked area of an image, the way you describe it. About $0.065 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Repaint only the masked area of a photo, the way you describe it
- Keep everything outside the mask as it was
- Blend the new area with the light and shadows around it
- Extend a photo outwards, to give a product more room around it

**Best at:** Changing one part of a product, such as the fabric of a seat, when you can describe the change in words. It takes no reference image: to follow a material or pattern sample, use Nano Banana Pro Inpaint. For a freer edit of the whole image, GPT Image 2.5 Sunburst is usually best.

**Images:**

- `image` (required): The photo to change.
- `mask`: A black-and-white image of the area to change: white is redrawn, black stays. Use the result of a mask step, such as SAM 3, the same size as the photo. Leave it empty when you use Outpaint.

**Settings** (in `params`):

- `prompt` (string; up to 4000 characters; required): What the masked area should become, in words. Only the masked area can change.
- `output_format` (string; one of `jpg`, `png`; default `jpg`; recommended `png`): The file format of the result: jpg is smaller, png is exact and larger.
- `outpaint` (string; one of `None`, `Zoom out 1.5x`, `Zoom out 2x`, `Make square`, `Left outpaint`, `Right outpaint`, `Top outpaint`, `Bottom outpaint`; default `None`): Extends the photo outwards instead of repainting the masked area, and the prompt describes what fills the new space. Zoom out 1.5x and 2x add space all around (the result is 1.5 or 2 times as wide and high), Make square adds space to make it square, and Left, Right, Top or Bottom outpaint add space on that side. The mask is not used. None repaints the masked area.
- `prompt_upsampling` (boolean; default `false`): Lets the model rewrite your prompt into a longer, more detailed one before it draws. Gives more varied, creative results, but follows your own words less exactly.
- `guidance` (number; 1.5 to 100; default `60`): How closely the result follows your prompt. Higher follows it more closely but can look less natural; lower gives the model more freedom.
- `steps` (integer; 15 to 50; default `50`): How many passes the model makes. More gives finer detail and takes longer; the price is the same.
- `seed` (integer): A number that fixes the model's random start. The same seed, prompt and images give nearly the same result again.
- `safety_tolerance` (integer; 1 to 6; default `2`): How strict the maker's content filter is: 1 is the strictest, higher lets more through. A stricter filter can refuse harmless product images.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/flux-fill-pro/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F 'params={"prompt":"your prompt"}'
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/flux-fill-pro/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}},"params":{"prompt":"your prompt"}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

### Create product images untouched by AI

An AI image generation tool (such as **GPT Image 2.5** (`gpt-image-2-5-sunburst`)) usually gives the more natural lifestyle picture, but it can change the product's text, label or proportions. Use the tools here when AI must not, or may not, redraw your products, or when every detail must be exactly right. Every tool here keeps your product exactly as photographed: AI never redraws it. A product banner or ad with a headline, from a product cut-out, in any aspect ratio: **Create Product Banner** (`make-banner`) (free; no AI, the text always spelled right). A packshot or hero picture without text (the product with up to three side items, a round badge beside it and a logo, on a colour or a background picture): **Create Hero Image** (`combine-images`) (free with Manual placement; optional AI placement or AI light, and every part keeps its own pixels). When your product images must never be redrawn by generative AI, use **Add Product to Lifestyle Image** (`add-product-to-lifestyle-image`): send a lifestyle scene and your product cut-outs. With `placement` `ai` (the default), AI arranges them like a product photographer, true to their real sizes, and the original product images go back on top; with `manual`, they stand side by side where you set them, the same in every picture, matching light, shadow and sharpness, and `enhance_with_ai` optionally redraws the scene around them, never the products themselves. Add Product to Lifestyle Image needs cut-outs: remove the background first.

#### Create Product Banner (`make-banner`)

A product banner from a product photo, with or without a headline, in any aspect ratio. Free.

**Kind:** script, no AI: the same result every time.

- Place a product on a background or a plain colour, with a natural shadow
- Add a headline beside, above or below the product, or in a solid bar, sized to fit, with marked words and an arrow
- Add a logo bar with your logo, and a side item (a scoop, a glass) beside the product
- Make the same banner in 9:16, 4:5, 1:1 or 16:9

**Best at:** The same banner for many products and formats: type the headline once, run a whole batch, and make each aspect ratio in its own step from the same product. The product must be a cut-out (transparent background): add a Remove Background step before it. Give a background picture (an empty studio, a wall and a table) or use a plain colour. Write the words to mark between double stars, like **27 G**, and use | for a new line. To make a background or a side item with AI first, use an AI image generation tool such as GPT Image 2.5. For a picture without text, with several side items or a round badge beside the product, use Create Hero Image.

**Images:**

- `image` (required): The product as a cut-out (transparent background).
- `background`: Optional: a background picture, such as an empty studio or a table against a wall. It fills the picture area, its bottom kept; without it, `background_color` is used.
- `logo`: Optional: your logo, best a PNG with a transparent background. It sits in the logo bar, or in the top left corner without one, with the picture below it. A square or tall logo is drawn as large as a wide one looks.
- `prop`: Optional: a second cut-out that stands beside the product on the same floor, such as a scoop, a glass or a bowl.

**Settings** (in `params`):

- `headline` (boolean; default `true`): A headline on the banner. Turn it off for a clean product banner: the headline's settings hide, and the product grows into the room.
- `text` (string; up to 300 characters; default ``): The words on the banner. A | or a new line starts a new line, like MORE PROTEIN | PER SERVING; words between double stars, like **27 G**, get the mark. It is drawn exactly as you type it: type capitals for a headline in capitals. Leave it empty, or turn Headline off, for a banner without text. Used only when `headline` is `true`; otherwise accepted and ignored.
- `text_size` (string; one of `auto`, `small`, `medium`, `large`; default `auto`): How big the headline is. Auto picks the size and splits a long headline into even lines. Small, medium and large keep your lines as you wrote them. The text always shrinks to fit. Used only when `headline` is `true`; otherwise accepted and ignored.
- `font` (string; one of `barlow-semi-condensed-extrabold-italic`, `barlow-condensed-bold-italic`, `inter`, `montserrat-extrabold`, `poppins-bold`, `bebas-neue`, `roboto-condensed-bold-italic`; default `barlow-semi-condensed-extrabold-italic`): The headline's font. All are free to use in ads. Used only when `headline` is `true`; otherwise accepted and ignored.
- `text_color` (string; up to 7 characters; default `#2C2F30`): The headline's colour, as a hex code like #2C2F30. On a colour it does not stand out on (a headline bar, a text background's colour or a plain background colour), the text turns white or near-black, whichever reads. Used only when `headline` is `true`; otherwise accepted and ignored.
- `letter_spacing` (number; -10 to 30; default `0`): Extra space between letters, as a share of the letter size in %: positive is airier, negative is tighter. Tighter never goes so far that two letters touch, so how tight a headline can get depends on its letters (often -2 to -6). Used only when `headline` is `true`; otherwise accepted and ignored.
- `line_height` (number; 1 to 2; default `1.2`): The space from one line to the next, as a multiple of the letter size; at least 1, so a mark under a line never touches the next line. Used only when `headline` is `true`; otherwise accepted and ignored.
- `layout` (string; one of `text-right`, `text-left`, `text-above`, `text-below`, `bar-top`, `bar-bottom`; default `text-right`): Where the headline goes. Beside the product, the product stands to one side and the text in a column next to it; above or below, the product stands in the middle and grows smaller if the text needs the room. In a top or bottom bar, the headline sits in a solid bar across the banner and the product fills the picture beside it; the logo then goes to the other edge, never in the headline bar, and there is no arrow. Used only when `headline` is `true`; otherwise accepted and ignored.
- `headline_bar_color` (string; up to 7 characters; default `#000000`): The headline bar's colour, as a hex code. Used only when the headline is in a bar. Used only when `layout` is `bar-top` or `bar-bottom`; otherwise accepted and ignored.
- `headline_bar_height` (number; 0 to 58; default `0`): The headline bar's height, as % of the banner's height; the headline grows as large as fits in it. Auto: as tall as the headline needs, at least 12 and at most 35. Used only when the headline is in a bar. The logo never goes in this bar. Used only when `layout` is `bar-top` or `bar-bottom`; otherwise accepted and ignored.
- `headline_align` (string; one of `center`, `left`, `right`; default `center`): Where the headline lines up in its bar. Used only when the headline is in a bar. Used only when `layout` is `bar-top` or `bar-bottom`; otherwise accepted and ignored.
- `headline_margin` (number; 0 to 20; default `0`): How far the headline keeps from the bar's sides, as % of the banner's width. Auto: the same margin as the product, 5 % of the width. Used only when the headline is in a bar. Used only when `layout` is `bar-top` or `bar-bottom`; otherwise accepted and ignored.
- `aspect_ratio` (string; one of `9:16`, `4:5`, `1:1`, `16:9`; default `9:16`): The banner's shape and size. For several aspect ratios of the same banner, add one Create Product Banner step per aspect ratio from the same product.
- `emphasis` (string; one of `swoosh`, `underline`, `marker`, `circle`, `strikethrough`, `box`, `color`, `none`; default `none`): How the words between double stars stand out, hand-drawn: a swoosh or underline under them, a marker block behind them, a circle or box around them, a line through them (an old price), or just another colour. A circle suits a single word or a price best. Used only when `headline` is `true`; otherwise accepted and ignored.
- `mark_weight` (string; one of `thin`, `regular`, `bold`, `heavy`; default `regular`): How thick the mark's pen strokes are: the swoosh, underline, circle, box and marker. Used only when `emphasis` is not `none` or `color`; otherwise accepted and ignored.
- `emphasis_color` (string; up to 7 characters; default `#EEE65A`): The mark's colour, as a hex code. Pick one that stands out against what is behind it: a yellow mark vanishes on a yellow background or bar. Used only when `emphasis` is not `none`; otherwise accepted and ignored.
- `arrow` (string; one of `none`, `curved`; default `none`): A hand-drawn curved arrow from the headline to the product. Used only when `layout` is not `bar-top` or `bar-bottom`; otherwise accepted and ignored.
- `arrow_weight` (string; one of `thin`, `regular`, `bold`, `heavy`; default `regular`): How thick the arrow's line and head are. Used only when `arrow` is not `none`; otherwise accepted and ignored.
- `arrow_color` (string; up to 7 characters): The arrow's colour, as a hex code. Pick one that stands out against what is behind it: a yellow arrow vanishes on a yellow background. Used only when `arrow` is not `none`; otherwise accepted and ignored.
- `text_backdrop` (string; one of `none`, `cloud`, `block`; default `none`): A soft cloud or a solid block behind the headline, so it reads on a busy background or one close to the text's colour. Used only when `layout` is not `bar-top` or `bar-bottom`; otherwise accepted and ignored.
- `cloud_strength` (number; 0 to 100; default `0`): How much the cloud covers what lies behind the headline, in % (5 to 100). Auto picks what makes the text read against what lies under it, and the cloud is always clearly visible. A number is the same on every background. Used only when `text_backdrop` is `cloud`; otherwise accepted and ignored.
- `cloud_size` (string; one of `cover`, `small`, `medium`, `large`; default `medium`): How far the cloud behind the headline reaches. Cover text hugs it tightly. Small, medium and large are a soft glow centred on it that blends into the picture, from about twice to about four times its size. Used only when `text_backdrop` is `cloud`; otherwise accepted and ignored.
- `backdrop_color` (string; up to 7 characters): The cloud's or block's colour. Auto: dark behind light text, light behind dark text. Used only when `text_backdrop` is not `none`; otherwise accepted and ignored.
- `background_color` (string; up to 7 characters; default `#ECECEA`): The background when no background picture is given, as a hex code. Used only without `background`; otherwise accepted and ignored.
- `band` (string; one of `none`, `bottom`, `top`; default `none`): A solid bar across the bottom or the top, for your logo. The picture fills the rest. With the headline in a bar, the logo bar goes to the other edge, whichever you pick here.
- `band_color` (string; up to 7 characters; default `#000000`): The logo bar's colour, as a hex code. Used only when `band` is not `none`; otherwise accepted and ignored.
- `band_height` (number; 0 to 50; default `0`): The logo bar's height, as % of the banner's height. Auto: 25 in 9:16, 20 in 4:5 and 1:1, 24 in 16:9, so the picture above it has a standard shape (3:4, 1:1, 5:4, 21:9) that a background made with AI can match exactly; 12 when the headline is in a bar, so the two bars leave room for the picture. Used only when `band` is not `none`; otherwise accepted and ignored.
- `logo_backdrop` (string; one of `none`, `cloud`; default `none`): A soft cloud behind the logo, the same as the headline's, so the logo reads on a background close to its colour or on a busy picture. In a logo bar the bar is the background, and no cloud is drawn. Its colour and strength are set under it. Used only when `logo` is given; otherwise accepted and ignored.
- `logo_backdrop_color` (string; up to 7 characters): The colour of the cloud behind the logo, as a hex code. Auto: dark behind a light logo, light behind a dark one. Used only when `logo_backdrop` is `cloud`; otherwise accepted and ignored.
- `logo_cloud_strength` (number; 0 to 100; default `0`): How much the cloud covers what lies behind the logo, in % (5 to 100). Auto picks what makes the logo read against what lies under it, and the cloud is always clearly visible. A number is the same on every background. Used only when `logo_backdrop` is `cloud`; otherwise accepted and ignored.
- `logo_cloud_size` (string; one of `cover`, `small`, `medium`, `large`; default `medium`): How far the cloud behind the logo reaches. Cover logo hugs it tightly. Small, medium and large are a soft glow centred on it that blends into the picture, from about twice to about four times its size; it is cut off at the edge of the banner. Used only when `logo_backdrop` is `cloud`; otherwise accepted and ignored.
- `logo_position` (string; one of `auto`, `top-left`, `top-center`, `top-right`, `bottom-left`, `bottom-center`, `bottom-right`; default `auto`): Where the logo goes. With a logo bar, the logo always sits in the bar, centred top to bottom, and left, center or right picks its place there. Without one, it goes in that corner or edge and the product and headline keep clear of it. With the headline in a bar, the logo goes to the other edge (top becomes bottom, or the other way round). Auto: the middle of the logo bar, or the top left corner without one. Used only when `logo` is given; otherwise accepted and ignored.
- `logo_size` (number; 0 to 100; default `0`): How wide the logo is, as % of the banner's width; a square or tall logo is drawn as large as a wide one of that width looks. Auto: the same size with or without a logo bar, fitted to the bar. In a logo bar it never grows taller than the bar. Used only when `logo` is given; otherwise accepted and ignored.
- `logo_margin` (number; 0 to 20; default `0`): How far the logo sits from the edges it is placed against, as % of the banner's width: from the top (or bottom) and the side without a logo bar, from the side in one. The product and headline still keep clear of the logo. Auto: the same margin as the product and headline, 5 % of the width at the side. Used only when `logo` is given; otherwise accepted and ignored.
- `prop_size` (number; 5 to 100; default `32`): How tall the side item is, as % of the product's height. Beside the text it stays below the arrow, so it can come out smaller. Used only when `prop` is given; otherwise accepted and ignored.
- `shadow` (string; one of `none`, `soft`, `medium`, `strong`; default `medium`): The shadow under the product and the side item, drawn from their outline and falling straight away from the light: soft, medium or strong.
- `light` (string; one of `left`, `right`, `front`; default `right`): Where the light comes from: the shadow falls the other way. front: a soft shadow right under the product. Used only when `shadow` is not `none`; otherwise accepted and ignored.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/make-banner/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/make-banner/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Create Hero Image (`combine-images`)

Your product, side items, badge and logo on one background. Free without AI; the product is never redrawn.

**Kind:** script with an AI step inside: the AI part can differ from run to run.

- Place up to three side items beside, in front of or behind a product
- Add a badge and a logo, never redrawn by AI
- Let AI arrange the parts or add light and shadows; every part keeps its own pixels
- Make it in 1:1, 4:5, 9:16, 16:9, 3:2 or 2:3

**Best at:** The same packshot for a whole catalog. The product and side items must be cut-outs: add a Remove Background step first. For a headline, use Create Product Banner; for a photo of a real scene, Add Product to Lifestyle Image.

**Images:**

- `image` (required): The product as a cut-out (transparent background).
- `item_2`: Optional: a cut-out, such as a glass or a scoop.
- `item_3`: Optional: a cut-out.
- `item_4`: Optional: a cut-out.
- `badge`: Optional: a round claim such as "Lab tested", best a transparent PNG. Upload it in a colour that stands out beside your product.
- `logo`: Optional: your logo, in a corner.
- `background`: Optional: a background picture, such as an empty studio or an AI scene; without it, `background_color`.

**Settings** (in `params`):

- `aspect_ratio` (string; one of `1:1`, `4:5`, `9:16`, `16:9`, `3:2`, `2:3`; default `1:1`): The picture's shape and size; one step per aspect ratio.
- `placement` (string; one of `manual`, `ai`; default `manual`): Manual: you set where each side item and the badge go and how big; free, the same every time. AI: GPT Image 2.5 places and sizes them, with your own images; if it cannot place every part, the run stops, and the AI call is still charged. Used only when `item_2` is given; otherwise accepted and ignored.
- `placement_prompt` (string; up to 1000 characters; default ``): Blank: our built-in instruction arranges the parts. Add a few words only to steer it, such as "the glass in front on the right". Used only when `placement` is `ai`; otherwise accepted and ignored.
- `item_2_place` (string; one of `left-front`, `right-front`, `left`, `right`, `left-behind`, `right-behind`; default `left-front`): Where it stands on the floor. In front: a little lower, over the product's edge. Beside: next to it. Behind: a little higher, in a row so every label shows. Items on one side line up outward by number. Used only when `placement` is `manual` and `item_2` is given; otherwise accepted and ignored.
- `item_2_size` (number; 5 to 150; default `40`): Its height as % of the product's: 100 is as tall, 50 half as tall. Used only when `placement` is `manual` and `item_2` is given; otherwise accepted and ignored.
- `item_2_horizontal` (number; -50 to 50; default `0`): Moves side item 1 right (+) or left (−), in % of the product's height. 0: where our rules place it. Used only when `placement` is `manual` and `item_2` is given; otherwise accepted and ignored.
- `item_2_vertical` (number; -50 to 50; default `0`): Moves it up (+, further back) or down (−, nearer), in % of the product's height; it stays on the floor. Used only when `placement` is `manual` and `item_2` is given; otherwise accepted and ignored.
- `item_3_place` (string; one of `left-front`, `right-front`, `left`, `right`, `left-behind`, `right-behind`; default `right-front`): Works as for `item_2_place`. Used only when `placement` is `manual` and `item_3` is given; otherwise accepted and ignored.
- `item_3_size` (number; 5 to 150; default `40`): Works as for `item_2_size`. Used only when `placement` is `manual` and `item_3` is given; otherwise accepted and ignored.
- `item_3_horizontal` (number; -50 to 50; default `0`): Works as for `item_2_horizontal`. Used only when `placement` is `manual` and `item_3` is given; otherwise accepted and ignored.
- `item_3_vertical` (number; -50 to 50; default `0`): Works as for `item_2_vertical`. Used only when `placement` is `manual` and `item_3` is given; otherwise accepted and ignored.
- `item_4_place` (string; one of `left-front`, `right-front`, `left`, `right`, `left-behind`, `right-behind`; default `right`): Works as for `item_2_place`. Used only when `placement` is `manual` and `item_4` is given; otherwise accepted and ignored.
- `item_4_size` (number; 5 to 150; default `40`): Works as for `item_2_size`. Used only when `placement` is `manual` and `item_4` is given; otherwise accepted and ignored.
- `item_4_horizontal` (number; -50 to 50; default `0`): Works as for `item_2_horizontal`. Used only when `placement` is `manual` and `item_4` is given; otherwise accepted and ignored.
- `item_4_vertical` (number; -50 to 50; default `0`): Works as for `item_2_vertical`. Used only when `placement` is `manual` and `item_4` is given; otherwise accepted and ignored.
- `badge_place` (string; one of `left`, `right`, `top-left`, `top-right`; default `left`): Where the badge goes, never over a product: beside its upper part, or just outside its top corner. Used only when `badge` is given; otherwise accepted and ignored.
- `badge_horizontal` (number; -50 to 50; default `0`): Moves the badge right (+) or left (−), in % of the product's height. 0: where our rules place it. It never goes over a product: it stops at the nearest free spot. Used only when `badge` is given; otherwise accepted and ignored.
- `badge_vertical` (number; -50 to 50; default `0`): Moves the badge up (+) or down (−), in % of the product's height. Used only when `badge` is given; otherwise accepted and ignored.
- `badge_size` (number; 5 to 100; default `32`): How wide the badge is, as % of the product's height. Used only when `badge` is given; otherwise accepted and ignored.
- `logo_position` (string; one of `top-left`, `top-right`, `bottom-left`, `bottom-right`; default `top-left`): The logo's corner; the rest keeps clear of it. Used only when `logo` is given; otherwise accepted and ignored.
- `background_color` (string; up to 7 characters; default `#E6E7EA`): The background colour, as a hex code. Used only without `background`; otherwise accepted and ignored.
- `shadow` (string; one of `none`, `soft`, `medium`, `strong`; default `medium`): The drawn shadow under each part, falling away from the light; AI light builds on it.
- `light` (string; one of `left`, `right`, `front`; default `left`): Where the light comes from, for the drawn and the AI shadows: the shadow falls the other way.
- `enhance_with_ai` (boolean; default `false`): GPT Image 2.5 adds natural light and shadows; every part's own image goes back, so labels stay exact. Off: free, the drawn shadow.
- `enhance_prompt` (string; up to 4000 characters; default `Soft studio light. Dark contact shadows right under each product and soft longer shadows falling away from the light.`): What the AI may do for light and shadows; it always keeps the background and the products. Used only when `enhance_with_ai` is `true`; otherwise accepted and ignored.
- `keep_background` (boolean; default `true`): Keeps your background exact, with only the AI's shadows on it. Off: the AI's light on it too. Used only when `enhance_with_ai` is `true`; otherwise accepted and ignored.
- `quality` (string; one of `auto`, `low`, `medium`, `high`, `xhigh`, `max`; default `medium`): GPT Image 2.5's quality for the AI options: higher is finer, slower and dearer. With both AI options, at most medium.
- `moderation` (string; one of `auto`, `low`; default `low`): How strict OpenAI's content check is, for new images and edits alike. "low" stops harmless images, like product photos, from being blocked by mistake.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/combine-images/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/combine-images/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Add Product to Lifestyle Image (`add-product-to-lifestyle-image`)

AI turns your scene into a photo around your products, which stay exactly as photographed. About $0.13 a run.

**Kind:** script with an AI step inside: the AI part can differ from run to run.

- Let AI arrange up to ten products in a scene photo like a product photographer, true to their real sizes
- Or place them yourself side by side, with or without AI light and shadows
- Keep every product as photographed: labels and text are never redrawn

**Best at:** Lifestyle and campaign pictures of real products, where a changed label, text or shape is not acceptable: when AI must not, or may not, redraw the products, or every detail must be exactly right. Otherwise an AI image generation tool such as GPT Image 2.5 usually gives the more natural picture, but it can change text and proportions. The products must be cut-outs (transparent background): add a Remove Background step before it. Clear glass and see-through packaging may not come out exactly. Use a scene with an empty table, shelf or floor where the products go. Placement AI gives the most natural picture and costs the most; Manual is cheaper and the same every time, and free when you set the placement yourself with `enhance_with_ai` off. A product photographed from above can look odd beside the others with Placement AI. For a designed packshot on a plain colour or a background picture, with side items and a badge, use Create Hero Image.

**Images:**

- `scene` (required): The scene photo, with free space where the products stand, such as on a table or floor. The result has its size.
- `image_2` to `image_11`: One to ten products, as cut-outs (transparent background). With Placement Manual, they stand side by side from the left in the order you add them.

**Settings** (in `params`):

- `placement` (string; one of `ai`, `manual`; default `ai`): AI: GPT Image 2.5 arranges your products in the scene like a product photographer, true to their real sizes, and then your own product images go back where it put them; if it cannot place a product, the run stops and its AI calls are still charged. With AI, the scene is redrawn and may be framed closer; Manual keeps your scene photo exactly as it is. Manual: they stand side by side where you set them; cheaper, and the same every time.
- `enhance_with_ai` (boolean; default `true`): Lets GPT Image 2.5 make the picture look like one photograph: light, shadows and props around the products. Then the products' original images are put back. Off: cheaper and more consistent, but the products look more pasted on. Used only when `placement` is `manual`; otherwise accepted and ignored.
- `prompt` (string; up to 4000 characters; default `Add natural light and soft shadows where each product touches the surface.`): What the AI adds to your scene photo: light, props, a mood. Your products stay exactly as photographed.
- `quality` (string; one of `auto`, `low`, `medium`, `high`, `xhigh`, `max`; default `medium`): GPT Image 2.5's quality for Placement AI and for `enhance_with_ai`. Higher gives finer light and props, takes longer and costs more; the products are put back either way. With Placement AI, xhigh, max and auto run as high.
- `moderation` (string; one of `auto`, `low`; default `low`): How strict OpenAI's content check is, for new images and edits alike. "low" stops harmless images, like product photos, from being blocked by mistake.
- `heights_cm` (string; up to 100 characters): The products' real heights in cm, in order, like "24, 21, 8", so a cheese stays smaller than a milk carton. Auto: AI judges each product's height from what it is.
- `product_size_adjustment` (number; -50 to 100; default `0`): Makes the products larger or smaller: 20 is a fifth larger, -20 a fifth smaller. Used only when `placement` is `manual`; otherwise accepted and ignored.
- `position_x` (number; 0 to 1; default `0.5`): Where the products stand from left to right: 0.5 is the middle, higher moves them right, lower moves them left. Use it to leave free space for text beside the products. Used only when `placement` is `manual`; otherwise accepted and ignored.
- `gap` (number; -0.2 to 0.5; default `0.02`): Space between the products, as a share of the image width. Below 0 they overlap, each one in front of the one before. Used only when `placement` is `manual`; otherwise accepted and ignored.
- `add_shadow` (boolean; default `true`): Gives each product a soft shadow where it stands, so it does not look pasted on. With `enhance_with_ai`, the AI builds on it for light and shadows that match. A product that already has a shadow keeps its own. Off: no shadow, unless `enhance_with_ai` draws one. Used only when `placement` is `manual`; otherwise accepted and ignored.
- `match_light` (boolean; default `true`): Makes each product as bright or dark as the scene where it stands, so it does not look pasted on. Labels and text stay as in the original image, only brighter or darker. Off: the products keep their original light. Used only when `placement` is `manual`; otherwise accepted and ignored.
- `match_sharpness` (boolean; default `true`): Softens each product slightly when the scene around it is less sharp, so it does not look cut out. Off: the products stay as sharp as in your photos. Used only when `placement` is `manual`; otherwise accepted and ignored.
- `surface_y` (number; 0.1 to 1): Where the products stand, as a share of the image height from the top: 0.8 is four fifths down. Auto: AI finds the empty table or floor in your scene. Used only when `placement` is `manual`; otherwise accepted and ignored.
- `scene_width_cm` (number; 1 to 100000): How wide the scene is in real life at the `surface_y`, where the products stand. Auto lets AI estimate it. Fill it in, with `heights_cm`, to give every image exactly the right size. Used only when `placement` is `manual`; otherwise accepted and ignored.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/add-product-to-lifestyle-image/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F scene=@scene.png \
  -F image_2=@image_2.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/add-product-to-lifestyle-image/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"scene":{"url":"https://example.com/scene.png"},"image_2":{"url":"https://example.com/image_2.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

### Add to image

A logo or watermark on any image: **Add Logo or Watermark** (`add-image-on-image`), in a corner or the centre, sized to the image. Text (and a small kicker line above it) on any image, exactly spelled, the same text on a whole batch: **Add Text** (`add-text`) (free; auto text colour keeps it readable on light and dark pictures, an optional soft cloud on busy ones). To put the image itself on a background picture, or on a white, transparent or coloured shape (a wide photo on a square, every cut-out the same size on one studio background): **Add Image on Background** (`add-image-on-background`).

#### Add Logo or Watermark (`add-image-on-image`)

Places a logo or watermark on an image. Free.

**Kind:** script, no AI: the same result every time.

- Place a logo or watermark on an image
- Choose a corner, an edge or the center, and the size
- Make it partly see-through, with an optional soft shadow

**Best at:** The same logo or watermark on a whole catalog. Use a logo with a transparent background (PNG), or it is placed as a solid rectangle. The result has no transparency, even if the image had it. To put a headline or other text on the image, use Add Text.

**Images:**

- `image` (required): The image to put the logo on.
- `overlay_image` (required): The logo or watermark, best a PNG with a transparent background.

**Settings** (in `params`):

- `position` (string; one of `top-left`, `top-center`, `top-right`, `center-left`, `center-center`, `center-right`, `bottom-left`, `bottom-center`, `bottom-right`; default `bottom-right`): Where on the image it goes: a corner, the middle of an edge, or the center.
- `scale` (number; 0.01 to 4000; default `0.2`): How wide the logo is. From 0.01 to 1: a share of the image width (0.2 = a fifth). Above 1: a width in pixels (200 = 200 pixels wide), at most 4000.
- `margin` (integer; default `20`): The gap between the logo and the nearest edges, in pixels.
- `opacity` (number; 0 to 1; default `1`): `opacity` the logo is: 1 is fully solid, 0.5 half see-through, 0 invisible.
- `dropshadow` (boolean; default `false`): Adds a soft shadow under the logo, so it stands out on a busy image.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/add-image-on-image/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F overlay_image=@overlay_image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/add-image-on-image/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"},"overlay_image":{"url":"https://example.com/overlay_image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Add Text (`add-text`)

Text on any image, in the spot you choose, with marked words and a soft cloud so it reads. Free.

**Kind:** script, no AI: the same result every time.

- Put text on a photo, a lifestyle picture or a banner background
- Add a small kicker line above it, like NEW or SALE
- Mark words with a swoosh, underline, circle or a line through an old price
- Keep the text readable on a busy picture with an optional soft cloud behind it

**Best at:** The same text on many images: type it once and run a whole batch. Auto text colour keeps it readable on light and dark pictures alike, and a soft cloud behind it helps on a busy one. Write the words to mark between double stars, like **50 %**, and use | for a new line. For a banner built around a product cut-out, with a logo bar and an arrow to the product, use Create Product Banner.

**Images:**

- `image` (required): Any image: a photo, a lifestyle picture or a background.

**Settings** (in `params`):

- `text` (string; up to 300 characters; required): The words on the image.
| or a new line starts a new line.
Words between double stars, like **50 %**, get the mark.
- `kicker` (string; up to 60 characters; default ``): A small line above the text, like NEW or SALE.
Same font, smaller and airier.
- `kicker_color` (string; up to 7 characters): The kicker's colour, as a hex code.
- `text_size` (string; one of `auto`, `small`, `medium`, `large`, `custom`; default `auto`): How big the text is, from the image's short side, so it looks the same in every format.
Auto: medium, and a long text is split into even lines.
Custom: a font size in pixels.
The text always shrinks to fit.
- `font_size` (number; 0 to 2000; default `0`): The font size in pixels.
Images of different sizes get different-looking text: resize them to one size first. Used only when `text_size` is `custom`; otherwise accepted and ignored.
- `font` (string; one of `barlow-semi-condensed-extrabold-italic`, `barlow-condensed-bold-italic`, `inter`, `montserrat-extrabold`, `poppins-bold`, `bebas-neue`, `roboto-condensed-bold-italic`; default `barlow-semi-condensed-extrabold-italic`): The font. All are free to use in ads.
- `text_color` (string; up to 7 characters): The text's colour, as a hex code like #FFFFFF.
Auto: white or near-black, whichever reads best on each picture.
- `letter_spacing` (number; -10 to 30; default `0`): Extra space between letters, as a share of the letter size in %: positive is airier, negative is tighter. Tighter never goes so far that two letters touch, so how tight the text can get depends on its letters (often -2 to -6).
- `line_height` (number; 1 to 2; default `1.2`): The space from one line to the next, as a multiple of the letter size; at least 1, so a mark under a line never touches the next line.
- `position` (string; one of `top-left`, `top-center`, `top-right`, `center-left`, `center-center`, `center-right`, `bottom-left`, `bottom-center`, `bottom-right`, `custom`; default `bottom-left`): Where the text goes: a corner, an edge, the centre, or Custom to set it yourself.
The text lines up with its side.
- `horizontal` (number; 0 to 100; default `50`): Across the image, in %.
0: left, 50: centre, 100: right.
The text never leaves the image. Used only when `position` is `custom`; otherwise accepted and ignored.
- `vertical` (number; 0 to 100; default `50`): Up and down the image, in %.
0: top, 50: centre, 100: bottom.
The text never leaves the image. Used only when `position` is `custom`; otherwise accepted and ignored.
- `margin` (number; 0 to 2000; default `0`): Space between the text and the edges, in pixels.
Auto: 5 % of the image's short side.
- `text_width` (number; 0 to 100; default `0`): How wide the text may be, as % of the image's width. A longer line breaks or shrinks.
Auto: 80 in the centre, 60 at a side.
- `emphasis` (string; one of `swoosh`, `underline`, `marker`, `circle`, `strikethrough`, `box`, `color`, `none`; default `none`): How the words between double stars stand out, hand-drawn: a swoosh or underline under them, a marker block behind them, a circle or box around them, a line through them (an old price), or just another colour. A circle suits a single word or a price best.
- `mark_weight` (string; one of `thin`, `regular`, `bold`, `heavy`; default `regular`): How thick the mark's pen strokes are: the swoosh, underline, circle, box and marker. Used only when `emphasis` is not `none` or `color`; otherwise accepted and ignored.
- `emphasis_color` (string; up to 7 characters; default `#EEE65A`): The mark's colour, as a hex code. Pick one that stands out against what is behind it: a yellow mark vanishes on a yellow background. Used only when `emphasis` is not `none`; otherwise accepted and ignored.
- `text_backdrop` (string; one of `none`, `cloud`, `block`; default `none`): A soft cloud or a solid block behind the text and kicker, so they read on a busy picture.
With `cloud_strength` on auto, a calm picture gets a faint cloud, a busy one a stronger one.
- `cloud_strength` (number; 0 to 100; default `0`): How much the cloud covers what lies behind the text, in % (5 to 100). Auto picks what makes the text read against what lies under it, and the cloud is always clearly visible. A number is the same on every background. Used only when `text_backdrop` is `cloud`; otherwise accepted and ignored.
- `cloud_size` (string; one of `cover`, `small`, `medium`, `large`; default `medium`): How far the cloud behind the text reaches. Cover text hugs it tightly. Small, medium and large are a soft glow centred on it that blends into the picture, from about twice to about four times its size. Used only when `text_backdrop` is `cloud`; otherwise accepted and ignored.
- `backdrop_color` (string; up to 7 characters): The cloud's or block's colour. Auto: dark behind light text, light behind dark text. Used only when `text_backdrop` is not `none`; otherwise accepted and ignored.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/add-text/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F 'params={"text":"your text"}'
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/add-text/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}},"params":{"text":"your text"}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Add Image on Background (`add-image-on-background`)

Places an image on a background picture, or on a white, transparent or coloured canvas of any size. Free.

**Kind:** script, no AI: the same result every time.

- Place a photo or a cut-out on a background picture
- Put an image on a square or other size without cutting or stretching it
- Choose the size and the spot, or move it freely
- Keep a cut-out's transparency, on a transparent background too

**Best at:** Bringing every image to the same shape and look, such as a wide photo on a white square, or every cut-out the same size on the same studio background. To put a small logo on top of an image, use Add Logo or Watermark.

**Images:**

- `image` (required): The image to place: a photo, or a cut-out with a transparent background.
- `background`: Optional: the picture to place it on. Without it, Size and Background make the background.

**Settings** (in `params`):

- `format` (string; one of `original`, `1:1`, `4:5`, `3:4`, `2:3`, `9:16`, `4:3`, `3:2`, `16:9`, `custom`; default `1:1`): The size of the background. A shape comes at the size shown; "original" keeps the image's own size; "custom" takes the Width and Height you set. Used only without `background`; otherwise accepted and ignored.
- `width` (integer; 1 to 8192; default `1080`): The width of the background, in pixels. Used only when `format` is `custom`; otherwise accepted and ignored.
- `height` (integer; 1 to 8192; default `1080`): The height of the background, in pixels. Used only when `format` is `custom`; otherwise accepted and ignored.
- `fill` (string; one of `solid`, `transparent`; default `solid`): A solid colour, or transparent so the image can go on another background later. Used only without `background`; otherwise accepted and ignored.
- `background_color` (string; up to 20 characters; default `#ffffff`): The colour of the background, like #ffffff. Used only when `fill` is `solid`; otherwise accepted and ignored.
- `fit` (string; one of `contain`, `cover`; default `contain`): "contain" shows the whole image, with background around it where the shapes differ. "cover" fills the image's area completely and trims what sticks out.
- `image_size` (number; 1 to 100; default `100`): How much of the background the image may take, in width and height. 100 makes it as large as fits; 80 leaves a margin.
- `position` (string; one of `top-left`, `top-center`, `top-right`, `center-left`, `center-center`, `center-right`, `bottom-left`, `bottom-center`, `bottom-right`; default `center-center`): Where on the background the image goes: a corner, the middle of an edge, or the center.
- `x_offset` (number; -100 to 100; default `0`): Moves the image right from its position, as a share of the background's width; a minus number moves it left. It stops at the edge, so the image is never cut off.
- `y_offset` (number; -100 to 100; default `0`): Moves the image down from its position, as a share of the background's height; a minus number moves it up. It stops at the edge, so the image is never cut off.
- `trim` (boolean; default `true`): On: a cut-out is sized and placed by what you see, not by the empty transparent edge around it, so every product gets the same size and spot. No effect on a photo without transparency.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/add-image-on-background/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/add-image-on-background/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

### Remove the background

On a plain or nearly plain background (white, grey, a studio backdrop), try **Remove Solid Background** (`remove-solid-background`) first: it is free and gives the same result every time, and its `tolerance` setting also removes colors that differ slightly from the background, like a soft shadow or an uneven white. For the cleanest, most natural edges, and on real photos, use **Recraft Remove Background** (`recraft-remove-background`). If it cuts away a strap, a handle or a thin edge, use **851 Labs BG Remover** (`851-labs-background-remover`). If both give a poor cut-out on a hard photo, **Bria Remove Background** (`bria-remove-background`) is a third model to try. If the cut-out goes into a darker scene, use **Bria Remove Background** (`bria-remove-background`) (no light rim on a product shot on white) or **Recraft Remove Background** (`recraft-remove-background`): **Remove Solid Background** (`remove-solid-background`) can leave a thin light rim from the old white background.

#### Remove Solid Background (`remove-solid-background`)

Removes a plain, single-color background. No AI model, so it is free and the same every time.

**Kind:** script, no AI: the same result every time.

- Remove a plain, single-color background
- Return the object on a transparent background
- Also clear enclosed areas in the background color, like the inside of an "O" (optional)

**Best at:** Try it first on a plain or nearly plain background: free and the same every time. Raise tolerance to also remove colors close to the background, like a soft shadow or an uneven white. Only background that touches the edge of the image is removed, so white parts inside the product (a white dial, a label) stay; a white edge of the product that touches the frame can go with it. For the cleanest, most natural edges, and on photos with a real background, use Recraft Remove Background.

**Images:**

- `image` (required): An image on a plain background.

**Settings** (in `params`):

- `bg_color` (string; default `auto`): The background color to remove: "auto" reads it from the corners, or give a color like #FFFFFF.
- `tolerance` (integer; 0 to 255; default `20`): How different from the background color a pixel may be and still be removed. Higher also removes soft shadows, but can eat into light parts of the object.
- `feather` (integer; 0 to 3; default `1`): Softens the cut edge. 0 and 1 give the same clean, hard edge; 2–3 give a softer edge that can keep a faint line of the background color.
- `remove_holes_threshold` (number; 0 to 100; default `0`): Also removes enclosed areas in the background color, like the inside of an "O", when smaller than this percentage of the image. A white label inside a product on white goes too. 0 leaves them alone.
- `passthrough_on_mismatch` (boolean; default `false`; recommended `true`): If the corners are different colors (so there is no single background), pass the image on unchanged instead of failing.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/remove-solid-background/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/remove-solid-background/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Recraft Remove Background (`recraft-remove-background`)

Removes any background with AI. Great at clean, natural edges, even on busy photos. About $0.013 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Remove the background of a photo, also a busy one like rocks, grass or a street
- Return the product on a transparent background (a cut-out)

**Best at:** The cleanest, most natural edges, and the first choice for product photos on a real background. On a plain or nearly plain background, try the free Remove Solid Background first. If it cuts away part of the product, use 851 Labs BG Remover; on a very hard photo, try Bria Remove Background.

**Images:**

- `image` (required): The photo to cut out.

**Settings:** none.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/recraft-remove-background/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/recraft-remove-background/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### 851 Labs BG Remover (`851-labs-background-remover`)

Removes any background with AI, or makes a product mask. Keeps thin details like straps and handles. Under $0.01 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Remove the background of a photo with AI
- Keep the details of the product, such as straps, handles and thin parts
- Return a cut-out at the size of your image
- Put the product on white, green, a color of your choice or a blurred background
- Make a mask of the whole product: set Background type to map (white = the product, black = the rest)

**Best at:** When Recraft Remove Background cuts away part of the product, such as a strap, a handle or a thin edge. Its edges are less clean than Recraft's. Also the quickest way to a mask of the whole product, in one step: set `background_type` to map. Costs a fraction of a cent per image.

**Images:**

- `image` (required): The photo to cut out.

**Settings** (in `params`):

- `threshold` (number; 0 to 1; default `0`): How hard the edges are. 0 keeps soft, partly see-through edges; a value between 0 and 1 makes every pixel either kept or removed, which gives sharp edges but can look cut out with scissors.
- `background_type` (string; values `rgba` = Transparent, `white`, `green`, `blur` = Blurred background, `map` = Mask (black and white), `overlay` = Green overlay (to check), or a color as `[R,G,B]` such as `[240,240,240]`; up to 20 characters; default `rgba`): What comes in place of the background: transparent, a color, the background blurred, or a mask. Green overlay shows what was found.
- `format` (string; one of `png`, `jpg`, `webp`; default `png`): The file format of the result: png is exact and keeps transparency, webp is smaller and keeps it too, jpg is smallest but has no transparency, so it works only with a `background_type` other than Transparent (rgba).
- `reverse` (boolean; default `false`): Removes the product instead of the background: the background is kept, with a see-through hole where the product was.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/851-labs-background-remover/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/851-labs-background-remover/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Bria Remove Background (`bria-remove-background`)

Removes any background with AI. A third option to try on hard photos. About $0.023 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Remove the background of a photo with AI
- Return the product on a transparent background (a cut-out)
- Keep soft edges, such as hair or fur, partly see-through

**Best at:** No light rim on product photos shot on white, so the product fits a darker scene. Also a third model to try on hard photos, when Recraft Remove Background and 851 Labs BG Remover both give a poor cut-out; it is sometimes better there. A photo larger than about 1024 pixels comes back at that size on its longest side, so enlarge it afterwards if you need more.

**Images:**

- `image` (required): The photo to cut out.

**Settings** (in `params`):

- `preserve_alpha` (boolean; default `true`): For an image that is already partly see-through: on keeps its see-through parts see-through in the result; off cuts out from what is visible alone. Makes no difference on a photo without transparency.
- `content_moderation` (boolean; default `false`): Checks the image for unsafe content first and refuses it if it finds any. Product photos rarely need it.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/bria-remove-background/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/bria-remove-background/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

### Crop, resize and upscale

To frame cut-outs the same way across a catalog, use **Trim Transparent Background** (`smart-crop`), then **Resize Image** (`resize-image`) with `fit` `cover` for an exact pixel size (the default `contain` never makes an image larger). For a product small on a white background, **Trim Solid Background** (`auto-crop`). To find something and crop to it: **Florence-2 Find and Crop** (`detect-and-crop`) for one thing named in a word or two ("cat", "logo"), fast and the cheapest, cropped around it or to a shape; **Gemini Find and Crop** (`gemini-find-and-crop`) when a prompt describes what to look for (such as what the shop sells), cropped to a shape with people kept whole. Too small: **Real-ESRGAN Upscaler** (`real-esrgan`). Too large for a limit: **Downscale Image** (`downscale-image`).

#### Florence-2 Find and Crop (`detect-and-crop`)

Finds an object you name and crops around it. A word or two is enough, like "cat" or "logo". Under $0.01 a run.

**Kind:** script with an AI step inside: the AI part can differ from run to run.

- Find one thing named in a word or two
- Crop around it, or to a shape such as square, 4:5 or 9:16
- Leave the image as it is if nothing is found or the shape does not fit

**Best at:** One thing you can name in a word or two, such as "cat", "car" or "logo". Fast, and the cheapest way to find and crop. To describe what you look for in a sentence, or to keep people whole, use Gemini Find and Crop.

**Images:**

- `image` (required): The photo to find the object in and crop around.

**Settings** (in `params`):

- `query` (string; up to 1000 characters; default `product`): `query`, in plain words. Several ways of saying it, separated by commas, find more.
- `format` (string; one of `fit`, `original`, `square`, `3:4`, `4:3`, `3:2`, `2:3`, `9:16`, `16:9`, `4:5`; default `fit`): The shape of the result. "fit" follows the object with no fixed shape; "original" keeps the image's own shape. A shape that does not fit leaves the image as it is.
- `if_no_fit` (string; one of `leave`, `border`; default `leave`): What happens when the shape cannot be cut from the photo without cutting what must stay: leave the photo as it is, or crop as tight as possible and add a border to reach the shape. Used only when `format` is not `fit` or `original`; otherwise accepted and ignored.
- `border_color` (string; up to 20 characters; default `#ffffff`): The colour of the border: white, transparent, or a colour like #ffffff. Used only when `if_no_fit` is `border`; otherwise accepted and ignored.
- `padding_percent` (integer; default `5`): Space to leave around the object, as a percentage of its size. Whole numbers only. With a shape, used only where the image has room.
- `min_padding` (integer; default `50`): The least space to leave around the object, in pixels, even when the percentage gives less (a small object). Used only when `format` is `fit`; otherwise accepted and ignored.
- `safety_margin` (integer; default `30`): Extra pixels always added on every side, because the AI's box can be a little tight, so the object's edge is never cut. Used only when `format` is `fit`; otherwise accepted and ignored.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/detect-and-crop/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/detect-and-crop/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Gemini Find and Crop (`gemini-find-and-crop`)

Finds what you describe and crops around it. Understands a whole prompt; crops to the shape you choose. Under $0.01 a run.

**Kind:** script with an AI step inside: the AI part can differ from run to run.

- Find what a prompt describes, such as the product your shop sells
- Crop to a shape such as square, 4:5 or 9:16, with the product in focus
- Keep whoever wears or holds the product whole
- Leave the photo as it is when the shape does not fit

**Best at:** Describing what you look for in a sentence, such as "the product a store that sells clothes would sell", and letting the AI find it. For one thing named in a word, Florence-2 Find and Crop is cheaper.

**Images:**

- `image` (required): The photo with the product in it.

**Settings** (in `params`):

- `prompt` (string; up to 1000 characters; required): What to find. Say what your shop sells, so the right product is chosen when a photo shows several things.
- `format` (string; one of `fit`, `original`, `square`, `3:4`, `4:3`, `3:2`, `2:3`, `9:16`, `16:9`, `4:5`; default `square`): The shape of the result. "fit" follows the object with no fixed shape; "original" keeps the photo's own shape and only trims around the product.
- `if_no_fit` (string; one of `leave`, `border`; default `leave`): What happens when the shape cannot be cut from the photo without cutting what must stay: leave the photo as it is, or crop as tight as possible and add a border to reach the shape. Used only when `format` is not `fit` or `original`; otherwise accepted and ignored.
- `border_color` (string; up to 20 characters; default `#ffffff`): The colour of the border: white, transparent, or a colour like #ffffff. Used only when `if_no_fit` is `border`; otherwise accepted and ignored.
- `margin` (integer; 0 to 50; default `10`): Space around the product and the people kept, as a percentage of their size, on every side. 0 crops tight. Used only where the photo has room.
- `keep_people` (boolean; default `true`): On: whoever wears or holds the product, and anyone the crop would cut, stays whole. Off: the crop follows the product only and may cut people.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/gemini-find-and-crop/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F 'params={"prompt":"your prompt"}'
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/gemini-find-and-crop/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}},"params":{"prompt":"your prompt"}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Downscale Image (`downscale-image`)

Shrinks an image to fit a pixel or file-size limit. Free.

**Kind:** script, no AI: the same result every time.

- Shrink an image to a pixel limit
- Shrink an image to a file-size limit
- Keep its proportions

**Best at:** Preparing images for an AI model with a size limit (Real-ESRGAN fails above about 1.8 megapixels), or for a website's upload limit.

**Images:**

- `image` (required): The image to shrink.

**Settings** (in `params`):

- `max_pixels` (integer): The most pixels (width × height) the result may have. Empty means no pixel limit.
- `max_bytes` (integer): The largest file size in bytes. Empty means no size limit. 1,048,576 is 1 MB. Reliable for JPEG and cut-outs; a PNG without transparency can end up larger than the limit.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/downscale-image/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/downscale-image/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Real-ESRGAN Upscaler (`real-esrgan`)

Makes a small image larger and sharper. Under $0.01 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Make an image 2 or 4 times larger, with the best quality
- Remove blur and compression noise while enlarging
- Repair faces (optional)

**Best at:** Graphics and product photos that are too small for their use. It fails on images above about 1.8 megapixels, so a larger image is shrunk to 1.5 megapixels first, automatically.

**Images:**

- `image` (required): The image to enlarge. A larger one is shrunk to 1.5 megapixels first, automatically.

**Settings** (in `params`):

- `scale` (number; 0 to 10; default `4`): How many times larger the result is, in width and height; more than 0 (0 fails). The model is trained to enlarge 4 times: any other value is enlarged 4 times and then resized, so 2 and 4 give the sharpest results.
- `face_enhance` (boolean; default `false`): Also repairs faces. Only useful when there are people in the image.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/real-esrgan/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/real-esrgan/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Trim Transparent Background (`smart-crop`)

Trims the transparent background around a cut-out and centres it on a chosen shape. Free.

**Kind:** script, no AI: the same result every time.

- Crop a cut-out tight to its subject
- Centre it on a chosen shape, like a square
- Add space around it, or make the subject a set share of the result

**Best at:** Giving a whole catalog of cut-outs the same framing. Needs a transparent background to find the subject; for a product on a plain background, use Trim Solid Background.

**Images:**

- `image` (required): A cut-out with a transparent background.

**Settings** (in `params`):

- `format` (string; one of `original`, `square`, `3:4`, `4:3`, `3:2`, `2:3`, `9:16`, `16:9`, `4:5`; default `square`): The shape of the result. "original" keeps the cropped shape.
- `subject_scale` (number; 0 to 100; default `0`; recommended `75`): How large the product is, as a share of the result's longest side. Leave it blank (0 in the API) to keep the product's own size and set the space around it in pixels instead: Margin then appears below, and Margin 0 trims tight to the product.
- `margin` (integer; default `10`): The space around the product, in pixels, at least this much on every side (the shape may add more). 0 trims tight to the product. Used only when `subject_scale` is blank. Used only when `subject_scale` is `0`; otherwise accepted and ignored.
- `background` (string; default `transparent`): What fills the space around the subject: transparent, white, or a color like #ffffff.
- `alpha_threshold` (integer; 0 to 255; default `10`): How solid a pixel must be (0–255) to count as part of the subject, so faint haze at the edges is ignored.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/smart-crop/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/smart-crop/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Resize Image (`resize-image`)

Gives an image a set width and height. Free.

**Kind:** script, no AI: the same result every time.

- Give an image a set width and height in pixels
- Fit it inside that size, fill it exactly, or stretch it
- Give only a width or a height and keep the proportions

**Best at:** Giving every image in a catalog the same pixel size, for example 1200 × 1200 after Trim Transparent Background. "contain", the default, only makes images smaller: to bring a smaller image up to the size (550 pixels to 1000 × 1000), use "cover". A cut-out comes out as PNG, any other image as JPEG or PNG, so add Convert File Format after it for WebP.

**Images:**

- `image` (required): The image to resize.

**Settings** (in `params`):

- `width` (integer; 0 to 8192; default `0`): The width of the result, in pixels. Leave it blank (0 in the API) to work it out from the height, keeping the proportions.
- `height` (integer; 0 to 8192; default `0`): The height of the result, in pixels. Leave it blank (0 in the API) to work it out from the width, keeping the proportions.
- `fit` (string; one of `contain`, `cover`, `stretch`; default `contain`): "contain" fits the image inside the size, keeping its proportions, so one side can come out shorter; it only makes images smaller, so a smaller image keeps its size. "cover" fills the size exactly, keeping the proportions and trimming the edges that do not fit; it also makes small images larger, but that only stretches the pixels, so an image much smaller than the size comes out softer. "stretch" forces the exact size and can distort the image.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/resize-image/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/resize-image/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Trim Solid Background (`auto-crop`)

Trims the solid background around a product, like white. Free.

**Kind:** script, no AI: the same result every time.

- Crop away a plain, single-color border around the product
- Leave an even margin around it (optional)
- Place it on a square or other shape, filled with the background color (optional)

**Best at:** Studio photos and graphics on a white or other plain background, where the product sits small in a large frame. For a cut-out with a transparent background, use Trim Transparent Background.

**Images:**

- `image` (required): An image with a plain border around the product.

**Settings** (in `params`):

- `target_format` (string; one of `original`, `1:1`, `3:4`, `4:3`, `9:16`, `16:9`; default `original`): The shape of the result, as width:height. Space is added around the image to reach it; nothing is cut. "original" keeps its own shape.
- `margin` (number; 0 to 50; default `0`; recommended `5`): Space around the product, as a percentage of its longest side, from 0 to 50. 0 trims tight to the product.
- `fuzz` (integer; 0 to 255; default `10`): How different a pixel must be from the background color to count as product, from 0 to 255. Higher ignores noise and faint shadows; lower keeps them.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/auto-crop/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/auto-crop/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

### Create and use masks

For a mask of the whole product (the foreground), use **851 Labs BG Remover** (`851-labs-background-remover`) with `background_type` `map`: one step, a fraction of a cent, the product white and the rest black. For one named part, name it with **SAM 3 Segmentation** (`sam3`), then clean its edge with **Smooth Mask** (`smooth-mask`); **Check Mask** (`check-mask`) says whether it follows the photo. Then repaint it with **Flux Fill Pro** (`flux-fill-pro`) or **Nano Banana Pro Inpaint** (`nb-pro-inpaint`).

#### SAM 3 Segmentation (`sam3`)

Finds what you name in a photo and returns it as a mask. Under $0.01 a run.

**Kind:** AI model: the result can differ a little from run to run.

- Find what you name in a photo, in plain words
- Return it as a mask (white = the area)
- Find every match, not only the first
- Give each area it finds as its own mask, to download

**Best at:** Picking out one part of a product, such as the cushion of a chair or the label on a bottle, to repaint only that. The edge can be jagged, so follow it with Smooth Mask. Costs a fraction of a cent per image.

**Images:**

- `image` (required): The photo with the object you want a mask of.

**Settings** (in `params`):

- `prompt` (string; up to 1000 characters; default `person`): What to find, in a word or two, for example "fabric", "label" or "bottle".
- `threshold` (number; 0 to 1; default `0.5`): How sure the model must be before an area counts. Lower finds more, including areas that are only partly a match.
- `mask_only` (boolean; default `true`): On gives the mask (white = the area). Off gives your photo with the areas it found tinted in `mask_color`, to check what it found.
- `return_zip` (boolean; default `false`): Also gives a ZIP with each area it finds as its own mask, to download. The next step gets the same image as with it off.
- `mask_color` (string; one of `green`, `red`, `blue`, `yellow`, `cyan`, `magenta`; default `green`): The tint of the found areas when `mask_only` is off. Not used for the mask.
- `mask_opacity` (number; 0 to 1; default `0.5`): How solid the tint is when `mask_only` is off, from 0 (not shown) to 1 (solid). Not used for the mask.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/sam3/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/sam3/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Smooth Mask (`smooth-mask`)

Smooths a mask's jagged edges, removes specks and fills holes. Free.

**Kind:** script, no AI: the same result every time.

- Smooth the jagged edges of a mask
- Remove specks and fill holes
- Give the edge a soft blend

**Best at:** Masks for repainting or compositing: large solid areas (simple mode), or objects with thin parts such as handles, straps or legs (adaptive mode, which keeps them).

**Images:**

- `image` (required): A black-and-white mask to smooth and clean up, such as the result of SAM 3 Segmentation (white = the object).

**Settings** (in `params`):

- `mode` (string; one of `simple`, `adaptive`; default `simple`): "simple" for large solid areas; "adaptive" keeps thin parts like handles or legs sharp.
- `smooth_strength` (number; 0 to 1; default `1`): How much to smooth, from 0 (least) to 1 (most). Even 0 smooths a little.
- `min_region_size` (number; 0 to …; default `50`): Removes white specks smaller than this many pixels. 0 keeps them.
- `fill_holes` (boolean; default `true`): Fills holes inside the mask. Turn it off when gaps are real, like the space inside a handle.
- `transparent_edge_px` (number; 0 to …; default `1.5`): Width of the soft blend along the edge, in pixels. 0 gives a hard, stair-stepped edge.
- `expand_px` (integer; -20 to 20; default `4`): Grows (+) or shrinks (−) the mask before smoothing, so corners are not eaten away. 4 suits simple mode; in adaptive mode use 0–1, or thin parts get thicker.
- `target_format` (string; one of `original`, `1:1`, `3:4`, `4:3`, `9:16`, `16:9`; default `original`): The shape of the result, as width:height. Space is added around the image to reach it; nothing is cut. "original" keeps its own shape.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/smooth-mask/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/smooth-mask/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Check Mask (`check-mask`)

Checks that a mask follows the real edges in the photo. Free.

**Kind:** script, no AI: the same result every time.

- Measure how well a mask follows the real edges
- Answer pass or fail
- Show the mask drawn on the photo

**Best at:** Catching a bad mask before it is reused for many variants. It measures the edge as a whole, so a small local error can still pass.

**Images:**

- `image` (required): The photo the mask was made from.
- `image_mask` (required): The black-and-white mask to check, made from this photo (white = the object).

**Settings** (in `params`):

- `max_drift_px` (number; 0 to …; default `5`): How far, in pixels, the mask edge may wander from the real shape before it fails. Lower is stricter.
- `output_mode` (string; one of `overlay`, `mask`, `report`, `zip`; default `overlay`): "overlay": the mask drawn on the photo, to look at. "mask": the mask passed on to the next step, resized to the photo. "report": the overlay with a PASS/FAIL banner. "zip": all of it plus a report.
- `color` (string; default `#ff00ff`): Color of the overlay. Magenta shows on most photos. Used only when `output_mode` is not `mask`; otherwise accepted and ignored.
- `opacity` (number; 0 to 1; default `0.5`): How see-through the overlay is: 0.5 shows both the mask and the photo. Used only when `output_mode` is not `mask`; otherwise accepted and ignored.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/check-mask/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F image_mask=@image_mask.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/check-mask/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"},"image_mask":{"url":"https://example.com/image_mask.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

### Check images

To send each image down its own path, use **Condition** (`condition`): its `type` decides what it looks at, and its answer is always in the run's `result.fields.answer`, so a flow (or your code) can act on it. `gemini` answers a question you write in `question` with one of `answer_1` to `answer_5` (a small AI cost): for what only a look at the picture can tell (a packshot, a model photo or an environment photo?). Free, and the same answer every time: `background` (Transparent, Solid or Photo: tells cut-outs, packshots on a plain backdrop and photos apart), `transparency` (Yes when already a cut-out; skip background removal on Yes only when you know your cut-outs are clean, since **Recraft Remove Background** (`recraft-remove-background`) cleans up a leftover patch of the old backdrop), `resolution` (High from `max_pixels`, else Low: enlarge only on Low) and `quality` (for logos and graphics: Low for small or blotchy ones, redraw only those). In a flow, a Condition step's answers are its paths. Catch a bad mask with **Check Mask** (`check-mask`) before you reuse it.

#### Condition (`condition`)

Answers a question about the image, so each kind can take its own path. The image passes on untouched. Under $0.01 a run.

**Kind:** script with an AI step inside: the AI part can differ from run to run.

- Ask Gemini any question, with 2 to 5 answers you write
- Or a free check: background, transparency, size or quality
- Send each answer down its own path in a flow
- Pass the image on exactly as it came

**Best at:** Sorting a mixed batch so each kind gets its own steps. Gemini Prompt for questions only a look at the picture can answer (a packshot, a model photo or an environment photo?); the free checks give the same answer every time.

**Images:**

- `image` (required): The image to look at.

**Settings** (in `params`):

- `type` (string; one of `gemini`, `background`, `transparency`, `resolution`, `quality`; default `gemini`): What to look at. Gemini Prompt answers a question you write (a small AI cost). Background: Transparent, Solid or Photo. Transparency: is it already a cut-out? Resolution: High or Low, by size. Graphic quality: High or Low, for logos and graphics (for photos, use Resolution). These four are free.
- `question` (string; up to 1000 characters): What to ask about the image. Name the answers in it too, so the choice is clear. Used only when `type` is `gemini`; otherwise accepted and ignored.
- `answer_1` (string; up to 60 characters; default `Yes`): `answer_1` to choose from. Each answer becomes its own path. The first two are needed: cleared, it goes back to Yes, and its path keeps its steps. Used only when `type` is `gemini`; otherwise accepted and ignored.
- `answer_2` (string; up to 60 characters; default `No`): `answer_2` to choose from. Each answer becomes its own path. The first two are needed: cleared, it goes back to No, and its path keeps its steps. Used only when `type` is `gemini`; otherwise accepted and ignored.
- `answer_3` (string; up to 60 characters): Another answer to choose from; leave it blank to use fewer. Used only when `type` is `gemini`; otherwise accepted and ignored.
- `answer_4` (string; up to 60 characters): Another answer to choose from; leave it blank to use fewer. Used only when `type` is `gemini`; otherwise accepted and ignored.
- `answer_5` (string; up to 60 characters): Another answer to choose from; leave it blank to use fewer. Used only when `type` is `gemini`; otherwise accepted and ignored.
- `max_pixels` (integer; 1 to 1000000000; default `2000000`): The answer is High from this many pixels (width × height), Low below. 2,000,000 is about 1414 × 1414. Used only when `type` is `resolution`; otherwise accepted and ignored.
- `threshold` (integer; 0 to 255; default `250`): A pixel counts as transparent when it is less solid than this (0–255). Used only when `type` is `background` or `transparency`; otherwise accepted and ignored.
- `sample_percent` (integer; 0 to 100; default `10`): How much of the image must be see-through for it to count as transparent. Used only when `type` is `background` or `transparency`; otherwise accepted and ignored.
- `edge_percent` (integer; 1 to 100; default `70`): How much of the edges must be one colour for the answer Solid. Lower it when products often fill the frame. Used only when `type` is `background`; otherwise accepted and ignored.
- `tolerance` (integer; 0 to 255; default `6`): How much an edge pixel may differ from the main edge colour and still count as it (0–255). Raise it for an uneven backdrop. Used only when `type` is `background`; otherwise accepted and ignored.
- `mp_high_threshold` (number; 0.01 to 1000; default `1`): From this size the answer is always High. Between `mp_low_threshold` and `mp_high_threshold`, Flatness and `gradient_threshold` decide. Used only when `type` is `quality`; otherwise accepted and ignored.
- `mp_low_threshold` (number; 0.01 to 1000; default `0.09`): Below this size the answer is always Low. Used only when `type` is `quality`; otherwise accepted and ignored.
- `flatness_threshold` (number; 1 to 100; default `80`): Between `mp_low_threshold` and `mp_high_threshold`: how much of the image must be made of a few clean colors. Below this, the answer is Low (blotchy). Used only when `type` is `quality`; otherwise accepted and ignored.
- `gradient_threshold` (number; 1 to 100; default `50`): For cut-outs between `mp_low_threshold` and `mp_high_threshold`: how smooth the edges must be. Below this, the answer is Low (jagged). Used only when `type` is `quality`; otherwise accepted and ignored.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/condition/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/condition/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

### Convert the format

End with **Convert File Format** (`format-converter`) for the file type your shop wants, usually WebP.

#### Convert File Format (`format-converter`)

Converts an image to WebP, JPEG or PNG. Free.

**Kind:** script, no AI: the same result every time.

- Save an image as WebP, JPEG or PNG
- Choose the quality, trading file size against detail
- Cap the longest side (2048 pixels unless you change it)

**Best at:** The last step of a flow, to deliver the file format a web shop wants, usually WebP. WebP and PNG keep a transparent background; JPEG puts it on white. A phone photo stored sideways with a rotation tag is not turned upright: put Resize Image before it, which does. Phone photos in HEIC are accepted, but iPhone HDR photos may come out too dark.

**Images:**

- `image` (required): The image to convert.

**Settings** (in `params`):

- `format` (string; one of `png`, `jpeg`, `webp`; default `webp`): The file format of the result. webp: small files that keep transparency, made for the web. jpeg: works everywhere, but a transparent background becomes white. png: exact and larger, keeps transparency.
- `quality` (integer; 1 to 100; default `85`): How much detail WebP and JPEG keep (1–100). Lower gives smaller files with more visible blur and blocks. PNG ignores it. Used only when `format` is not `png`; otherwise accepted and ignored.
- `max_size` (integer; 0 to …; default `2048`; recommended `0`): The most pixels on the longest side. Only makes larger images smaller; smaller images stay as they are. Leave it blank for no limit (0 in the API; a call that leaves it out gets 2048).

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/format-converter/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/format-converter/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

### Adjust and add effects

A shadow under a cut-out: **Add Shadow** (`add-shadow`) (remove the background first). **Correct Colors** (`correct-colors`) puts a graphic's colors back after an AI model shifted them. Not for photos.

#### Correct Colors (`correct-colors`)

Puts colors that an AI model shifted back to the original ones. Free.

**Kind:** script with an AI step inside: the AI part can differ from run to run.

- Compare an image's colors with an original
- Put drifted colors back to the original ones
- Outline white parts so they stay visible on white (optional)

**Best at:** Graphics with a few solid colors, such as icons or logos, after an AI model has redrawn them. Not for photos with soft gradients, where it can create visible bands.

**Images:**

- `image` (required): The edited image whose colors should match the original.
- `image_reference` (required): The original photo with the right colors, such as the product photo before editing.

**Settings** (in `params`):

- `auto_crop_reference` (boolean; default `false`): First crops the reference image to the object you name, with an AI model, so its background is not counted as one of its colors. Costs a fraction of a cent.
- `crop_query` (string; up to 1000 characters; default ``): `crop_query` in the reference image, in plain words. Several ways of saying it, separated by commas, find more. Needed when `auto_crop_reference` is on. Used only when `auto_crop_reference` is `true`; otherwise accepted and ignored.
- `add_edge_border` (boolean; default `false`): Adds a dark outline around white edges, so white parts do not disappear on a white background. Meant for cut-outs: on an image with a white background it can frame the whole image.
- `border_width` (integer; default `2`): Width of that outline, in pixels. Used only when `add_edge_border` is `true`; otherwise accepted and ignored.
- `border_color` (string; up to 32 characters; default `auto`): Color of the outline: "auto" uses the darkest color in the image, or give one like #2d5a6b. Used only when `add_edge_border` is `true`; otherwise accepted and ignored.
- `white_edge_threshold` (integer; default `240`): How light a pixel must be (0–255) to count as white when deciding whether an outline is needed. Used only when `add_edge_border` is `true`; otherwise accepted and ignored.
- `white_edge_percent` (integer; default `20`): How much of the edge must be white before an outline is added. Used only when `add_edge_border` is `true`; otherwise accepted and ignored.
- `min_coverage` (number; default `5`): Only colors that cover at least this percentage of the image are corrected; small details are left alone.
- `min_delta_e` (number; default `10`): How different a color must be from the original before it is corrected. 5–10 is just noticeable, 10–15 a clear drift.
- `n_clusters` (integer; default `12`): How many color groups to look for. More finds more shades but takes longer.
- `cluster_merge_threshold` (number; default `8`): Color groups closer than this are treated as one color, so one color is not split in two.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/correct-colors/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F image_reference=@image_reference.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/correct-colors/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"},"image_reference":{"url":"https://example.com/image_reference.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Add Shadow (`add-shadow`)

Adds a natural shadow under a cut-out product, where it stands. Free.

**Kind:** script, no AI: the same result every time.

- Add a dark contact shadow where the product touches the surface
- Add a soft shadow that falls away from the light
- Keep the product exactly as it is, still as a cut-out

**Best at:** Products with a flat bottom, like boxes, cans, tubs and bottles, photographed standing, from the front or a little above. Flat products photographed from above, like a wallet, a phone case or a watch, with `light`: `above`. A gently curved base, like a sneaker's sole, still works; a more curved one does not. It is free, so try it on any product and judge the result. The product must be a cut-out (transparent background): add a Remove Background step before it. Where the shadow reaches past the image's edge, the image grows to hold it (960 × 960 can become 960 × 982). For an exact size, add Trim Transparent Background after it (it frames the product and its shadow in the shape you choose), then Resize Image with Fit cover. The fields shadow_px_left, shadow_px_right, shadow_px_top and shadow_px_bottom say how many pixels each side grew (0 where the shadow fits), not how large the shadow is.

**Images:**

- `image` (required): The product as a cut-out (transparent background).

**Settings** (in `params`):

- `light` (string; one of `left`, `right`, `front`, `above`; default `front`): Where the light comes from; the shadow falls the other way. front: a soft shadow right under the product; fits most photos where the product stands up. left or right: when the light in your scene clearly comes from one side. above: for a product lying flat, photographed from above (on a table or the floor): a soft shadow all around it.
- `length` (number; 0 to 2; default `0.6`): How far the shadow reaches across the surface, as a share of the product's height: 0.6 is a little over half its height; 0 gives only the contact shadow. Not used with `light`: `above`.
- `opacity` (number; 0 to 1; default `0.5`): How dark the shadow that falls away from the light is: 0 is none, 1 the darkest.
- `contact` (number; 0 to 1; default `0.75`): How dark the shadow right under the product is, where it touches the surface. It is what makes a product stand instead of float. Not used with `light`: `above`.
- `softness` (number; 0.2 to 3; default `1`): How soft the shadows' edges are: 1 is natural, lower is sharper (bright sun), higher is softer (an overcast day).

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/add-shadow/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/add-shadow/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

### Create or edit video

For a wide (16:9) or tall (9:16) video, start with **Gemini Omni 1.2 Flash** (`gemini-omni-1-2-flash`): #1 on Arena.ai for image to video, at a low price and fast (a video is ready in about half a minute), with sound; give it an image of that shape. For any other shape, such as square (1:1), or to keep the image's own shape, use **MiniMax H3** (`minimax-h3`). For premium videos, longer videos (up to 30 s; Omni and H3 up to 15 s) or many products in one video (up to 30 images), **Seedance 2.5** (`seedance-2-5`): about three times the price of H3, and slower. A product video usually starts from the product photo placed in a scene first: see the template Product video from a photo. For a scene plus a close-up, make the close-up still from the scene with the product photo as the second image, so the right product is shown, then one clip from each with the same model and join them with **Join Videos** (`join-videos`). To join clips into one video (a wide shot then a close-up, or several product videos in a row), use **Join Videos** (`join-videos`): free, with a fade or a hard cut, and a length per clip to cut each clip to its start; its inputs are videos from these video steps or your own MP4 or MOV uploads.

#### Gemini Omni 1.2 Flash (`gemini-omni-1-2-flash`)

Makes a short video from images or text. #1 on Arena.ai and low-priced, in 16:9 or 9:16 only. About $0.72 a run (a video).

**Kind:** AI model: the result can differ a little from run to run.

- Make a short video that starts from your product image
- Move from a first frame image to a last frame image
- Show your products in one video, from up to 6 reference images
- Create a video from a description alone, with sound made for it

**Best at:** Product videos for a shop or social media, quickly and at a low price. Wide (16:9) or tall (9:16) only: give it an image of that shape.

**Images:**

- `image`: The first frame: the video starts from this image. Give it the video's shape (wide 16:9 or tall 9:16). Leave it empty to make a video from reference images or the prompt alone.
- `last_frame`: Optional: the video ends on this image, moving from the first frame (Image) to it. It needs a first frame.
- `image_3` to `image_8`: up to 6 more images.

**Settings** (in `params`):

- `prompt` (string; up to 4000 characters; required): What should happen in the video, in words: one camera move and what must stay the same. With several images, say which is the first frame, the last frame and which are references.
- `duration` (integer; one of `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15`; 3 to 15; default `5`): How long the video is, in seconds (3 to 15; with both a first and a last frame, at most 10). The price follows the length.
- `resolution` (string; one of `360p`, `720p`, `1080p`, `4k`; default `720p`): The video's size. 1080p and 4k are made at 720p and enlarged: 1080p costs about half as much again, 4k three times as much. 360p costs a third, for a quick look.
- `aspect_ratio` (string; one of `16:9`, `9:16`; default `9:16`): The video's shape, as width:height: 16:9 is wide, 9:16 tall for phones. Give it a first frame of the same shape: an image of another shape is not kept but drawn again as a new scene. Redraw it in that shape first with GPT Image 2.5 (its Size setting).
- `task` (string; one of `text_to_video`, `image_to_video`, `reference_to_video`): What kind of video to make: from the prompt alone (text_to_video), from a first frame (image_to_video) or from reference images (reference_to_video). Setting it makes the model stricter about its inputs.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/gemini-omni-1-2-flash/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F 'params={"prompt":"your prompt"}'
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/gemini-omni-1-2-flash/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}},"params":{"prompt":"your prompt"}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### MiniMax H3 (`minimax-h3`)

Makes a short video from images or text. Keeps your image's shape, square too: a great first choice. About $0.72 a run (a video).

**Kind:** AI model: the result can differ a little from run to run.

- Make a short video that starts from your product image
- Move from a first frame image to a last frame image
- Show several products in one video, from up to 9 reference images
- Create a video from a description alone

**Best at:** Product videos for a shop or social media, from one product photo or a batch of them. A 5-second video takes about 2.5 minutes.

**Images:**

- `first_frame_image`: The video starts from this image and keeps its shape. Leave it empty to make a video from reference images or the prompt alone.
- `last_frame_image`: Optional: the video ends on this image, moving from the first frame image to it.
- `image_3` to `image_11`: up to 9 more images.

**Settings** (in `params`):

- `prompt` (string; up to 4000 characters; required): What should happen in the video, in words: one camera move and what must stay the same.
- `duration` (integer; one of `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `13`, `14`, `15`; 4 to 15; default `5`): How long the video is, in seconds (4 to 15). The price follows the length.
- `resolution` (string; one of `768P`, `2K`; default `768P`): The video's size: 768P, or 2K, which is sharper and costs about 60% more.
- `ratio` (string; one of `adaptive`, `21:9`, `16:9`, `4:3`, `1:1`, `3:4`, `9:16`; default `adaptive`): The video's shape, as width:height. adaptive keeps the shape of your first frame image or reference images; a video from the prompt alone needs a fixed shape such as 16:9.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/minimax-h3/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F first_frame_image=@first_frame_image.png \
  -F 'params={"prompt":"your prompt"}'
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/minimax-h3/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"first_frame_image":{"url":"https://example.com/first_frame_image.png"}},"params":{"prompt":"your prompt"}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Seedance 2.5 (`seedance-2-5`)

Makes a short video from images or text. ByteDance's top model: up to 30 images in one video. About $2.09 a run (a video).

**Kind:** AI model: the result can differ a little from run to run.

- Make a short video that starts from your product image
- Move from a first frame image to a last frame image
- Show many products in one video, from up to 30 reference images
- Make videos up to 30 seconds long, with sound if you want it

**Best at:** Premium product videos and many products in one video. About three times the price of MiniMax H3, and slower: about 4.5 minutes for a 5-second video.

**Images:**

- `image`: The first frame: the video starts from this image. Leave it empty to make a video from reference images or the prompt alone. It cannot be used together with reference images.
- `last_frame_image`: Optional: the video ends on this image. It needs a first frame (Image).
- `image_3` to `image_32`: up to 30 more images.

**Settings** (in `params`):

- `prompt` (string; up to 4000 characters; default ``): What should happen in the video, in words: one camera move and what must stay the same. Refer to reference images as [Image1], [Image2] … in the order they are added.
- `duration` (integer; 4 to 30; default `5`): How long the video is, in seconds (4 to 30). The price follows the length.
- `resolution` (string; one of `480p`, `720p`; default `720p`): The video's size: 720p is sharper and costs more than twice as much as 480p.
- `aspect_ratio` (string; one of `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `21:9`, `adaptive`; default `adaptive`): The video's shape, as width:height. adaptive lets the model choose: your first frame image's shape, or what suits your images.
- `generate_audio` (boolean; default `false`): Adds sound made for the video: effects, music, and speech you write in double quotes in the prompt. The price is the same with or without.
- `output_format` (string; one of `mp4`, `mov`; default `mp4`): The file format of the video: mp4 plays everywhere; mov is for video editing programs.
- `watermark` (boolean; default `false`): Adds the maker's watermark to the video.
- `seed` (integer): A number that fixes the model's random start. The same seed, prompt and images give nearly the same result again.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/seedance-2-5/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/seedance-2-5/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```

#### Join Videos (`join-videos`)

Joins two or more videos into one, with a fade or a hard cut. Free.

**Kind:** script, no AI: the same result every time.

- Join 2 to 4 videos in the order you choose
- Fade each video into the next, or cut straight to it
- Cut each video to a set length from its start
- Keep the sound and fade it with the picture, or remove it

**Best at:** A short product film from a few clips, such as a wide shot followed by a close-up, or several products in a row. Make the clips first with a video tool such as MiniMax H3, or upload your own MP4 or MOV videos. Put the video whose size you want first. A fade makes the film shorter: each fade overlaps two videos, so two 7-second videos with a 0.5-second fade give 13.5 seconds. To make a cut feel calm, use a fade of about half a second. To join more than four videos, add a second Join Videos step after the first and give it the result of the first as Video 1.

**Images:**

- `image` (required): The first video. The joined video gets its size.
- `image_2` (required): The second video.
- `image_3`: A third video, joined after Video 2. Leave it at None for two videos.
- `image_4`: A fourth video, joined after Video 3.

**Settings** (in `params`):

- `transition` (string; one of `fade`, `cut`; default `fade`): How one video turns into the next. fade: the first fades into the second (the film gets shorter by the fade at each join). cut: the next video starts straight away.
- `fade_seconds` (number; 0.1 to 2; default `0.5`): How long each fade lasts, in seconds. It may be at most half of the shortest video. Used only when `transition` is `fade`; otherwise accepted and ignored.
- `clip_seconds` (string; up to 200 characters; default ``): Trims each video to this many seconds from its start: one number for all (4), or one per video (4, 3.5). Blank: whole videos.
- `remove_sound` (boolean; default `false`): Makes a silent video. When off, the videos' sound is kept and fades with the picture; a video without sound is silent in its part.

**Send a file and wait:**

```bash
curl -X POST "https://www.flowpx.io/api/v1/tools/join-videos/runs?wait=60" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -F image=@image.png \
  -F image_2=@image_2.png
```

**Send a link, then ask for the run:**

```bash
# Start: answers at once with the run's id
RUN_ID=$(curl -s -X POST "https://www.flowpx.io/api/v1/tools/join-videos/runs" \
  -H "Authorization: Bearer $FLOWPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputs":{"image":{"url":"https://example.com/image.png"},"image_2":{"url":"https://example.com/image_2.png"}}}' | jq -r .id)

# Then ask for it; each call waits up to 60 s for it to finish
curl "https://www.flowpx.io/api/v1/runs/$RUN_ID?wait=60" -H "Authorization: Bearer $FLOWPX_API_KEY"
```
