Model Gallery — TypeScript SDK
Browse the model catalog and look up per-tenant pricing.
Overview
The Model Gallery resource exposes the platform's browsable model catalog: a paginated query with a 15-field filter DTO, the provider list filtered by tenant, and a per-model Partner API price lookup for the current tenant.
Accessed via client.modelGallery.
Available Operations
| Method | Description |
|---|---|
page() | Paginated model gallery query |
providers() | Provider list for the gallery |
getPrice() | Get the Partner API price for a model |
page
Paginated model gallery query with a 15-field filter DTO.
Example Usage
import { WltClient } from 'wlt-platform';
const client = new WltClient({ apiKey: 'your-api-key', baseUrl: 'https://console.example.com' });
// Browse all models
const result = await client.modelGallery.page({ pageNum: 1, pageSize: 10 });
console.log(`Total models: ${result.total}`);
for (const model of result.list) {
console.log(model.modelName, model.provider);
}
// Filter by criteria
const filtered = await client.modelGallery.page({
usageType: 'inference',
provider: 'dashscope',
tags: ['New'],
inputs: ['text'],
outputs: ['text'],
});
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
pageNum | number | No | 1 | Page number, starting from 1 |
pageSize | number | No | 10 | Items per page |
modelName | string | No | — | Model name (fuzzy search) |
provider | string | No | — | Provider identifier |
seriesProvider | string | No | — | Series provider identifier |
modelType | string | No | — | Model type |
viewAllFlag | number | No | — | View all flag (1=view all) |
usageType | string | No | — | Usage type: "inference" or "train" |
trainingMethod | string | No | — | Training method: "sft" or "dpo" |
tags | string[] | No | — | Tag filter list |
capability | string | No | — | Capability filter, e.g. "text_to_text" |
modelTypeList | string[] | No | — | Model type list (multi-select) |
originProviders | string[] | No | — | Origin provider list (multi-select) |
inputs | string[] | No | — | Input type list, e.g. ["text"] |
outputs | string[] | No | — | Output type list, e.g. ["image"] |
Response
Returns PageInfo<ModelInfoVO>. ModelInfoVO:
| Field | Type | Description |
|---|---|---|
modelId | string | Model ID |
modelName | string | Model name |
modelImage | string | Model icon URL |
isNew | number | Whether new model (1=yes) |
provider | string | Provider identifier |
providerName | string | Provider display name |
originProvider | string | Origin provider identifier |
seriesProvider | string | Series provider identifier |
modelType | string | Model type |
tags | string[] | Tag list |
modelSize | string | Model size |
feature | string | Feature description |
price | number | Price |
unit | string | Price unit |
available | boolean | Whether available |
updated | string | Update time (ISO 8601) |
deployPlatform | string | Deploy platform |
regionId | string | Region ID |
deployFrameworks | string[] | Deploy framework list |
labels | string[] | Label list |
capabilities | string[] | Capability list |
inputs | string[] | Input type set |
outputs | string[] | Output type set |
priceExtend | PartnerApiPriceExtend | Extended price info |
dataSource | string | Data source (model_card or model_router) |
Errors
| Code | Error | When |
|---|---|---|
2000 / 2002 | Authentication failure | API Key invalid |
2007 | Permission denied | Token lacks permission |
3001 | Token expired | Refresh failed |
providers
Get the provider list for the gallery (filtered by tenant).
Example Usage
const providers = await client.modelGallery.providers();
for (const p of providers) {
console.log(p.id, p.name);
}
Parameters
None.
Response
Returns ProviderVO[]:
| Field | Type | Description |
|---|---|---|
id | string | Provider identifier |
name | string | Provider display name |
Errors
| Code | Error | When |
|---|---|---|
2000 / 2002 | Authentication failure | API Key invalid |
2007 | Permission denied | Token lacks permission |
3001 | Token expired | Refresh failed |
getPrice
Get the Partner API price for a model in the current tenant.
Passing a non-numeric / unrecognised modelName may return code=3000 (Invalid request) in production.
Example Usage
const price = await client.modelGallery.getPrice('Qwen2.5-72B-Instruct');
console.log(`Input price: ${price.priceExtend.llmInput}`);
console.log(`Output price: ${price.priceExtend.llmOutput}`);
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
modelName | string | Yes | — | Model name |
Response
Returns PartnerApiPriceResponse:
| Field | Type | Description |
|---|---|---|
id | number | Record ID |
partnerId | number | Tenant ID |
modelName | string | Model name |
modelType | string | Model type |
type | string | Resale type (model / BYOK) |
originProvider | string | Origin provider |
seriesProvider | string | Series provider |
capabilities | string | Model capabilities |
inputs | string[] | Input type set |
outputs | string[] | Output type set |
priceExtend | PartnerApiPriceExtendDetail | Price details |
gmtCreate | string | Creation time (ISO 8601) |
gmtModified | string | Modification time (ISO 8601) |
PartnerApiPriceExtendDetail:
| Field | Type | Description |
|---|---|---|
llmInput | string | LLM input price (per 1K tokens) |
llmOutput | string | LLM output price (per 1K tokens) |
vlmInput | string | VLM input price (per 1K tokens) |
vlmOutput | string | VLM output price (per 1K tokens) |
image | string | Image generation price |
imageEa | string | Image unit price |
imageStep | string | Image step price |
video | string | Video generation price |
audio | string | Audio price |
tieredPricing | TieredPricing[] | Tiered pricing list |
videoPricing | VideoPricing[] | Video pricing list |
imagePricing | ImagePricing[] | Image pricing list |
Errors
| Code | Error | When |
|---|---|---|
1002 | Data not found | Model name not in the current tenant |
3000 | Invalid request | Non-numeric / unrecognised model identifier |
2000 / 2002 | Authentication failure | API Key invalid |
2007 | Permission denied | Token lacks permission |
3001 | Token expired | Refresh failed |