The AI Guardrails API uses the following endpoint format:
http(s)://green.{region}.aliyuncs.com/ServiceAPI{region}: the region identifier (see the table below)ServiceAPI: the URI of the specific API operation (see the description of each operation)
Example — call the pornography detection API in China (Shanghai):
http(s)://green.cn-shanghai.aliyuncs.com/green/image/scanHTTPS is supported for SDK versions 3.0.0 and later.
Choose an endpoint type
Two endpoint types are available:
Public endpoint — use when your server is outside Alibaba Cloud, or when it is in a different region. Choose the region closest to your server to reduce call latency.
Internal endpoint — use when your server is on Alibaba Cloud in the same region. API calls over the internal network have significantly lower end-to-end latency than calls over the public network.
Supported regions and endpoints
| Region | Public endpoint | Internal endpoint |
|---|---|---|
| China (Shanghai) | green.cn-shanghai.aliyuncs.com | green-vpc.cn-shanghai.aliyuncs.com |
| China (Beijing) | green.cn-beijing.aliyuncs.com | green-vpc.cn-beijing.aliyuncs.com |
| China (Shenzhen) | green.cn-shenzhen.aliyuncs.com | green-vpc.cn-shenzhen.aliyuncs.com |
| Singapore | green.ap-southeast-1.aliyuncs.com | green-vpc.ap-southeast-1.aliyuncs.com |
| Germany (Frankfurt) | green.eu-central-1.aliyuncs.com | green-vpc.eu-central-1.aliyuncs.com |
| US (Virginia) | green.us-east-1.aliyuncs.com | green-vpc.us-east-1.aliyuncs.com |
Service availability by region
Not all moderation services are available in every region. The following table shows which services are deployed in each region.
| Service | China (Shanghai) | China (Beijing) | China (Shenzhen) | Singapore | Germany (Frankfurt) | US (Virginia) |
|---|---|---|---|---|---|---|
| Pornography detection — images and videos | ✓ | ✓ | ✓ | ✓ | Images only | Images only |
| Terrorism and political content detection — images and videos | ✓ | ✓ | ✓ | ✓ | Terrorism, images only | Terrorism, images only |
| Ad detection — images and videos | ✓ | ✓ | ✓ | ✓ | Images only | Images only |
| Sensitive face detection — images and videos | ✓ | ✓ | ✓ | ✓ | — | — |
| General image OCR (excluding cards and certificates) | ✓ | ✓ | ✓ | ✓ | ✓ | — |
| Text moderation | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Voice moderation | ✓ | ✓ | ✓ | — | — | — |
China (Shanghai) and China (Beijing) support all services. For the full list of available API operations, see API overview.