# 获取可用模型列表

返回当前平台支持的模型列表。

**认证可选，但响应内容会根据是否携带 `tr-` 密钥分级：**
- **未带密钥（marketing 视图）**：仅返回模型元信息，不含价格字段，且不会包含受限渠道（如 Bedrock / Azure Foundry / xAI Grok 等需账号授权的模型）。
- **带合法密钥**：返回完整列表（含 `input_per_1m` / `output_per_1m` / `price_per_unit` 等价格字段），并按账号可见范围过滤渠道。

无效密钥不会返回 401，会自动降级到 marketing 视图。

## GET /v1/models

> List available models

Returns the list of models supported by the platform.

**Authentication is optional, but the response is tiered based on whether a `tr-` API key is supplied:**
- **Without a key (marketing view)**: only model metadata is returned — no price fields, and restricted channels (e.g. Bedrock / Azure Foundry / xAI Grok, which require account-level authorization) are filtered out.
- **With a valid key**: the full list is returned (including `input_per_1m` / `output_per_1m` / `price_per_unit`), filtered to channels visible to the caller's account.

An invalid key does **not** return 401 — it silently falls back to the marketing view.

### Authentication

`Authorization: Bearer tr-xxx`

### Response

- **object** ``list`` **(required)**  
  Response object type, fixed value `list`
- **data** `object[]` **(required)**  
  
- **data[].id** `string` **(required)**  
  Model ID in `provider/model-name` format
- **data[].object** ``model`` **(required)**  
  Object type, fixed value `model`
- **data[].created** `integer` **(required)**  
  When the model was onboarded to the platform (Unix timestamp, seconds)
- **data[].owned_by** `string` **(required)**  
  Model owner
- **data[].display_name** `string`  
  Model display name
- **data[].type** `string` **(required)**  
  Model type. Values currently in use: `chat`, `image`, `image_chat`, `video`, `tts`, `stt`, `stt_stream`, `ast`, `realtime`, `embedding`, `podcast`, `enhance`. New types may be added — clients should tolerate unknown values.
- **data[].billing_type** ``token` | `per_image` | `per_video_second` | `per_audio_char` | `per_audio_second`` **(required)**  
  Billing method
- **data[].currency** ``CNY` | `USD`` **(required)**  
  Currency of the price fields: `CNY` on the domestic site, `USD` on the international site. Read this field to determine the unit — never hard-code a currency.
- **data[].available** `boolean` **(required)**  
  Whether the model is currently available (has configured API keys)
- **data[].input_per_1m** `number`  
  Input token price (`currency` per 1M tokens). Only present for `billing_type: token` models
- **data[].output_per_1m** `number`  
  Output token price (`currency` per 1M tokens). Only present for `billing_type: token` models
- **data[].output_per_1m_1080p** `number`  
  Video model 1080p tier output price (`currency` per 1M tokens). Only present when the model has this tier configured
- **data[].output_per_1m_with_video** `number`  
  Video model 720p tier output price when the input contains a reference video (v2v). Only present when the model has this tier configured
- **data[].output_per_1m_1080p_with_video** `number`  
  Video model 1080p tier output price when the input contains a reference video (v2v). Only present when the model has this tier configured
- **data[].output_per_1m_4k** `number`  
  Video model 4K tier output price. Only present when the model has this tier configured
- **data[].output_per_1m_4k_with_video** `number`  
  Video model 4K tier output price when the input contains a reference video (v2v). Only present when the model has this tier configured
- **data[].flex_price_factor** `number`  
  Offline-inference (`service_tier: flex`) price factor — not a price itself: effective rate = tier price × this factor, applied uniformly across tiers. Only present when the model supports offline inference.
- **data[].price_per_unit** `number`  
  Per-invocation price (`currency`). Present for models whose `billing_type` is not `token`; the unit depends on `billing_type` (per image / per video second / per character / per audio second)
