Aidge Resource
Try for freeWorkplace
  • LATEST ADVANCEMENTS
    • Introducing Marco-MT: Bringing Translation to the Next Level with LLM
  • GETTING STARTED
    • Quick Start
    • Account and Authentication
    • Your First API Request
    • Test Your API Requests
    • Service Level Agreement
    • FAQ
  • API REFERENCE
    • E-commerce Information Translation
      • Marco Translator
        • Marco Translator API Reference
      • Image Translation
        • Image Translation Pro Version API Reference
        • Image Translation Pro Version Result API Call Description
        • Image Translation Standard Version API Reference
    • E-commerce Image Editing
      • Image Background Removal
        • Image Background Removal API Reference
      • Image Upscaling
        • Image Upscaling API Reference
      • Image Cropping
        • Image Cropping API Reference
      • Image Elements Removal
        • Image Elements Removal API Reference
      • Image Elements Detection
        • Image Elements Detection Submit API Reference
        • Image Elements Detection Query API Reference
    • E-commerce Virtual Model
      • Virtual Model Alternation
        • Virtual Model Alternation Submit API Reference
        • Virtual Model Alternation Result Query API Reference
      • Virtual TryOn
        • Virtual Try-on Submit API Reference
        • Virtual Try-On Query API Reference
        • General Model Library Reference
      • Hands&Feet Repair
        • Hands&Feet Repair Submit API Reference
        • Hands&Feet Repair Query API Reference
    • Editor Documentation
      • AI Model Editor
      • AI Image Editor
        • Image Workbench
        • Background Removal
        • Elements Removal
        • Image Translation
Powered by GitBook
On this page
  • Product Overview
  • Key features
  • Pricing
  • Editor Integration
  • Capability Route
  • Capability Input Parameters
  • Example of src Concatenation
  • Result Retrieval
  • Error Codes

Was this helpful?

  1. API REFERENCE
  2. Editor Documentation
  3. AI Image Editor

Background Removal

PreviousImage WorkbenchNextElements Removal

Last updated 24 days ago

Was this helpful?

Product Overview

On the basis of the core functionalities of the Background Removal API product (see ‘Smart background removal API Introduction’), the background removal results can be manually refined and adjusted through the editor, including the proportion of the main body, background color, canvas size, etc., such as to meet the diversified needs of users.

Key features

· Customizing canvas size and background color

· Flexible adjustment of subject scale, size, and position

· Manual refinement tools to optimize background removal results

· Ability to add text, stickers, and other design elements

Pricing

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

Editor Integration

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.

Capability Route

'https://editor.d.design/editor/index.html/#/cutout'

Capability Input Parameters

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.

Example of src Concatenation

const cutoutParam = { 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(cutoutParam));

// Tool page URL const sceneURL = 'https://editor.d.design/editor/index.html/#/cutout';

// 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.

Result Retrieval

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 Codes

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:

http://example.jpg/