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

# 模型列表

> 使用 `GET /v1/models` 获取可用模型 id。

<Info>
  你可以用 `GET /v1/models` 获取模型列表。
  你需要先在 **Console** 创建 **API key**。
</Info>

<CardGroup cols={2}>
  <Card title="获取 API key" icon="key" href="/faq/token-management">
    在 **Console** 复制 key。
  </Card>

  <Card title="对话补全" icon="message-circle" href="/api-reference/chat-completions">
    立即测试 Chat Completions。
  </Card>
</CardGroup>

## 接口信息

* **接口地址**：`GET https://api.yelinai.com/v1/models`
* **鉴权方式**：`Authorization: Bearer YOUR_API_KEY`

## cURL 示例

```bash theme={"system"}
curl https://api.yelinai.com/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## 响应示例

```json theme={"system"}
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o-mini",
      "object": "model",
      "owned_by": "openai"
    }
  ]
}
```

## 你怎么选择模型

* 你先选便宜的模型做联调，例如 `gpt-4o-mini`。
* 你再按质量与成本切换模型。
