Register your existing services with the gateway to enable routing and allow the gateway to retrieve service endpoints. AI Gateway supports adding services from various sources, such as container services, fixed addresses, DNS domain names, and Function Compute.
Procedure
AI Gateway does not modify your requests. When a request is forwarded to a backend service that uses a domain name, the gateway does not rewrite the `Host` header to the configured domain name.
The gateway uses services to dynamically detect changes to backend resources. This enables unified management of traffic routing, administration, and security protection. AI Gateway supports creating services from the following sources: AI services, Agent services, DNS domain names, Fixed addresses, Container services, SAE Kubernetes services, Function Compute (FC), and MSE Nacos.
AI service
Log on to the AI Gateway console. On the gateway list page, select the region of your instance and click the instance ID. In the navigation pane on the left, click Service, and then click Create Service.
On the Create Service panel, configure the following parameters:
Service Source: Select AI Service.
Service Name: Enter a custom name for the service.
Large Model Supplier: Supported providers are Alibaba Cloud Model Studio, PAI-EAS, Deepseek, OpenAI Compatible, OpenAI, Azure, Gemini, Bedrock, Claude, Moonshot AI, Baichuan, Yi, Zhipu AI, Hunyuan, StepFun, Spark, Doubao, and MiniMax.
ImportantThe large model capabilities offered through AI services are not provided directly by AI Gateway. Before you use these services, you must assess their suitability and reliability. Ensure that your use of the service complies with all applicable laws, regulations, and user agreements. We are not responsible for any consequences that result from non-compliance.
Service Address (base_url): Enter the base URL of the large model service. The format is
https://{domain}/v1.For the Azure service provider, the service address is
https://{endpoint}/openai/deployments/{deployment-id}/chat/completions?api-version={api-version}.API-KEY: Enter the API key required to access the large model service. If you use Alibaba Cloud Model Studio, obtain the API key from the Alibaba Cloud Model Studio API-KEY page. For other large model providers, consult the corresponding service provider (SP).
After you finish the configuration, click OK.
Agent service
Log on to the AI Gateway console. On the gateway list page, select the region of your instance and click the instance ID. In the navigation pane on the left, click Service, and then click Create Service.
On the Create Service panel, configure the following parameters:
Service Source: Select Agent Services.
Service Name: Enter a custom name for the service.
Service Provider: Select Alibaba Cloud Model Studio, Dify, or Custom.
ImportantThe agent capabilities offered through Agent services are not provided directly by AI Gateway. Before you use these services, you must assess their suitability and reliability. Ensure that your use of the service complies with all applicable laws, regulations, and user agreements. We are not responsible for any consequences that result from non-compliance.
Alibaba Cloud Model Studio
API Endpoint: Enter the endpoint of the Agent service. The default is
https://dashscope.aliyuncs.com/api/v1.APP ID and API-KEY: Obtain the application ID and API Key from the Alibaba Cloud Model Studio console.

