> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 列出 Devin Desktop 模型与定价

> 列出你的账户可用的 Devin Desktop 模型，包含模型 UID、名称，以及按令牌或按消息向你的团队计费的价格。

<div id="overview">
  ## 概览
</div>

返回调用方账户可用的模型，以及该账户实际支付的价格。请将其作为模型定价的程序化 source of truth，不要直接从[模型页面](/zh/desktop/models)复制价格。

价格取决于调用方的套餐和计费模式，因此不同团队查询同一模型可能得到不同的价格。

<Note>此端点处于 alpha 阶段 (`v2alpha`) ，响应结构可能会发生变化。</Note>

<div id="authentication">
  ## 身份验证
</div>

在 `Authorization` 标头中传入 API 密钥：

```
Authorization: Bearer <api-key>
```

使用 Devin [服务用户 API 密钥](/zh/api-reference/authentication) (`cog_...`) 。该服务用户的角色必须包含 **Use Devin Desktop** 权限，且该账户需已开启 Devin Desktop 访问权限。

<div id="request">
  ## Request
</div>

<ParamField query="filter" type="string">
  不设置时，将列出你的套餐和计费模式允许的所有模型，忽略团队级限制。

  设置为 `allowlist` 时，还会应用团队的模型允许列表、组织控制和组限制，使返回的列表与用户在 Devin Desktop 模型选择器中看到的内容一致。
</ParamField>

<div id="example-request">
  ### 请求示例
</div>

```bash theme={null}
curl https://server.codeium.com/api/v2alpha/models \
  -H "Authorization: Bearer $DEVIN_API_KEY"
```

仅返回你的用户可选择的模型：

```bash theme={null}
curl "https://server.codeium.com/api/v2alpha/models?filter=allowlist" \
  -H "Authorization: Bearer $DEVIN_API_KEY"
```

<div id="response">
  ## 响应
</div>

<ResponseField name="models" type="object[]">
  调用方可使用的模型。已禁用的模型不会包含在内。

  <Expandable title="属性">
    <ResponseField name="uid" type="string">
      稳定的模型标识符，例如 `claude-sonnet-4-5`。
    </ResponseField>

    <ResponseField name="name" type="string">
      在模型选择器中显示的名称。
    </ResponseField>

    <ResponseField name="pricing_dimensions" type="object[]">
      该模型向调用方收取的价格。不收费的模型此项为空。

      <Expandable title="属性">
        <ResponseField name="label" type="string">
          计价对象，采用 snake\_case 格式：按令牌计价时为 `input`、`output`、`cached_input`、`cache_read` 或 `cache_write`；若以非货币单位计价，则为计价的数量单位，例如按消息计价时为 `message`。Fusion 模型还会以 `sidekick_` 前缀列出其辅助模型的价格，例如 `sidekick_input` 或 `sidekick_message`。
        </ResponseField>

        <ResponseField name="unit" type="string">
          `value` 所使用的单位，采用 snake\_case 格式，例如 `usd`、`acus` 或 `credits`。
        </ResponseField>

        <ResponseField name="value" type="number">
          以 `unit` 为单位、按 `denominator` 计的价格。
        </ResponseField>

        <ResponseField name="denominator" type="string">
          该价格所对应的数量，例如 `1M tokens` 或 `message`。
        </ResponseField>

        <ResponseField name="info" type="string">
          关于价格的可选说明，例如 `Higher effort consumes more tokens`。
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<div id="example-response">
  ### 示例响应
</div>

以下模型和价格仅用于展示响应结构。请调用该端点获取你的实际价格。

```json theme={null}
{
  "models": [
    {
      "uid": "claude-sonnet-4-5",
      "name": "Claude Sonnet 4.5",
      "pricing_dimensions": [
        { "label": "input", "unit": "usd", "value": 3, "denominator": "1M tokens" },
        { "label": "cached_input", "unit": "usd", "value": 0.3, "denominator": "1M tokens" },
        { "label": "output", "unit": "usd", "value": 15, "denominator": "1M tokens" }
      ]
    },
    {
      "uid": "example-model",
      "name": "Example Model",
      "pricing_dimensions": [
        { "label": "message", "unit": "acus", "value": 0.5, "denominator": "message" }
      ]
    }
  ]
}
```

<div id="error-responses">
  ## 错误响应
</div>

错误以 `{"error": "<message>"}` 的形式返回。

| 状态码   | 原因                                   |
| ----- | ------------------------------------ |
| `400` | `filter` 被设置为 `allowlist` 以外的值       |
| `401` | API 密钥缺失或无效                          |
| `403` | 该密钥所属用户没有 Devin Desktop 访问权限         |
| `429` | 超出速率限制；请等待 `Retry-After` 标头指定的时间后再重试 |
