This document describes information common to all Aidge APIs, including access methods, authentication, request and response formats, and synchronous and asynchronous models. Read this section before you start integrating.
Base URLs
Site | Endpoint |
China site |
|
International site |
|
Response format
All API calls return a JSON object with a standardized structure that includes the Code, Message, RequestId, Data, and Success fields.
Sample success response:
{
"Code": "success",
"Message": "Success",
"RequestId": "2157065A-D6C8-1F3E-A4D0-B1234567890",
"Data": { "TranslatedText": "..." }
}Sample error response:
{
"Code": "InvalidParameter",
"Message": "Invalid parameter: SourceLanguage",
"RequestId": "2157065A-D6C8-1F3E-A4D0-B1234567890",
"Data": null
}All Aidge APIs use a standard set of error codes, such as InvalidParameter, FreeQuotaExhausted, and InputContentBlocked. For a complete list of error codes and troubleshooting guides, see error codes.
Synchronous and asynchronous APIs
Type | Model | Applicable APIs |
synchronous | A single request that returns results immediately. | text translation, text correction, language detection, image translation (Standard Edition), image translation (Pro Edition), smart matting, smart inpainting, smart cropping, smart element recognition, size chart detection, product category matching, product property matching, parcel dimension and weight review, and copywriting optimization |
asynchronous | Submit a task and then poll for the result. | document translation, smart image generation, size chart extraction, product asset optimization (Lite), product asset optimization (Pro), video translation, and inpainting for video |
For asynchronous APIs, call an endpoint to submit a task and get a TaskId. Then, poll the Query Asynchronous Task Results API with this ID until the task Status is COMPLETED or FAILED.
See Query Asynchronous Task Results for the complete contract of this API (POP Gateway name: QueryAsyncTaskResult). The contract specifies request and response parameters (such as Data.Status, Data.Result, Data.UsageMap, and Data.extraInfo), response examples, and usage notes.
SKU list
The Aidge platform offers 7 API SKUs, categorized into the following two groups based on their capabilities:
Multimodal translation (4 SKUs)
text translation -- Supports 100+ language pairs, including pivot languages.
image translation (Standard Edition) / image translation (Pro Edition) -- Translates text embedded in images. The Pro Edition uses a large multimodal model to deliver higher translation quality and support editor layout information.
video translation -- Provides an end-to-end workflow for audio and video content.
Asset optimization (3 SKUs)
smart element recognition -- Identifies text, logos, watermarks, and colored blocks containing text.
smart inpainting -- Synchronously removes text, specific objects, transparent text blocks, and visual clutter.
smart matting -- Synchronously removes image backgrounds.
Rate limits
Each API has its own queries-per-second (QPS) limit. For more information, see Rate limits.