Model Studio confidential inference service is built on hardware-based confidential computing technology for high-security scenarios. Data remains encrypted during transmission, computation, and storage, protecting the privacy and security of user prompts during cloud-based inference.
1 Confidential inference overview
Confidential inference is built on TEE (Trusted Execution Environment) hardware-level confidential computing technology, which effectively defends against multi-layer security threats including privileged attacks. Its core security features include:
- End-to-end encryption: Establishes a business-layer encrypted channel on top of HTTPS, covering the full link from the client to the confidential inference node. Each node randomly generates a root private key for session key negotiation, and each session independently derives an ephemeral key. All keys reside only in encrypted volatile storage; they are never written to disk or persisted and are destroyed when the session ends.
- Security hardening and measurement: Relies on the dual mechanism of chip-level hardware isolation and software hardening to perform full-chain measurement of the boot chain and runtime environment. At the block storage level, the root partition relies on the Merkle Tree mechanism to ensure integrity, and the data partition is encrypted with one-time keys to ensure confidentiality.
- Hardware/software transparency: The client directly accesses the TEE vendor to verify the authenticity of the remote attestation report generated by the verified hardware and checks the transparency log service to confirm the integrity of the server-side software artifacts.
2 Confidential inference advantages
- Defense-in-depth security: From chip-level hardware isolation and end-to-end encrypted transmission to client-verifiable remote attestation, it builds a multi-layer protection system covering hardware, transmission, and software. The platform does not retain plaintext prompts, model outputs, or encryption keys; the keys and content are controlled by the user.
- Low-intrusion access: Compatible with existing calling methods, no need to refactor business code. Only the call entry point and client SDK need to be replaced, and confidential and non-confidential paths can coexist under the same account. For calling methods, see Post-deployment invocation.
3 Billing
Confidential inference deployment is billed based on the Token list price, divided into three items: input, output, and context cache (implicit) hits.
Supported models: cmaas-qwen3.8-flash, cmaas-glm-5.3, cmaas-glm-5.2 (to be deprecated soon), cmaas-deepseek-v4.1-flash, cmaas-deepseek-v4-flash-0731, cmaas-deepseek-v4-pro-0813.
- North China 2 (Beijing)
- Qwen
- GLM
- DeepSeek
Model code | Input CNY per million tokens | Output CNY per million tokens | Cache hit CNY per million tokens |
|---|---|---|---|
| 3.2 | 10 | 0.4 |
4 Activation and deployment
To activate confidential inference, meet the following prerequisites:
- Activation: Contact Alibaba Cloud business team to apply for access.
- Region: The China North 2 (Beijing) region is currently supported.
- Compliance agreement: Before deployment, you must sign the Alibaba Cloud Model Studio Confidential Inference Service Special Rules.
Create a deployment
Before deployment, confirm that the business side uses models supported by confidential inference (see Billing).
Deployment steps:
- Log in to the Model Studio console, and in the left navigation pane, choose Model Inference > Confidential inference to enter the confidential inference page (the page displays the existing deployment list, including model Code, billing method, rate limit details, creation time, and operation), and click Create Confidential Inference.
- In the dialog box, configure the deployment parameters: select a model from the Select Model drop-down list (models with existing deployments are marked as "Deployed"); the Billing Method is fixed to "Pay by Token"; in Rate Limit Configuration, TPM/RPM is automatically set to the upper limit after a model is selected and requires no editing.
- Click Confirm Create. After the deployment is complete, a new record is added to the list.
| Parameter | Description and value |
|---|---|
| Select model | For supported models, see Billing |
| Billing method | Billed by Token list price (input/output/cache hit) |
| TPM (tokens per minute) | Token rate limit per minute, configured to the upper limit by default (default 500000 when no increase has been requested); requests approaching the limit will be throttled. |
RPM (requests per minute)Key negotiation requests are also counted toward the RPM quota, so the actual available inference RPM may be slightly lower than the configured value. | Request rate limit per minute, configured to the upper limit by default (default 300 when no increase has been requested). |
Metric name | Meaning | Normal range | Recommendation for anomalies |
|---|---|---|---|
Token usage | Consumption of input, output, and cache hit tokens per unit time | Below the configured TPM rate limit | When usage spikes, check business request volume and prompt length; evaluate scaling or prompt structure optimization as needed. |
Cache hit rate | Ratio of cache-hit requests to total requests | The higher, the more cost-effective (no fixed threshold) | When the hit rate is low, optimize the prompt structure to improve reuse and increase unit cost efficiency. |
Resource pool usage | Capacity usage of the dedicated resource pool | No overflow (the dedicated resource pool never overflows) | No action needed |
5 Post-deployment invocation
After the model is deployed successfully, you can invoke it through the confidential inference SDK.
{WorkspaceId} in the invocation examples is the workspace ID: click the current workspace (such as "Default Workspace") in the top bar of the console to expand the drop-down list, click "Manage Workspaces", and view the ID (in the format ws-xxxxxxxxxxxxxxx) in the "Workspace ID" column on the workspace management page. The public endpoint in the "API Host" column is the domain name used for invocation.
SDK installation and build
Prerequisites:
- The Go development environment is installed. For more information, see Install Go.
- The make build tool is installed.
make command in the SDK root directory. The confidential inference sample command-line program cmaas-client and the local API conversion proxy tools openai-proxy/anthropic-proxy are built in the bin directory. You can also refer to the README in the SDK directory to develop and build confidential inference tools tailored to your business scenario.
- Using the confidential inference command-line tool cmaas-client
- openai-proxy (OpenAI-compatible interface)
- anthropic-proxy (Anthropic-compatible Messages interface)
View local transparency reports
You can view the transparency reports of confidential inference requests in the following local directories:
- macOS
- Linux
- Windows
~/Library/Application\ Support/dashscope-confidential-maas/transparency-reports--no-prompt-in-transparency-report parameter when starting openai-proxy or anthropic-proxy. After disabling, other audit materials such as remote attestation are still retained.
For authentication methods and error codes, see the SDK invocation response.
6 Application scenarios
Confidential inference targets scenarios where a business needs to call cloud-based large models, but at least one party among customer data, business data, or model weights has a hard constraint that "the plaintext must not be visible to the other party."
Financial risk control and anti-fraud inference
- Applicable to: credit approval, fraud detection, risk-assisted decision-making
- Advantages: dual-blind data/model; aligned with JR/T 0197 C3/C4 level financial data encryption and access control requirements
- Applicable to: internal knowledge retrieval, decision support, intelligent Q&A
- Advantages: sensitive documents uploaded in ciphertext, inference in hardware-protected zones, encrypted return
- Medical imaging/medical record AI diagnosis (subject to the Personal Information Protection Law and HIPAA)
- Legal/contract intelligent review (process contract plaintext in a secure environment)
- Smart cockpit and in-vehicle assistant (compliant with the Several Provisions on Automotive Data Security Management)
- Intelligent customer service and after-sales work orders (containing sensitive information such as ID card numbers and bank card fragments)
- Restricted cross-border data transfer (typical in finance, healthcare, government, and automotive)
- Dual-blind data/model (typical in finance and legal)