Elements Removal
Last updated
Was this helpful?
Last updated
Was this helpful?
The Elements Removal editor allows users to remove specific objects from images according to their needs. Built upon the core capabilities of smart elements removal API (see ‘Smart Elements Removal API Introduction”), it also provides manual removal tools for precise image processing, simplifying the image editing process.
· Offers multiple removal methods, including intelligent detection and manual brushing
· Supports targeted removal of various objects such as watermarks, text, logos, and text-containing color blocks
· Enables secondary retouching and repairing of the results, allowing users to restore and refine specific areas (e.g., model hands, product details) for improved visual output
· Supports adding design elements such as text, stickers, and other materials
The pricing of each capability in the Workbench is consistent with the corresponding API product. Charges are based on prepaid resource packages per product, and you may purchase resource packages on demand according to the actual situation. Resource packs are valid for 1 year and are currently non-refundable.
· Editor products and API products are independent of each other, and their resource packages are not interchangeable. For example, if you need both the Image Translation API and the Image Translation Editor, please purchase both packages separately.
· In the editor, charges only occur when ‘Generate’ button is clicked. Before billing, a confirmation will be presented to the integrator (see the Editor Integration Guide for configuration details).
Integration instructions and code examples can be found in the Editor Integration Guide.
In particular, as stated in the ‘Embedding the Editor Static Page’ section of the Editor Integration Guide, the capability routing and input parameters required for the construction of the src field are as follows.
'https://editor.d.design/editor/index.html/#/elimination'
Depending on the content that the integrator wishes to present when opening the editor page, different input parameters can be selected.
All parameters are optional. If none are filled in, the editor will display the initial state upon opening the page. Users can then upload images and other operations within the editor to complete the generation task.
imageUrl
String
No
Image URL.
Image requirements:
No larger than 3000x3000 pixels;
Size no more than 10MB;
Supports png, jpeg, jpg, bmp, webp formats.
const eliminationParam = { apiHost: "aibcn", imageUrl: 'https://next-ubanner.oss-cn-beijing.aliyuncs.com/ALIWOOD_TEMPLATE/2020-06-03/test/test1.jpg' }; // Processed into a string that can be concatenated const payloadString = encodeURIComponent(JSON.stringify(eliminationParam));
// Tool page URL const sceneURL = 'https://editor.d.design/editor/index.html/#/elimination';
// Concatenated into the final link
const iframeURL = ${sceneURL}?payload=${payloadString}
;
📢Note:Ensure that the field name of payloadString matches the corresponding field name in the server-provided page API.
Integrator can obtain result data in two ways: (1) Event listener; (2) Manual trigger. See the ‘Result Retrieval’ section in the Editor Integration Guide for detailed implementation.
Error messages are uniformly returned via API. Please kindly refer to the Editor Integration Guide for the returned data structure. Error codes are shown as follows.
Capability
Error Codes (errCode)
Description
Background removal
cutout-imageLoadFail
The image failed to load, please click Regenerate.
The integrator can customize error message based on the errCode to be sent to the user.
Example: