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 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
  • Step 1: Account setup
  • Step 2: Test your API request
  • Step 3: Make your first API request
  • Step 4: Purchase API

Was this helpful?

  1. GETTING STARTED

Quick Start

Learn more about leveraging AI capabilities with Aidge and its workspace through this quick start guide.

PreviousIntroducing Marco-MT: Bringing Translation to the Next Level with LLMNextAccount and Authentication

Last updated 2 months ago

Was this helpful?

Complete the following 4 steps to set up your account and purchase your API:

If you have any questions about Aidge or require any assistance from us, please contact us via navigation bar or email us (aidge_support@service.alibaba.com).

Step 1: Account setup

Learn where to find your authentication key and how to access the Aidge API.

First, create a new Aidge developer account or sign in with an existing account.

Next, find your authentication key to access the API in the '' page in your workplace. It is important to keep your keys confidential. You should not use an API key in publicly-distributed code.

Step 2: Test your API request

We offer 1000 trial quota to help you familiarize and test how to use the Aidge API in your account. Check your trial quota in the '' page.

Whether you're new to exploring the capabilities of the Aidge API or have an established integration in a live setting, it's always strongly recommended to establish a secure testing environment to test features before going live.

Step 3: Make your first API request

Below is a sample code. Please note: The API domain for the call is https://api.aidc-ai.com.

IopClient client = new IopClientImpl("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);
System.out.println(response.getBody());
import iop

client = 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)
package main

import (
	"bytes"
	"crypto/hmac"
	"crypto/sha256"
	"encoding/hex"
	"fmt"
	"io/ioutil"
	"net/http"
	"strings"
	"time"
)

func main() {
	// Your personal data
	accessKeyName := "your access key name" // e.g. 512345
	accessKeySecret := "your access key secret"
	apiName := "api name"     // e.g. ai/text/translation/and/polishment
	apiDomain := "api domain" // e.g. api.aidc-ai.com or cn-api.aidc-ai.com
	data := "{your api request params}"

	// Basic URL (placeholders included)
	urlTemplate := "https://%s/rest/%s?partner_id=aidge&sign_method=sha256&sign_ver=v2&app_key=%s&timestamp=%s&sign=%s"

	// Timestamp in milliseconds
	timestamp := fmt.Sprintf("%d", time.Now().UnixNano()/int64(time.Millisecond))

	// Calculate SHA256 HMAC
	h := hmac.New(sha256.New, []byte(accessKeySecret))
	h.Write([]byte(accessKeySecret + timestamp))
	sign := strings.ToUpper(hex.EncodeToString(h.Sum(nil)))

	// Create the final URL with real values
	finalURL := fmt.Sprintf(urlTemplate, apiDomain, apiName, accessKeyName, timestamp, sign)

	// Add "x-iop-trial": "true" for trial
	headers := map[string]string{
		"Content-Type": "application/json",
	}

	// Do HTTP POST request
	response, err := makeRequest("POST", finalURL, data, headers)
	if err != nil {
		fmt.Printf("Error making request: %s\n", err)
		return
	}
	fmt.Printf("Response: %s\n", response)
}

// makeRequest handles the HTTP request to the specified URL with the given data and headers
func makeRequest(method, url, data string, headers map[string]string) (string, error) {
	client := &http.Client{}
	req, err := http.NewRequest(method, url, bytes.NewBuffer([]byte(data)))
	if err != nil {
		return "", err
	}

	for key, value := range headers {
		req.Header.Set(key, value)
	}

	resp, err := client.Do(req)
	if err != nil {
		return "", err
	}
	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return "", err
	}
	return string(body), nil
}
curl -X POST 'https://[api domain]/rest/[api name]?partner_id=aidge&sign_method=sha256&sign_ver=v2&app_key=[you api key name]&timestamp=[timestamp]&sign=[sha256 sign]' \
--header 'Content-Type: application/json' \
--data '{your api request params}'


Add --header 'x-iop-trial: true' for trial
[api domain]: API domain. e.g. "api.aidc-ai.com" or "cn-api.aidc-ai.com"
[api name]: API name. e.g. "ai/text/translation/and/polishment"
[you api key name]: Your api key name. e.g. "512345"
[timestamp]: Timestamp with millisecond. e.g. "1733194861440"
[sha256 sign]: Sign the secret+timestamp with your api key secret using HmacSHA256 algorithm. e.g. HmacSHA256(secret+timestamp, secret).toUpperCase()

Step 4: Purchase API

After logging into the Aidge workplace, you can purchase the API that you need from the API list.

After entering the API ordering page, click on the blue button 'Increase API usage' will redirect you to the cashier to start the binding and payment process.

Note: The website currently offers offers individual API resource packages on a subscription basis. If you have demands for bulk orders, Please contact us via navigation bar or email us (aidge_support@service.alibaba.com)

After completing the purchase, you can view the current order in the Order Management, and the API list will be credited with new API quota.

Currently, 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. Here is the for the SDK.Environmental dependencies for the JAVA SDK require Java SE/EE 1.5 or higher. The Python SDK requires Python 2.7 or above.

For other languages, you can use your own http client to invoke the services. More examples can be found in '' and our .

download link
API Key
git repositories
API Key
Dashboard