> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.alephant.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.alephant.io/_mcp/server.

# Analytics SDK 与集成

> 面向 TypeScript 和 Python 的 Alephant Analytics API 官方客户端库

Alephant 提供官方的强类型客户端库，帮助您与我们的 Analytics API 交互。这些 SDK 专为查询由 Alephant 网关生成的遥测数据、成本指标和仪表板统计信息而设计。

使用我们的 Analytics SDK，您可获得：

* **类型安全：** 在 IDE 中提供完整的自动补全和编译期检查。
* **便捷性：** 内置错误处理、分页和重试逻辑。
* **异步支持：** 原生支持 JS/TS 中的 Promises 以及 Python 中的 `async/await`。

## 可用 SDK

目前，我们为以下语言维护官方 SDK：

* [**TypeScript / Node.js**](/sdk-reference/analytics-sdk/type-script-sdk)：在 npm 上以 `@alephantai/logs-collector-analytics` 发布。适用于自定义报表仪表板或内部 Node.js 服务。
* [**Python**](/sdk-reference/analytics-sdk/python-sdk)：在 PyPI 上以 `alephantai-analytics-api` 发布。适用于 FinOps 数据科学管道、Jupyter notebook 或自动化脚本。

从侧边栏选择一种语言，以查看安装说明和使用示例。