> ## 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.

# Claude Code 配置指南

> 在 Claude Code 里配置 OpenAI 兼容接口，接入 YeLin AI。

<Info>
  Claude Code 的配置方式可能会随版本变化。
  你只需要记住两项：base URL 和 **API key**。
</Info>

## 你先准备什么

1. 你在 **Console** 创建 **API key**。
2. 你准备好 base URL：`https://api.yelinai.com/v1`

## 配置思路

你在 Claude Code 的提供商配置里选择 **OpenAI-compatible**。
你把 base URL 指向 YeLin AI。
你把 key 填进对应的 API key 字段。

## 验证

你让 Claude Code 执行一个最小任务。
例如“解释这个函数做什么”。

## 常见问题

### 报 401

你检查 **API key** 是否复制完整。

### 报模型不可用

你先查模型列表。
你再填入正确的模型 id。

<CardGroup cols={2}>
  <Card title="模型列表" icon="list" href="/api-reference/models">
    获取模型 id。
  </Card>

  <Card title="对话补全" icon="message-circle" href="/api-reference/chat-completions">
    了解端点与参数。
  </Card>
</CardGroup>
