tencent cloud

Cloud Native Intelligent Gateway

Multimodal Models

Download
Focus Mode
Font Size
Last updated: 2026-09-22 18:40:40
AI-Translated
The AI Gateway extends its existing text generation and vectorization capabilities to support two major scenarios: Text-to-Image and Text-to-Video. With this feature, you can:
Unify access to multiple image/video generation models and expose them through an OpenAI-compatible protocol, allowing business teams to switch providers with zero changes.

Prerequisites

An AI Gateway instance has been created.
Credentials for the corresponding model provider (such as an API Key) have been prepared.

Operation Steps

Step 1: Creating a Model Service

1. Log in to the AI Gateway console and click Instance Management > the target instance details page.
2. Go to Model Management > Model Service and click New.
3. In the "Basic Information" step, fill in the following parameters:
Service Name: Enter a service name (within 60 characters).
Service Type: Fixed as "AI Model Service".
Model Provider: Select a provider from the dropdown list, such as Hunyuan / OpenAI / Qwen (DashScope) / Kling Open Platform / Custom.
Model Protocol: Select after dynamic filtering based on the selected provider, such as OpenAI-compatible / DashScope / Kling.
Service Address: Enter the provider's native Base URL.
Model Key: Reference an existing model key, or click New Key to create one.
Key Usage Policy: Select a multi-key allocation policy (such as round-robin).
Description: Enter a description (optional, within 200 characters).
Advanced Configuration: Expand and fill in as needed (optional).
4. Click Next to go to the "Select Model Policy" step:
Select Pass-Through: No model list is configured, and the model field in the client request body is directly passed through to the upstream.
Select Specified: Select built-in models by scenario group in the transfer box.
5. Click Save to complete the model service creation.

Step 2: Creating an Image Generation Model API

1. Go to Model Management > Model API and click New Model API.
2. In the "Basic Information" step, fill in the following parameters:
API Name: Enter an API name, such as "Marketing Image API".
Usage Scenario: Select the Image Generation card.
Request Protocol: Select by scenario (single choice): OpenAI-compatible / DashScope / Tencent Cloud TC3 / Gemini / Kling OpenAPI.
Routing: Select the endpoints to enable. The primary endpoint POST /v1/images/generations cannot be disabled.
Base Path: Enter a Base Path that starts with /.
Header: Add custom headers as needed (optional).
Description: Enter a description (optional).
3. Click Next to go to the "Select Model Service" step:
Primary Model Service: Specify one of the selected services as the default routing target.
Cross-Service Fallback: Enable as needed. When the primary service fails, traffic is downgraded to backup services in order (optional).
4. Click Save to complete the model API creation.
Note:
Associated Model Service: You can only select services whose "Model Protocol" matches the "Request Protocol" configured in Step 1. Mismatched services are grayed out and disabled with a "Protocol Mismatch" message.

Step 3: Creating a Video Generation Model API

1. Go to Model Management > Model API and click New Model API.
2. In the "Basic Information" step, fill in the following parameters:
API Name: Enter an API name, such as "Short Video Generation API".
Usage Scenario: Select the Video Generation card.
Request Protocol: Select by scenario (single choice): Kling OpenAPI / Vidu.
Routing: POST /v1/videos/generations and query endpoints such as GET /v1/videos/tasks/{id}
Base Path: Enter a Base Path that starts with /.
3. Click Next and select a service with a matching protocol in the "Select Model Service" step (the rule is the same as for image generation).
4. Click Save to complete the model API creation.


Help and Support

Was this page helpful?

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

Feedback