Dify
API Endpoint: Enter the endpoint address for the Agent service. The default is
https://api.dify.ai/v1.Application Type: Select Agent or Workflow.
Agent: Select this option for the agent type.
Workflow: Select this option for the workflow type.
API-KEY: Obtain the key from the service provider.
Custom
API Address: Enter the endpoint of the Agent service.
API KEY: Obtain the key from the service provider.
After you finish the configuration, click OK.
DNS domain name
AI Gateway can use DNS parsing results as backend service endpoints.
Log on to the AI Gateway console. On the gateway list page, select the region of your instance and click the instance ID. In the navigation pane on the left, click Service, and then click Create Service.
On the Create Service panel, configure the following parameters:
Service Source: Select DNS Domain Name.
Service Name: Enter a custom name for the service.
Service URL: Enter the backend node address of the service. The format is
<DNS domain name>:<service port>. You can enter multiple addresses separated by commas (,).ImportantIf you specify a public IP address, you must configure a NAT Gateway.
TLS Mode: The default is disabled.
Disabled: TLS is not required to access the service.
TLS: Enable one-way TLS when you need to access the service using HTTPS.
mTLS: Enable mTLS when you need mutual authentication.
After you finish the configuration, click OK.
Fixed address
If the service does not use a service discovery mechanism, you must manually add the backend node addresses.
Log on to the AI Gateway console. On the gateway list page, select the region of your instance and click the instance ID. In the navigation pane on the left, click Service, and then click Create Service.
On the Create Service panel, configure the following parameters:
Service Source: Select Fixed Address.
Service Name: Enter a custom name for the service.
Service URL: Enter the backend node address of the service. The format is
<IP>:<service port>. You can enter multiple addresses separated by commas (,).ImportantIf you specify a public IP address, you must configure a NAT Gateway.
TLS Mode: The default is disabled.
Disabled: TLS is not required to access the service.
TLS: Enable one-way TLS when you need to access the service using HTTPS.
mTLS: Enable mTLS when you need mutual authentication.
After you finish the configuration, click OK.
Container service
When you add a container service as a service source, the gateway retrieves the service list from the specified ACK or ACK Serverless cluster and adds the services and their backend node addresses.
Log on to the AI Gateway console. Select the region of your instance and click the instance ID. In the navigation pane on the left, click Service.
Create a source
Click the Source tab, and then click Create Source. On the Create Source panel, configure the following parameters:
Source Type: Select ACK to discover backend services using the Kubernetes server.
ACK/ACS/ACK Serverless Cluster: Select the cluster where the backend service is located.
ImportantIf no ACK, ACS, or ACK Serverless cluster exists in the current VPC, you must first create an ACK managed cluster.
To add a service source from another VPC, you must create a gateway instance in that VPC before you can select the cluster.
A single gateway instance can be associated with a maximum of three ACK container services.
AI Gateway can only add Nacos or ACK sources from within the same VPC. Adding service sources across VPCs is not supported.
After you finish the configuration, click OK.
Create a service
Click the Service tab, and then click Create Service. On the Create Service panel, configure the following parameters:
Service Source: Select ACK.
The gateway retrieves the service list from the specified ACK or ACK Serverless cluster and adds the services and their backend node addresses.
Namespace: Select the namespace of the cluster. By default, services in the `arms-prom`, `kube-system`, and `mse-pilot` namespaces are hidden.
Services: Select a service from the list. By default, services with names that start with `consumers` are hidden.
After you finish the configuration, click OK.
SAE Kubernetes service
Before you add an SAE Kubernetes service as a source, you must enable K8s Service registration and discovery for the SAE application.
Log on to the AI Gateway console. On the gateway list page, select the region of your instance and click the instance ID. In the navigation pane on the left, click Service, and then click Create Service.
On the Create Service panel, configure the following parameters:
Service Source: Select SAE Kubernetes. The SAE application must have application service access configured based on K8s ServiceName.
Namespace: Select the namespace of the cluster. By default, services in the `arms-prom`, `kube-system`, and `mse-pilot` namespaces are hidden.
Services: Select a service from the list. By default, services with names that start with
consumers:are hidden.
After you finish the configuration, click OK.
Function Compute (FC)
Only Function Compute 3.0 is supported. Service sources from Function Compute 2.0 are not supported.
Log on to the AI Gateway console. On the gateway list page, select the region of your instance and click the instance ID. In the navigation pane on the left, click Service, and then click Create Service.
On the Create Service panel, configure the following parameters:
Service Source: Select Function Compute.
Function List: Select a function from the list.
Version or Alias: Select the version or alias of the function.
After you finish the configuration, click OK.
MSE Nacos
Log on to the AI Gateway console. Select the region of your instance and click the instance ID. In the navigation pane on the left, click Service.
Create a source
Click the Source tab, and then click Create Source. On the Create Source panel, configure the following parameters:
Source Type: Select MSE Nacos to discover backend services using the MSE Nacos service registry.
Nacos Instance: Select a Nacos cluster.
ImportantIf no MSE Nacos cluster exists in the current VPC, you must first create an MSE Nacos cluster.
To add a service source from another VPC, you must create a gateway instance in that VPC before you can select the Nacos cluster.
The cluster list displays only MSE Nacos instances for which
MCPEnabledis set to `true`. You can change this setting in the MSE Nacos parameter configuration.A single gateway instance can be associated with only one Nacos instance.
After you finish the configuration, click OK.
Create a service
Click the Services tab, and then click Create Service. On the Create Service panel, configure the following parameters:
Service Source: Select MSE Nacos.
The gateway retrieves the service list from the specified Nacos cluster and adds the services and their backend node addresses.
Namespace: Select a namespace. By default, services in the arms-prom, kube-system, or mse-pilot namespaces are not displayed.
Services: Select a service from the list. By default, services with names that start with
consumers:are hidden.
After you finish the configuration, click OK.