ApiframeApiframe Docs
Image Editing

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.

EndpointDescription
POST /v2/images/upscaleSharpen, denoise, and enlarge an image.
POST /v2/images/background-removeCut the subject out and return a transparent (or solid-colour) background.
POST /v2/images/editInpaint 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

FieldTypeRequiredDescription
modelstringYesThe model identifier (see per-endpoint pages).
webhookUrlstringNoURL to receive webhook notifications.
webhookEventsstring[]NoEvents to subscribe to: "progress", "completed", "failed".
<modelParams>objectYesPer-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)

ModelIdentifierDescription
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)

ModelIdentifierDescription
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)

ModelIdentifierDescription
Flux Fill Pro"flux-fill-pro"Inpaint with a mask, or outpaint to extend the canvas. Mode-switched.

Error responses

StatusErrorMeaning
400Validation errorInvalid parameters — check details.
401UnauthorizedMissing or invalid API key.
402Insufficient creditsNot enough credits to run this model.
503Service unavailableJob queue is temporarily down.

On this page