SDK Recipes›AI Product Photo → Remove Background → Upscale → WebP
AI Photo Workflow

AI Product Photo → Remove Background → Upscale → WebP

Turn a raw product photo into a transparent, higher-resolution, web-ready asset with a fully browser-side AI pipeline.

ai-background-remover
→
ai-image-upscaler
→
resize-image → WebP
InputJPG / PNG / WebP
Final resultWebP File
Tools usedai-background-remover → ai-image-upscaler → resize-image

Complete code

const cutout = await client.run("ai-background-remover", {
  file: productPhoto
});

const upscaled = await client.run("ai-image-upscaler", {
  file: cutout.files[0],
  options: {
    qualityMode: "natural"
  }
});

const webReady = await client.run("resize-image", {
  file: upscaled.files[0],
  options: {
    width: 1600,
    keepAspectRatio: true,
    format: "webp",
    quality: 0.9
  }
});

const finalFile = webReady.files[0];
Before adapting this recipe, use client.describe(toolId) or the Tool Reference page to verify exact file limits, option values, and supported modes.