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

# 生成导出包

> 将已完成的静态导出任务打包为单个归档文件，并返回一个下载链接。该链接为预签名的 S3 URL —— 请在 `expiresAt` 之前下载。

任务的 `status` 必须为 `completed` 才能生成软件包。

静态导出仅适用于 Enterprise 套餐。

<Info>
  静态导出需要 [Enterprise 套餐](https://mintlify.com/pricing?ref=static-export)。
</Info>


## OpenAPI

````yaml zh/static-export-openapi.json POST /static-export/jobs/{jobId}/bundle
openapi: 3.0.1
info:
  title: Mintlify 静态导出 API
  description: 以编程方式生成自包含的文档静态导出，并将其作为单个软件包下载。仅适用于 Enterprise 套餐。
  version: 1.0.0
servers:
  - url: https://api.mintlify.com/v1
security:
  - bearerAuth: []
paths:
  /static-export/jobs/{jobId}/bundle:
    post:
      summary: 生成导出软件包
      description: |-
        将已完成的静态导出任务打包为单个归档文件，并返回一个下载链接。该链接为预签名的 S3 URL —— 请在 `expiresAt` 之前下载。

        任务的 `status` 必须为 `completed` 才能生成软件包。

        静态导出仅适用于 Enterprise 套餐。
      operationId: generateStaticExportBundle
      parameters:
        - name: jobId
          in: path
          description: 已完成的静态导出任务的 ID。
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 指向静态导出软件包的预签名 S3 链接。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BundleResponse'
        '401':
          description: 身份验证失败。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 不存在使用所提供 ID 的任务。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 任务尚未完成，因此无法生成软件包。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    BundleResponse:
      type: object
      required:
        - jobId
        - bundleUrl
        - sizeBytes
        - expiresAt
      properties:
        jobId:
          type: string
          description: 生成此软件包所对应的任务 ID。
          example: se_3f9a2c1b8e7d4a06
        bundleUrl:
          type: string
          format: uri
          description: 指向静态导出软件包归档的预签名 S3 链接。请在链接过期前下载。
          example: >-
            https://mintlify-static-exports.s3.amazonaws.com/se_3f9a2c1b8e7d4a06/bundle.tar.gz?X-Amz-Signature=...
        sizeBytes:
          type: integer
          description: 软件包大小（字节）。
          example: 18432000
        expiresAt:
          type: string
          format: date-time
          description: 预签名链接的过期时间。
    Error:
      type: object
      properties:
        error:
          type: string
          description: 人类可读的错误描述。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 管理员 API 密钥。可在控制台的 API 密钥页面生成。

````

## Related topics

- [静态导出](/docs/zh/api/static-export/overview.md)
- [Markdown 导出](/docs/zh/ai/markdown-export.md)
- [离线导出](/docs/zh/deploy/export.md)
