> ## 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.