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
Sign in and navigate to our page below to download the SDK
Select the development language you require and download the corresponding SDK.
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 =newIopClient("https://api.aidc-ai.com","your key","your secret");IopRequest request =newIopRequest();// Adding this trial tag in header means using the trial resource to test, // please remove this ##trial tag after you purchased the APIrequest.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 examplerequest.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());
import iopclient = iop.IopClient("https://api.aidc-ai.com", "your appKey", "your appSecret")request = iop.IopRequest('/ai/image/cut/out')request.set_protocol('GOP')##Adding this trial tag in header means using the trial resource to test, please remove this ##trial tag after you purchased the API
request.add_header("x-iop-trial","true")request.add_api_param('backGroundType', 'WHITE_BACKGROUND')request.add_api_param('targetHeight', '1000')request.add_api_param('targetWidth', '800')request.add_api_param('imageUrl', 'https://ae01.alicdn.com/kf/Sa78257f1d9a34dad8ee494178db12ec8l.jpg')response = client.execute(request)print(response.type)print(response.body)