# 生成导出包 (/zh/api/static-export/generate-bundle)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 709 · updated: 2026-07-30 -->
Related: [启动静态导出作业](/zh/api/static-export/start-job.md), [获取静态导出作业状态](/zh/api/static-export/get-job-status.md), [产品更新](/zh/changelog.md)

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

`POST /static-export/jobs/{jobId}/bundle`

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

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

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

使用管理员 API 密钥进行身份验证。

## OpenAPI

```json
{
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "parameters": [
    {
      "name": "jobId",
      "in": "path",
      "description": "已完成的静态导出任务的 ID。",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "指向静态导出软件包的预签名 S3 链接。",
      "content": {
        "application/json": {
          "schema": {
            "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": "预签名链接的过期时间。"
              }
            }
          }
        }
      }
    },
    "401": {
      "description": "身份验证失败。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "人类可读的错误描述。"
              }
            }
          }
        }
      }
    },
    "404": {
      "description": "不存在使用所提供 ID 的任务。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "人类可读的错误描述。"
              }
            }
          }
        }
      }
    },
    "409": {
      "description": "任务尚未完成，因此无法生成软件包。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "人类可读的错误描述。"
              }
            }
          }
        }
      }
    }
  }
}
```
