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

# 集成

> 将 Phaseo 连接到常用 SDK、框架、Agent 和可观测性工具。

大多数集成只需将 OpenAI 或 Anthropic 兼容客户端指向 Phaseo，并使用 Phaseo API 密钥。请从你正在使用的工具指南开始。

## 基础 URL

| 客户端类型 | 基础 URL |
| - | - |
| OpenAI 兼容客户端 | `https://api.phaseo.app/v1` |
| Anthropic 兼容客户端 | `https://api.phaseo.app` |

请使用 [Models 端点](../../api-reference/endpoint/models.mdx)中的模型 ID。新的 OpenAI 风格应用优先使用 [Responses](../../api-reference/endpoint/responses.mdx)。对于较旧的库，[Chat Completions](../../api-reference/endpoint/chat-completions.mdx) 通常是最稳妥的选择。

## SDK 和直连客户端

<Columns cols={2}>
  <Card title="OpenAI SDK" icon="code" href="./openai-sdk.mdx">
    使用 Phaseo 基础 URL 调用 OpenAI 官方客户端。
  </Card>

  <Card title="Anthropic SDK" icon="message-square" href="./anthropic-sdk.mdx">
    通过 `/v1/messages` 使用 Anthropic 兼容客户端。
  </Card>

  <Card title="AI SDK" icon="bolt" href="./ai-sdk.mdx">
    使用 Vercel AI SDK 的 Phaseo 官方供应商。
  </Card>

  <Card title="LiteLLM" icon="route" href="./litellm.mdx">
    通过 Phaseo 路由 LiteLLM 流量，或在 LiteLLM 代理后接入 Phaseo。
  </Card>
</Columns>

## 应用和 Agent 框架

<Columns cols={2}>
  <Card title="LangChain" icon="link" href="./langchain.mdx">
    使用 `ChatOpenAI` 和 Phaseo 基础 URL 接入 LangChain Python。
  </Card>

  <Card title="LlamaIndex" icon="database" href="./llamaindex.mdx">
    使用 Phaseo 构建 RAG 和索引工作流。
  </Card>

  <Card title="PydanticAI" icon="braces" href="./pydanticai.mdx">
    使用 Phaseo 构建类型化 Python Agent。
  </Card>

  <Card title="Mastra" icon="workflow" href="./mastra.mdx">
    在 Mastra Agent 和工作流中使用 Phaseo。
  </Card>

  <Card title="TanStack AI" icon="layers" href="./tanstack-ai.mdx">
    连接 TanStack AI 的 OpenAI 兼容适配器。
  </Card>

  <Card title="Effect AI SDK" icon="function-square" href="./effect-ai.mdx">
    在 Effect TypeScript 应用中使用 Phaseo。
  </Card>
</Columns>

## 平台与运维

<Columns cols={2}>
  <Card title="LiveKit" icon="radio" href="./livekit.mdx">
    在 LiveKit Agents 和语音应用中使用 Phaseo 模型。
  </Card>

  <Card title="Replit" icon="box" href="./replit.mdx">
    使用 Phaseo 构建并部署 Replit 应用。
  </Card>

  <Card title="工作流自动化" icon="workflow" href="./automation.mdx">
    通过 Zapier、n8n、Pipedream 等平台调用 Phaseo。
  </Card>

  <Card title="Infisical" icon="key-round" href="./infisical.mdx">
    准备好进行范围明确、零停机的 Phaseo API 密钥轮换。
  </Card>
</Columns>

## 编程智能体与可观测性

