> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify-docs-automation-github-pr-review.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Stainless

> 在你的 API 操作台中展示由 Stainless 自动生成的类型安全 SDK 代码示例，支持 Python、TypeScript 等多种语言。

<div id="prerequisites">
  ## 先决条件
</div>

* 拥有一个 [Stainless](https://app.stainless.com) 账号。

<div id="set-up-the-integration">
  ## 设置集成
</div>

<Steps>
  <Step title="在 Stainless 中设置 OpenAPI 配置。">
    在你的 `stainless.yml` 配置文件中，添加 `openapi.code_samples: 'mintlify'`。更多信息请参阅 [Stainless 文档](https://app.stainless.com/docs/guides/integrate-docs)。
  </Step>

  <Step title="发布你的 OpenAPI 规范 URL。">
    在你的 Stainless 项目中：

    1. 选择 **Release** 标签页。
    2. 选择 **Setup OpenAPI publishing**。
    3. 复制指向你公开可访问的 OpenAPI 规范的 URL。

    <img src="https://mintcdn.com/mintlify-docs-automation-github-pr-review/XpTZ81chTFZOX5fm/images/stainless-public-OpenAPI-spec.png?fit=max&auto=format&n=XpTZ81chTFZOX5fm&q=85&s=cf78c0d8e1156256c9f3b4100820b0bb" alt="Stainless 发布页面，其中用绿色框突出显示了 OpenAPI 规范的 URL。" width="2124" height="1104" data-path="images/stainless-public-OpenAPI-spec.png" />
  </Step>

  <Step title={<>将你的 OpenAPI 规范 URL 添加到 <code>docs.json</code>。</>}>
    在你的 `docs.json` 文件中，将来自 Stainless 的 URL 添加到 `openapi` 字段。更多信息请参阅 [OpenAPI 设置](/zh/api-playground/openapi-setup)。
  </Step>
</Steps>
