| Parameter | Type | Description | Example |
|---|---|---|---|
| object | The AI API configurations. | ||
| environmentId | string | The environment ID. | env-xxx |
| backendScene | string | The publishing scenario. | SingleService |
| autoDeploy | boolean | Specifies whether to enable automatic deployment. | true |
| gatewayId | string | The instance ID. | gw-xx |
| routeBackend | Backend | routeBackend | |
| gatewayInfo | GatewayInfo | The instance information. | |
| mock | HttpApiMockContract | The Mock settings. | |
| gatewayType | string | 网关类型 | API |
| customDomainIds | array | The IDs of the custom domain names. | |
| string | The domain name ID. | d-xxx | |
| serviceConfigs | array<object> | The service configurations. | |
| object | object | ||
| serviceId | string | The service ID. | svc-xxx |
| weight | long | The service weight. | 100 |
| modelNamePattern | string | The model name matching rule. | qwen-* |
| modelName | string | The model name. | qwen-max |
| intentCode | string | Intent classification code | INQUIRY |
| match | HttpApiBackendMatchConditions | Match conditions | |
| port | integer | Service port number | 80 |
| protocol | string | Service protocol | HTTP |
| gatewayServiceId | string | Legacy gateway service ID for backward compatibility | gw-svc-abc123 |
| name | string | Service display name | Qwen-Max-Service |
| version | string | Service version tag for tag-based routing scenarios | v2 |
| multiServiceRouteStrategy | string | Multi-service routing strategy type | ByWeight |
| observabilityRouteConfig | object | Observability metrics-based routing config | |
| mode | string | Routing mode Enumeration Value:
| LeastBusy |
| rateLimit | float | Max traffic ratio per single service | 0.8 |
| queueSize | integer | Queue size | 100 |
| policyConfigs | array<object> | The policy configurations. | |
| object | object | ||
| type | string | The type of the policy. Valid values: | AiFallback |
| enable | boolean | Specifies whether to enable the policy. | true |
| aiFallbackConfig | object | The fallback configurations | |
| serviceConfigs | array<object> | List of fallback service configurations | |
| object | object | ||
| serviceId | string | Service ID for fallback | svc-****** |
| targetModelName | string | targetModelName | gpt-4/llama3-70b |
| aiSecurityGuardConfig | object | AI Security Guard configuration | |
| serviceAddress | string | Security guard service address | https://api.example.com/v1 |
| checkRequest | boolean | Whether to check request content | true |
| checkResponse | boolean | Whether to check response content | true |
| checkRequestImage | boolean | Whether to check request content | true |
| checkResponseImage | boolean | Whether to check response content | true |
| requestCheckService | string | Request check service name | https://checker.example.com/validate-request |
| responseCheckService | string | Response check service name | https://checker.example.com/validate-response |
| requestImageCheckService | string | Request check service name | https://image-checker.example.com/scan |
| responseImageCheckService | string | Response check service name | https://image-checker.example.com/scan-response |
| riskAlertLevel | string | Risk alert level for content moderation | low/medium/high |
| riskConfig | array<object> | riskConfig | |
| object | object | ||
| type | string | Risk type identifier | K8S |
| level | string | Risk alert level | Critical |
| consumerRules | object | Consumer-specific rules | |
| pattern | string | Pattern for matching | first |
| matchType | string | Match type | term |
| bufferLimit | integer | bufferLimit | 50 |
| consumerRequestCheckService | array<object> | Consumer-specific request check configs | |
| object | object | ||
| name | string | Consumer name for matching | API |
| requestCheckService | string | Request check service name | https://checker.example.com/validate |
| requestImageCheckService | string | requestImageCheckService | https://image-check.example.com/scan |
| matchType | string | Match type | exact/prefix |
| modalityType | string | Modality type | text/image |
| consumerResponseCheckService | array<object> | Consumer-specific Response check configs | |
| object | object | ||
| name | string | Consumer name for matching | AI_API |
| responseCheckService | string | Response check service name | https://checker.example.com/validate-response |
| responseImageCheckService | string | responseImageCheckService | https://image-check.example.com/scan-response |
| matchType | string | Match type | term |
| modalityType | string | Modality type | text/image |
| consumerRiskLevel | array<object> | Consumer-specific risk level configs | |
| object | object | ||
| name | string | Consumer name for matching | APIG-UI |
| matchType | string | Match type | term |
| type | string | Risk type | K8S |
| level | string | Risk alert level | Critical |
| aiTokenRateLimitConfig | object | AI Token Rate Limit configuration | |
| rules | array<object> | List of rate limit rules | |
| object | object | ||
| limitType | string | Limit type | request/token |
| matchKey | string | Match key | user_id/api_path |
| matchType | string | Match type | term |
| matchValue | string | Match value | user123 |
| limitMode | string | Limit mode | local |
| limitValue | integer | Limit value | 100 |
| globalRules | array<object> | List of global rate limit rules | |
| object | object | ||
| limitType | string | Limit type for global rules | request |
| matchKey | string | Match key | user_id |
| matchType | string | Match type | term |
| matchValue | string | Match value | user123 |
| limitMode | string | Limit mode for global rules | local |
| limitValue | integer | Limit value for global rules | 100 |
| enableGlobalRules | boolean | Whether to enable global rate limit rules | true |
| customDomainInfos | array<object> | The information about the custom domain names. | |
| object | object | ||
| domainId | string | The domain name ID. | d-cshee6dlhtgkf4muio3g |
| name | string | The domain name. | hello-server.com |
| protocol | string | The protocol. | HTTP |
| subDomains | array<object> | The information about the sub-domain names. | |
| object | object | ||
| domainId | string | The domain name ID. | d-csmn42um1hksudfk9eng |
| name | string | The domain name. | test |
| protocol | string | The protocol. | HTTP |
| networkType | string | The network type. | Intranet |