<Columns cols={2}>
  <Card title="编程智能体" icon="bot" href="./coding-assistants">
    在 Cursor、VS Code、Continue、Aider、Cline、Roo Code、Kilo Code 等工具中使用 Phaseo CLI 或手动提供商设置。
  </Card>

  <Card title="Claude Code" icon="https://mintcdn.com/aistats/NYh3Lj6FKSfPLdAj/icons/brands/claude-code.svg?fit=max&auto=format&n=NYh3Lj6FKSfPLdAj&q=85&s=ee19e45e13801122e40c776525cb4d63" href="./claude-code" width="16" height="16" data-path="icons/brands/claude-code.svg">
    通过 Phaseo 路由兼容 Claude 的编程工作流。
  </Card>

  <Card title="Codex" icon="https://mintcdn.com/aistats/NYh3Lj6FKSfPLdAj/icons/brands/codex.svg?fit=max&auto=format&n=NYh3Lj6FKSfPLdAj&q=85&s=8a6e2332cb8b3fce58e7cf1f114b9e7a" href="./codex" width="16" height="16" data-path="icons/brands/codex.svg">
    将 Phaseo 用作 Codex 供应商。
  </Card>

  <Card title="DeepSeek Harness" icon="https://mintcdn.com/aistats/NYh3Lj6FKSfPLdAj/icons/brands/deepseek.svg?fit=max&auto=format&n=NYh3Lj6FKSfPLdAj&q=85&s=29028388301cd2f9fd402d9eb5713060" href="./deepseek-harness" width="24" height="24" data-path="icons/brands/deepseek.svg">
    在 DeepSeek Harness 中将 Phaseo 添加为自定义 OpenAI 兼容供应商。
  </Card>

  <Card title="OpenCode" icon="https://mintcdn.com/aistats/NYh3Lj6FKSfPLdAj/icons/brands/opencode.svg?fit=max&auto=format&n=NYh3Lj6FKSfPLdAj&q=85&s=d5715e9f504be523c03407a98de66f90" href="./opencode" width="16" height="16" data-path="icons/brands/opencode.svg">
    使用自定义 Phaseo 供应商配置 OpenCode。
  </Card>

  <Card title="Pi" icon="https://mintcdn.com/aistats/NYh3Lj6FKSfPLdAj/icons/brands/pi.svg?fit=max&auto=format&n=NYh3Lj6FKSfPLdAj&q=85&s=e4a55fe9fcdb2f6dd3e74f2f0e90ec7a" href="./pi" width="800" height="800" data-path="icons/brands/pi.svg">
    在 Pi 中配置完整的 Phaseo 模型目录。
  </Card>

  <Card title="oh-my-pi" icon="https://mintcdn.com/aistats/NYh3Lj6FKSfPLdAj/icons/brands/oh-my-pi.svg?fit=max&auto=format&n=NYh3Lj6FKSfPLdAj&q=85&s=a425aeab37d4972ad5f42e4e860618e8" href="./oh-my-pi" width="120" height="90" data-path="icons/brands/oh-my-pi.svg">
    通过 Phaseo 运行 oh-my-pi，并使用隔离的提供商目录。
  </Card>

  <Card title="MiniMax Code" icon="https://mintcdn.com/aistats/F1Pn-Y2nkflf1v02/icons/brands/minimax.svg?fit=max&auto=format&n=F1Pn-Y2nkflf1v02&q=85&s=c3499fa38b0f0d6e6290e0c8ce0300cf" href="./minimax-code" width="16" height="16" data-path="icons/brands/minimax.svg">
    通过 Phaseo 运行 MiniMax Code，并使用临时提供商配置。
  </Card>

  <Card title="Muse Code" icon="https://mintcdn.com/aistats/NYh3Lj6FKSfPLdAj/icons/brands/meta.svg?fit=max&auto=format&n=NYh3Lj6FKSfPLdAj&q=85&s=fab6ffaffacbd6195177949a46144259" href="./muse-code" width="500" height="500" data-path="icons/brands/meta.svg">
    通过 Phaseo 运行 Muse Code，并使用临时提供商配置。
  </Card>

  <Card title="Prime Agent" icon="https://mintcdn.com/aistats/NYh3Lj6FKSfPLdAj/icons/brands/prime-agent.svg?fit=max&auto=format&n=NYh3Lj6FKSfPLdAj&q=85&s=c9ef8c396786df0e76b174b4598914b1" href="./prime-agent" width="16" height="11" data-path="icons/brands/prime-agent.svg">
    配置 Prime Agent，通过 Phaseo 执行长时间任务。
  </Card>

  <Card title="可观测性" icon="activity" href="./observability.mdx">
    通过 Langfuse、LangSmith、OpenTelemetry 等工具处理 Phaseo 流量。
  </Card>

  <Card title="Docs MCP" icon="plug-zap" href="./docs-mcp.mdx">
    为编程智能体添加最新的 Phaseo 文档。
  </Card>
</Columns>

## 推荐默认值

* 一次性设置 `PHASEO_API_KEY`，并将其映射到客户端所需的环境变量。
* 保持模型 ID 不变，例如 `openai/gpt-5-nano`。
* 对于 OpenAI 兼容库，请使用 `https://api.phaseo.app/v1`，除非工具明确要求根主机。
* 对于会追加 `/v1/messages` 的 Anthropic 兼容 SDK 和工具，请使用 `https://api.phaseo.app`。
* 在迁移 Agent 流量前，先在预发布环境测试流式传输和工具调用。


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