> ## Documentation Index
> Fetch the complete documentation index at: https://docs.convertly.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Forma AI & ML

> ML background removal, privacy detection, standard and Forma AI super-resolution, and generative transforms on CDN URLs.

Convertly supports AI and ML parameters on the same CDN URL.

* **ML background removal** (`bgRemove`) and privacy detection (`blurFaces`, `pixelateFaces`, `blurPlates`, `pixelatePlates`) are available on all plans and do not consume Forma quota.
* **Standard super-resolution** (`upscale=1`, `2`, or `4`) is free on public URLs. It resamples and sharpens existing pixels; it does not reconstruct detail that is missing from a tiny, blurred, or heavily compressed source.
* **Forma AI transforms** (`upscale=ai`, background replace, object removal, generative fill, text-to-image) bill against your workspace [Forma AI quota](/docs/ai-tools) and require a [signed URL](/docs/image-cdn/presets-and-signing#signed-urls) on a signed or private CDN endpoint.

<Frame caption="ML background removal. `?bgRemove=1&format=webp` on a product photo (lavender canvas via `pad` + `bg`).">
  <img src="https://cdn.convertly.sh/cvly/o/convertly-site/docs/cdn-transforms/examples/ai-bg-remove.webp?v=docs-20260717&format=auto&q=auto:eco" alt="Product with background removed on a styled canvas" className="w-full rounded-xl" />
</Frame>

<Frame caption="Original (left) vs ML `?bgRemove=1` (right).">
  <img src="https://cdn.convertly.sh/cvly/o/convertly-site/docs/cdn-transforms/examples/ai-bg-remove-before-after.webp?v=docs-20260717&format=auto&q=auto:eco" alt="Background removal before and after" className="w-full rounded-xl" />
</Frame>

<Frame caption="Forma background replace. signed URL with `bgReplace=…`.">
  <img src="https://cdn.convertly.sh/cvly/o/convertly-site/docs/cdn-transforms/examples/ai-bg-replace.webp?v=docs-20260717&format=auto&q=auto:eco" alt="Product on replaced studio background" className="w-full rounded-xl" />
</Frame>

<Frame caption="Text-to-image. `?ai=generate&aiPrompt=…&ar=16:9` (signed URL).">
  <img src="https://cdn.convertly.sh/cvly/o/convertly-site/docs/cdn-transforms/examples/ai-generate.webp?v=docs-20260717&format=auto&q=auto:eco" alt="AI generated product hero image" className="w-full rounded-xl" />
</Frame>

<Frame caption="Forma object removal. `?objectRemovalRect=280,120,180,200` (signed URL).">
  <img src="https://cdn.convertly.sh/cvly/o/convertly-site/docs/cdn-transforms/examples/ai-object-remove-before-after.webp?v=docs-20260717&format=auto&q=auto:eco" alt="Object removal before and after" className="w-full rounded-xl" />
</Frame>

## Parameters

| Param                                       | Value                                                                                                                           | Quota    |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `bgRemove` (`bg-remove`)                    | `1`, `true`, `yes`, or `on` - ML background removal with alpha.                                                                 | None     |
| `blurFaces` / `pixelateFaces`               | Automatic face privacy for image CDN outputs. See [Face and plate privacy](/docs/image-cdn/transforms/face-privacy).            | None     |
| `blurPlates` / `pixelatePlates`             | Automatic license-plate redaction for image CDN outputs. See [Face and plate privacy](/docs/image-cdn/transforms/face-privacy). | None     |
| `upscale`                                   | `1`, `2`, or `4`. deterministic resampling and sharpening before resize (see [limits](#super-resolution-limits)).               | None     |
| `upscale`                                   | `ai` or `forma`. Forma AI super-resolution with detail recovery for soft or low-resolution sources.                             | Forma AI |
| `bgReplace` (`bg-replace`)                  | URL-encoded scene prompt. Keeps the subject, replaces the background.                                                           | Forma AI |
| `objectRemovalRect` (`object-removal-rect`) | Region to remove: `x,y,w,h` in source pixels or percentages. Optional `objectRemovalPrompt`.                                    | Forma AI |
| `fill=gen` + `fillGenPrompt`                | Generative outpaint. Add `fillPad=120` or per-side `fillExpandTop` / `Right` / `Bottom` / `Left`.                               | Forma AI |
| `ai=generate` + `aiPrompt`                  | Text-to-image. Optional `ar=16:9` for aspect ratio. Ignores the source file bytes.                                              | Forma AI |

**Signed URLs required:** `upscale=ai`, `bgReplace`, `objectRemovalRect`, `fill=gen`, and `ai=generate` must use an [HMAC-signed URL](/docs/image-cdn/presets-and-signing#signed-urls) (`s=` + optional `exp=`) so premium transforms cannot be tampered with in transit. `bgRemove`, face/plate privacy, and standard `upscale=1|2|4` work on unsigned public URLs.

```html theme={"system"}
<!-- ML background removal (no Forma quota) -->
<img src="https://cdn.convertly.sh/{key}/{id}?bgRemove=1&format=webp" />

<!-- Standard super-resolution (free) -->
<img src="https://cdn.convertly.sh/{key}/{id}?upscale=2&w=1600&format=webp" />

<!-- License-plate privacy (no Forma quota) -->
<img src="https://cdn.convertly.sh/{key}/{id}?blurPlates=1&w=1200&format=webp" />

<!-- Face privacy (no Forma quota) -->
<img src="https://cdn.convertly.sh/{key}/{id}?pixelateFaces=1&facePixelate=20&w=1200&format=webp" />

<!-- Forma AI super-resolution (signed URL + quota) -->
<img src="https://cdn.convertly.sh/{key}/{id}?upscale=ai&w=1600&s=…&exp=…&format=webp" />

<!-- Forma background replacement (signed URL + quota) -->
<img src="https://cdn.convertly.sh/{key}/{id}?bgReplace=sunset%20beach&s=…&exp=…&w=800&format=webp" />

<!-- Object removal in a source region -->
<img src="https://cdn.convertly.sh/{key}/{id}?objectRemovalRect=120,80,200,160&s=…&w=1200" />

<!-- Generative fill / outpaint -->
<img src="https://cdn.convertly.sh/{key}/{id}?fill=gen&fillGenPrompt=extend%20the%20forest&fillPad=200&s=…&w=1200" />
```

Forma transforms run on the **source image first**, then sizing, crop, and encode params apply. Use `bgRemove=1` alone when you need a transparent PNG cutout. Use `bgReplace=…` when you want a new scene. Forma keeps the subject and replaces the background in one step.

## Super-resolution (`upscale`)

Standard `upscale=1|2|4` enlarges the source with high-quality resampling and mild sharpening before `w`, `h`, crop, and format params run. It is best when the source is already reasonably sharp and you want a cleaner high-DPI derivative than browser-side scaling. It cannot recover eyes, text, fur, or texture that is not present in the source. Use `upscale=ai` when you want Forma AI to recover or synthesize finer detail (bills Forma AI units).

<Frame caption="Small delivery (`w=320`, left) vs `upscale=2&w=1280` (right).">
  <img src="https://cdn.convertly.sh/cvly/o/convertly-site/docs/cdn-transforms/examples/ai-upscale-before-after.webp?v=docs-20260717&format=auto&q=auto:eco" alt="Super-resolution before and after" className="w-full rounded-xl" />
</Frame>

<Columns cols={2}>
  <Frame caption="Resize only. `?w=1280`.">
    <img src="https://cdn.convertly.sh/cvly/o/convertly-site/docs/cdn-transforms/examples/ai-upscale-sharp-only.webp?v=docs-20260717&format=auto&q=auto:eco" alt="Resize-only upscale comparison" className="w-full rounded-xl" />
  </Frame>

  <Frame caption="Forma AI super-resolution. `?upscale=ai&w=1280` (signed).">
    <img src="https://cdn.convertly.sh/cvly/o/convertly-site/docs/cdn-transforms/examples/ai-upscale.webp?v=docs-20260717&format=auto&q=auto:eco" alt="Forma AI super-resolution result" className="w-full rounded-xl" />
  </Frame>
</Columns>

Use `upscale=2` when you need a larger, cleaner derivative from a decent source. Use `upscale=ai` for tiny or blurry sources where interpolation alone would only make a larger blurry image.

### Super-resolution limits

| Longest source edge | Maximum upscale factor                 |
| ------------------- | -------------------------------------- |
| Under 2048 px       | Up to **4×**                           |
| 2048–4096 px        | Up to **2×**                           |
| Over 4096 px        | No upscale (resize params still apply) |

Forma AI upscaling improves detail but cannot fully recover illegible text or heavily corrupted sources. For the clearest before/after in your own assets, start from a moderately small source (roughly 320–800 px on the long edge).

## Tips

* **Difficult cutouts** (contact shadows, glass, fine hair): try `bgReplace=…` first. If you still need a standalone transparent asset, use `bgRemove=1` on a separate URL.
* **Heavy Forma load:** the CDN may return **423 Locked** with `Retry-After: 30`. Retry the same signed URL; successful responses are cached at the edge.
* **Studio/API access:** standard upscale is free in [Forma AI](/docs/ai-tools) studio. The same Forma operations are available via `POST /api/ai/transform`.
