Upscale a design
mode: "enhance" makes an HD copy of one image of a design you made with the API. Pass the image’s id (images[].id) as sourceImageId. It needs no photo.
const design = await client.designs.createAndWait({ mode: 'remodel', inputAssetId: photo.id, style: 'Japandi' });
const hd = await client.designs.createAndWait({ mode: 'enhance', sourceImageId: design.images[0].id,});console.log(hd.images[0].asset.url, hd.images[0].asset.width);design = client.designs.create_and_wait(mode="remodel", input_asset_id=photo["id"], style="Japandi")
hd = client.designs.create_and_wait(mode="enhance", source_image_id=design["images"][0]["id"])print(hd["images"][0]["asset"]["url"], hd["images"][0]["asset"]["width"])Price and limits
Section titled “Price and limits”- One upscale costs
enhanceCreditsfrom the catalog (1 credit today). In the app the HD copy is free; through the API it is charged, because a script can make thousands. - Up to 40 HD copies a day per account.
- An HD copy can’t be upscaled again: the API answers
422 already_hd. sourceImageIdmust be an image of a design made with a key, or the API answers422 source_not_found.
If you know up front you need large images, ask for size: "hd" or size: "4k" on the design itself instead. It costs a little more per image (see models[].credits in the catalog) and saves a second round trip.