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

# 導出審計日誌（CSV）

> 以流式 CSV 文件的形式下載審計日誌。

以 CSV 附件形式流式返回匹配的審計條目。如果未指定 `orgId`，導出範圍將限定為你自己的條目。

## 身份驗證

需要具備 `billing` 權限範圍的 API 密鑰。按組織導出時，還需要該組織的 **View audit log** 權限。

## 查詢參數

<ParamField query="orgId" type="string">
  導出該組織的條目，而非你的個人條目。
</ParamField>

<ParamField query="action" type="string">
  按單個操作進行篩選（例如 `completion.created`）。
</ParamField>

<ParamField query="from" type="string">
  ISO 時間戳下限（含邊界值）。
</ParamField>

<ParamField query="to" type="string">
  ISO 時間戳上限（含邊界值）。
</ParamField>

## 響應

`Content-Type: text/csv` 附件。列包括：

```
timestamp,action,entity_type,entity_id,model_id,ip_address,user_agent,route,input_summary,output_summary
```

## 示例

```bash curl theme={null}
curl -L "https://www.hitheo.ai/api/v1/audit/export?from=2026-05-01&to=2026-06-01" \
  -H "Authorization: Bearer $THEO_API_KEY" \
  -o theo-audit-log.csv
```


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