Image Editing
Upscale, remove backgrounds, and inpaint or outpaint existing images.
The image editing endpoints take an existing image as input and return a transformed image. They live on dedicated routes alongside image generation, with their own request shape and pricing.
| Endpoint | Description |
|---|---|
POST /v2/images/upscale | Sharpen, denoise, and enlarge an image. |
POST /v2/images/background-remove | Cut the subject out and return a transparent (or solid-colour) background. |
POST /v2/images/edit | Inpaint a masked region or outpaint to extend the canvas. |
All three behave like the generation endpoints — they return immediately with a jobId, deduct credits at submission, and emit the same webhook events when the job moves through QUEUED → PROCESSING → COMPLETED | FAILED. Refunds on failure work the same way.
Common request fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model identifier (see per-endpoint pages). |
webhookUrl | string | No | URL to receive webhook notifications. |
webhookEvents | string[] | No | Events to subscribe to: "progress", "completed", "failed". |
<modelParams> | object | Yes | Per-model params object — name varies (topazUpscaleParams, clarityUpscaleParams, briaBgRemoveParams, lab851BgRemoveParams, fluxFillParams). |
The per-model params object always carries the source image URL plus any model-specific knobs; see each model's page for the exact field set.
Idempotency
Include an Idempotency-Key header to prevent duplicate jobs if the same request is sent twice.
Response
Status: 202 Accepted
{
"jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "QUEUED"
}Poll GET /v2/jobs/:id — the completed job carries an images array on result (single entry for these endpoints) hosted on the Apiframe CDN with the standard 90-day retention.
Available endpoints
Upscale (POST /v2/images/upscale)
| Model | Identifier | Description |
|---|---|---|
| Topaz Image Upscale | "topaz-image-upscale" | Photo and forensic upscaler — best for realistic content. |
| Clarity Upscaler | "clarity-upscale" | Creative "hi-res fix" — invents detail with a steering prompt. |
Background remove (POST /v2/images/background-remove)
| Model | Identifier | Description |
|---|---|---|
| Bria Background Remove | "bria-bg-remove" | State-of-the-art alpha matte (RMBG 2.0). |
| 851-labs Background Remove | "851-bg-remove" | Cheap and fast for high-volume jobs. |
Inpaint / Outpaint (POST /v2/images/edit)
| Model | Identifier | Description |
|---|---|---|
| Flux Fill Pro | "flux-fill-pro" | Inpaint with a mask, or outpaint to extend the canvas. Mode-switched. |
Error responses
| Status | Error | Meaning |
|---|---|---|
400 | Validation error | Invalid parameters — check details. |
401 | Unauthorized | Missing or invalid API key. |
402 | Insufficient credits | Not enough credits to run this model. |
503 | Service unavailable | Job queue is temporarily down. |