tencent cloud

Getting Started

Download
Focus Mode
Font Size
Last updated: 2026-11-17 14:27:52
AI-Translated & Reviewed
This tutorial describes how to quickly get started with CMR.

Prerequisites

It is recommended to read Usage Constraints and Supported Models in advance for relevant information.

Operation Steps

Step 1: Creating a CMR Instance

1. Log in to the CMR console.
2. In the left sidebar, click Instance Management.
3. On the instance list page, click Create. The parameter descriptions are as follows.
Parameter
Description
Region
Select the region where the CMR instance resides as needed.
Network type
Select Public network or Private network.
A public network instance provides services directly over the internet.
A private network instance provides services only within a VPC and is suitable for internal system interconnection.
Listening protocol
Supports HTTP and HTTPS.
Certificate.
Required only when HTTPS is selected.
Network
Select a VPC. A VPC is a logically isolated network space that you create in Tencent Cloud. In a VPC, you can define CIDR blocks, IP addresses, and routing policies.
Billing Mode
Supports both pay-by-specification and pay-by-usage billing modes.
Pay-by-specification: Fees vary depending on the CMR instance specification. Rate limiting is automatically triggered when the specification limit is exceeded.
Pay-as-you-go: Zero calls incur zero fees, but high usage may result in a large bill.
Resource package deduction
Pay-by-specification: You can choose whether to use resource package deduction. If you choose resource package deduction, the instance will switch to postpaid hourly billing after the resource package is exhausted.
Pay-as-you-go: Only resource package deduction is supported. After the resource package is exhausted, the instance will be suspended. Please renew it promptly to ensure business continuity.
Specifications
When you select pay-by-specification, you can choose a specification based on your needs. For details about TPM rate limiting values and costs of different specifications, see Billing Overview.
Limit Type
By default, you can set TPM and RPM, or select an appropriate credit budget. For pay-by-specification instances, the TPM rate limiting value defaults to the upper limit of the selected specification and cannot be modified.
Instance Name
Supports up to 255 characters, including letters, digits, Chinese characters, periods, underscores, and hyphens. If left empty, it is automatically generated.
Tag
Select a tag key and a tag value or add a tag. For details, see Creating a Tag.
4. After completing the above parameter configuration, click OK to create the instance.
5. You can view the instances you created in the instance list.

Step 2: Creating a CMR Access Key

1. In the left sidebar, click Instance Management under the CMR tag. Click the instance ID of the instance you created to go to the Basic Information page, and then switch to the User Group tab.
2. Click Create Key. The parameter descriptions are as follows.
Parameter
Description
Key Name
Supports up to 255 characters.
Tag
You can select a tag key and a tag value or add a tag. For details, see Creating a Tag.
Limit Type
You can select rate limit or credit budget.
Credit budget
If Limit Type is Credit Budget, you need to enter the specific credit budget content.
TPM
If Limit Type is Rate Limit, you need to enter TPM. TPM is the maximum number of tokens that can be processed per minute (Tokens Per Minute), unit: thousands/minute.
RPM
If Limit Type is Rate Limit, you need to enter RPM. RPM is the maximum number of requests allowed per minute (Requests Per Minute), unit: requests/minute.
3. After completing the above parameter configuration, click OK to create the Key.
4. After the API Key is created, the API Key information is displayed in a success dialog. Keep it secure. You can also click Download Locally to save it.
Note:
After closing the dialog, you will not be able to view the complete Key again. Proceed with caution and keep it secure.

Step 3: Creating a BYOK Instance

