Package a Model API into an API product and publish it to a developer portal for developers to browse and subscribe.
Prerequisites
A Model API is created. Manage Model APIs.
A developer portal is created. Create a portal.
Create an API product
-
Log on to the Open Platform console.
-
In the left-side navigation pane, click API products.
-
Click Create API product.
-
In the creation panel, configure the basic product information.
Field
Description
Product name
Required. A unique identifier for the product. Example:
model-api-product.Product description
Required. A brief description of the product's features and purpose.
Product type
Required. Select Model API.
Product category
Optional. Select or create a product category.
Auto subscription approval
Automatically approves developer subscription requests. The API product setting overrides the portal-level setting.
Product icon
Optional. Provide a URL or upload a local file.
-
Configure the model parameters.
Parameter
Description
Model
The model name. Example:
qwen-turbo.Max tokens
The maximum number of tokens to generate. Controls the response length.
Temperature
Controls the randomness of generated content. Valid values: 0 to 2.
Support web search
Whether to enable web search for the model.
NoteThese parameters are used for debugging in the HiMarket portal. Missing parameters cause model invocation to fail. Configure all required parameters.
-
Click OK.
Associate a Model API
Associate the API product with a Model API before publishing it to a developer portal.
-
On the details page of the API product, click Associate API.
-
Select a gateway instance and a Model API.
-
Click Associate.
After association, the product status changes to To be published and the Model API routing information appears on the page.
Write a user guide
Write a user guide that includes a product introduction, API reference, and code samples to help developers get started quickly.
-
On the details page of the API product, click the User guide tab.
-
Write documentation in the Markdown editor, or upload an existing Markdown file.
-
Click Save.
Publish to portal
-
Verify that the product status is To be published.
-
Click Publish to portal.
-
Select the target developer portal.
-
Click Publish.
After publishing, developers can browse and subscribe to the product on the developer portal.