Debug an API

更新时间:
复制 MD 格式

The console provides an API debugging feature to help you quickly start development. The console has limits on request frequency and the total number of requests. For more information, see Trial limits.

Prerequisites: The IVP and OSS services are activated.

Follow these steps:

1. Upload an image to OSS

Go to the OSS console. Select a bucket in the China (Shanghai) region and upload the image that you want to process. If you do not have a bucket in the China (Shanghai) region, create one and set its access control list (ACL) to public-read.

For example:

2. Testing / Trial

Method 1: API Explorer

You can run this API operation directly in OpenAPI Explorer without needing to calculate signatures. Upon successful execution, OpenAPI Explorer automatically generates software development kit (SDK) code examples.

Method 2: Debug the API in the console

In the IVP console, go to the API Debugging page.

Select the API to debug. In the Request Body area, enter the request parameters in JSON format. For example, for image matting:

Input:

{
  "URL": "http://ivpd-demo.oss-cn-shanghai.aliyuncs.com/ivpd-demo/images/IMG_20190515_202100.jpg"
}

Then, click OK. The URL field in the response contains the URL of the matted image.