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

# 快速开始

> 几分钟调通API

## 3步调通大模型API

### Step 1: 创建令牌

在「大模型」-> 「令牌管理」里创建一个令牌。分组选择**特惠**

> [!TIP]
>
> 建议设置消费额度和过期时间。

![image\_2026-07-31\_154850\_150](https://mintcdn.com/aa-55ff8824/2wnTcP9dv-H1RvBt/images/large-model/start/image_2026-07-31_154850_150.png?fit=max\&auto=format\&n=2wnTcP9dv-H1RvBt\&q=85\&s=04be6fc6aa4ede274d786545fac03b19)

### Step 2: 选择模型

在「大模型」-> 「模型广场」里选择使用的模型，获取API端点和模型名称。

> [!TIP]
>
> 注意这里使用`DeepSeek-V4-Pro`的`OpenAI`端点进行演示。

![image\_2026-07-31\_154850\_152](https://mintcdn.com/aa-55ff8824/2wnTcP9dv-H1RvBt/images/large-model/start/image_2026-07-31_154850_152.png?fit=max\&auto=format\&n=2wnTcP9dv-H1RvBt\&q=85\&s=ab5096ab124f106d6172ed3d3636b86b)

### Step 3: 开始调用

使用下面python代码直接调用，或者使用工具调用，详见\[客户端/开发工具]章节。

```Python theme={null}
# 如果没有安装OpenAI Python SDK，可使用命令安装：pip install OpenAI

from openai import OpenAI

# 初始化客户端
client = OpenAI(
    base_url="https://www.autodl.art/api/v1",
    api_key="YOUR_API_KEY",
)

# 调用接口（这里使用了stream=True进行流式响应）
stream = client.chat.completions.create(
    model="DeepSeek-V4-Pro",
    messages=[
        {
            "role": "user",
            "content": "您好！"
        }
    ],
    stream=True,
)

# 流式打印输出
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content)
```

![image\_2026-07-31\_161922\_259](https://mintcdn.com/aa-55ff8824/2wnTcP9dv-H1RvBt/images/large-model/start/image_2026-07-31_161922_259.png?fit=max\&auto=format\&n=2wnTcP9dv-H1RvBt\&q=85\&s=730e687f9c13677b989b16cf583a0dec)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.