1. Log in to the CMR console. In the left sidebar, choose BYOK > BYOK Management.
2. On the BYOK page, click Create. On the Create page, select or enter the relevant parameters as needed.
Parameter
Description
Output modality
Multiple output modalities are currently supported.
Text generation: suitable for scenarios such as dialogue and text completion (supporting protocols such as chat, responses, and completions).
Video generation: converts text and images into video content for creation and synthesis, corresponding to the video generation protocol.
Vector embedding: suitable for scenarios such as text vectorization and semantic search (supporting the embedding protocol).
Reranking: suitable for scenarios such as candidate ranking and search result refinement (rerank protocol).
Classification decision: determines, evaluates, or verifies content and outputs the classification decision result.
Template selection
Two methods are supported: quick configuration using preset templates or custom configuration.
Quick configuration with preset templates: To simplify user configuration, the product provides preset configuration templates from some vendors, such as Tencent Cloud MaaS TokenHub. You can select one as needed.
Custom configuration: You can select this option when preset templates do not cover your use case, for example, when you use a self-built model.
Vendor and Protocol
Vendor:
When you select a preset template for quick configuration, this field is pre-filled and requires no modification.
When you select custom configuration, you can choose your model provider from the dropdown list (such as DeepSeek) or enter a vendor name manually.
Protocol:
When you select a preset template for quick configuration, this field is pre-filled and requires no modification.
When you select custom configuration, you can choose the corresponding protocol from the dropdown list.
Site
When Output Modality is Text Generation, for some models such as Zhipu, you need to select the associated site. You can select it as needed.
Endpoint Protocol & BaseURL
Configuration is required when Output Modality is Text Generation, specifically the OpenAI-compatible Base URL or the Anthropic Base URL. To facilitate user configuration, the product has preset relevant parameters for some vendors, including multiple protocols. You can configure them as needed.
BaseURL & EndpointPath
Configuration is required when Output Modality is Vector Embedding. The final request URL = BaseURL + EndpointPath. To facilitate user configuration, the product has preset relevant parameters for some vendors. You can configure them as needed.
Instance Name
Optional. Supports up to 255 characters.
Tag
You can select an existing tag key and tag value. If the required tag does not exist, click Add Tag. For details, see Creating a Tag.
3. After the access configuration is completed, go to the model configuration step. Select or enter the relevant parameters as needed, and click OK. Only when Output Modality is Text Generation, you need to click Next: Multimodal Configuration.
Parameter
Description
Network Configuration
Supports configuring models through public or private networks.
Public network: Configure models over the public internet, such as original vendor models.
Private network: Configure models over a VPC, such as self-built models.
CMR Private Network Tunnels
Only involved when Network Configuration is set to Private Network. Select an existing CMR private network tunnel from the dropdown list, or create a CMR private network tunnel.
Domain Name
Optional. Only involved when Network Configuration is set to Private Network. HTTP Header carried when requests are sent to the upstream model.
Usually no need to fill in. The domain name in "BaseURL" is used by default. When "BaseURL" is set to an IP address or VIP and the upstream requires domain-based routing, specify the corresponding domain name here (such as api.deepseek.com).
API input method
Both manual entry and batch import are supported.
Manual entry: Manually paste the API key and secret key into the corresponding input fields in order.
Batch import: Download the template file, fill in the API key and secret key, and then import the file to quickly import keys in batches.
Select a model:
Manual input of model names is supported, and supported models can also be pulled by clicking Obtain Model List. To change the external model name, enter a name that meets your standards in the External Display Name field.
Connectivity probing
After adding an API Key and selecting the correct model, click Start Probing to probe the health status of the API Keys, allowing you to promptly remove unhealthy API Keys.
4. (Only involved when Output Modality is Text Generation) In the multimodal configuration step, you can select the modalities to enable for each model as needed based on the modality availability probe results, and click OK to complete the configuration.
Parameter
Description
Model Name
Displays the name of the selected model. Different models may support different modalities. Refer to the page display for the actual supported modalities.
Enable Modality
Select the modalities to enable for the current model. After they are enabled, the model can be called in the corresponding modality scenarios.
Modality Availability Detection
Used to probe the availability of each model modality under the current API Key. Click Start Probing. After the probing is completed, you can view the probe results in the modality availability section of the model list above.
Modality Availability
Displays the availability status of each modality of the current model. You can adjust the enabled modalities or perform probing again based on the prompts.
Enable Based on Probe Result
After clicking, the system automatically enables the available modalities based on the current probe result.
Probe Again
After clicking, the system re-probes the availability of each model modality under the current API Key and refreshes the modality availability results.
5. After completing the above parameter configuration, click OK to create the BYOK instance.

Step 4: Configuring Model Scheduling Management

1. In the left sidebar, click Instance Management.
2. Click the instance ID of the instance you created to go to the Instance Basic Information page, and then switch to the Model Scheduling Management tab.
3. On the right side of the Associated Models list, click Batch Associate, select the models to associate, and after confirmation, configure the weights and associate the models.
4. Configure intent routing. In the routing policy diagram, click Create in the Intent Routing module. Alternatively, click Create Rule in the Intent Routing module on the page.
You can select a built-in business template or customize an intent routing business.
By configuring the intent categories and corresponding models for intent routing, the system automatically identifies the intent category of user messages and routes requests to the model for the corresponding scenario.
5. Configure routing policies. Routing policies are divided into inter-model policies and intra-model policies, as described below:
Inter-model policies: When a request does not specify a specific model, the system intelligently selects the most appropriate model for processing based on the current real-time status or semantic complexity. Inter-model policies are divided into simple random routing, least-busy routing, lowest-latency routing, usage-balanced routing, and minimum coefficient routing.
Simple random routing: randomly selects a model from the available models.
Least-busy routing: distributes requests to the currently least busy model.
Lowest-latency routing: automatically selects the model with the lowest current latency.
Usage-balanced routing: distributes requests to models in a usage-balanced manner.
Minimum coefficient routing: prioritizes distribution to models with lower scores.
Intra-model policies: After a model is determined, the system dynamically selects the optimal access node from the vendors of different services under the model based on real-time performance metrics. Intra-model policies are divided into simple random routing, least-busy routing, lowest-latency routing, usage-balanced routing, and minimum coefficient routing.
Simple random routing: randomly selects a vendor from the available vendors.
Least-busy routing: distributes requests to the currently least busy vendor.
Lowest-latency routing: automatically selects the vendor with the lowest current latency.
Usage-balanced routing: distributes requests to vendors in a usage-balanced manner.
Minimum coefficient routing: prioritizes distribution to vendors with lower scores.
6. Configure a sticky routing policy to effectively improve the upstream cache hit ratio and reduce first-packet latency. Sticky routing is enabled by default and can be disabled. When enabled, it supports soft affinity based on content recognition and hard affinity based on the client-passed x-cmr-session-id header. When sticky routing is disabled, only hard affinity is supported.
7. Configure the Fallback policy. When a model service in the associated CMR fails, the model in Fallback is used. Click Edit on the right side of the Fallback policy list. Select the corresponding model and click OK.

Step 5: Calling the CMR API

In the left sidebar, click Instance Management. Click the instance ID of the instance you created to go to the Instance Basic Information page. You can write a request based on the examples in the call sample and using the OpenAI request method to access models with various configurations.

Subsequent Operations

1. Monitor resource consumption: switch to the Usage Details tab. Here, you can view Token consumption and model resource package usage to avoid call failures caused by insufficient quota.
2. View access logs: switch to the Logs tab and deliver the access logs to Cloud Log Service (CLS) for troubleshooting and security auditing.
3. Test the configuration effect: switch to the Chat Test tab and verify whether routing policies, Fallback, and other configurations take effect as expected.
4. Enable security protection: switch to the Security Protection tab and enable WAF large model protection or configure security group protection as needed to ensure the content and access security of model services.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback