Your First API Request

Download the necessary SDK and start making your first API requests within Aidge.

Once you have successfully obtain your AccessKey and AccessKey Secret, now we can proceed to set up your first API call.

To begin, you will need to download our SDK, which is necessary for accessing our API and ensures that your access is authenticated.

It is recommended to invoke the services using the Java SDK. Aidge's SDK offers functionalities for API request encapsulation, digest signature, response parsing, and message listening. By utilizing this SDK, you can effortlessly make API calls, retrieve API results, and monitor real-time messages.

Download SDK

  1. Sign in and navigate to our page below to download the SDK

  2. Select the development language you require and download the corresponding SDK.

JAVA SDKPYTHON SDK

Updated Time 2023-10-23

Updated Time 2023-10-23

Sample Code

Once you have obtained the SDK, below are some code examples for you to write up your first API request.

Here is a sample code for using the Java/Python SDK to call our API ( using image cut-out api as an example):

IopClient client = new IopClient("https://api.aidc-ai.com", "your key", "your secret");
IopRequest request = new IopRequest();
// Adding this trial tag in header means using the trial resource to test, 
// please remove this ##trial tag after you purchased the API
request.addHeaderParameter("x-iop-trial","true")
request.setApiName("/ai/image/cut/out");
request.addApiParameter("simplify", "true");
//adding parameters as in the api doc we provide etc. I only listed one for example
request.addApiParameter("backGroundType", "WHITE_BACKGROUND");
request.addApiParameter("targetHeight", "1000");
request.addApiParameter("targetWidth", "800");
request.addApiParameter("imageUrl", "https://ae01.alicdn.com/kf/Sa78257f1d9a34dad8ee494178db12ec8l.jpg");
IopResponse response = client.execute(request, Protocol.GOP);
System.out.println(response.getBody());

Last updated