The gap around our busiest image endpoint
image-generate is the most-used image endpoint in the catalog. Most of the time, though, a raw generation isn't the finished asset a buyer actually wants — a product photo needs sharpening and a transparent background before it's ready to drop into a listing or an ad unit. Getting there today means three separate paid calls, with the buyer's agent passing an image URL from one to the next by hand.
image-asset-pipeline does that hand-off itself. Send a prompt, get back a sharpened, cutout-ready PNG.
What it does
One call runs three stages in order:
image-generateturns the prompt into an image.image-upscalesharpens it.remove-bgstrips the background to a transparent PNG.
Each later stage is optional and can fail without failing the whole call. If upscaling doesn't come back, the generated image carries forward as the input to background removal. If background removal doesn't come back, the sharpened (or generated) image is still returned as the final asset. The response marks the call degraded when that happens and reports which stage carried forward, so a buyer's agent can see exactly what it got instead of guessing.
{
"prompt": "a red leather handbag on a white background",
"upscale": true,
"remove_bg": true
}
returns
{
"image_url": "https://.../cutout/handbag.png",
"stages": {
"generated": { "url": "https://.../gen/handbag.png" },
"upscaled": { "url": "https://.../upscaled/handbag.png" },
"cutout": { "url": "https://.../cutout/handbag.png" }
},
"composed_of": ["image-generate", "image-upscale", "remove-bg"],
"degraded": false
}
Set upscale: false or remove_bg: false to skip a stage outright — useful when a buyer only wants a sharpened image and no cutout, or vice versa.
Why sequential, not parallel
Most composites in this cluster fan constituent calls out in parallel because the inputs don't depend on each other. This one can't: image-upscale needs the URL image-generate produced, and remove-bg needs the URL whichever prior stage finished with. Each stage still reports its own timing and pass/fail status in components, the same telemetry shape every composite in this cluster uses — it's just three stages run in order instead of one batch run at once.
Priced at $0.08, it sits between the underlying calls' combined cost and what three separate round trips would cost an agent in coordination overhead.