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

# 客户端集成总览

> 在常见 AI 应用 / IDE / SDK 中接入 OpenPAI

只要应用支持 **自定义 `base_url` + `API Key`** 的 OpenAI 兼容设置,就可以一键切换到 OpenPAI。

## 通用配置

| 项        | 值                                |
| -------- | -------------------------------- |
| Base URL | `https://openp.ai/v1`            |
| API Key  | `sk-XXXXXXXXXXXXXXXX`(从控制台令牌页获取) |
| 协议       | OpenAI / Anthropic / Google 任选   |

## 桌面 GUI 客户端

<CardGroup cols={2}>
  <Card title="Cherry Studio" icon="cherries" href="/integrations/cherry-studio">
    跨平台多模型聊天客户端,推荐入门。
  </Card>

  <Card title="LobeChat" icon="comments" href="/integrations/lobe-chat">
    开源、自托管的现代化 Chat UI。
  </Card>

  <Card title="NextChat" icon="message" href="/integrations/nextchat">
    Vercel 一键部署的轻量聊天 UI。
  </Card>

  <Card title="ChatBox" icon="window-restore" href="/integrations/chatbox">
    桌面端 ChatGPT 客户端,Windows/Mac/Linux 全平台。
  </Card>
</CardGroup>

## 编码助手 / IDE

<CardGroup cols={2}>
  <Card title="Cursor" icon="code" href="/integrations/cursor">
    AI-first 代码编辑器,支持自定义 OpenAI Base URL。
  </Card>

  <Card title="Cline / Continue" icon="terminal" href="/integrations/cline">
    VS Code 中的开源 AI 编码代理。
  </Card>
</CardGroup>

## 应用框架

<CardGroup cols={2}>
  <Card title="Dify" icon="cubes" href="/integrations/dify">
    LLMOps 平台,把 OpenPAI 作为模型供应商。
  </Card>

  <Card title="LangChain / LlamaIndex" icon="link">
    直接使用官方 OpenAI / Anthropic Provider,改 base\_url 即可。
  </Card>
</CardGroup>

## 官方 SDK

<CardGroup cols={3}>
  <Card title="OpenAI SDK" icon="o" href="/integrations/openai-sdk">
    Python / Node / Go / Java
  </Card>

  <Card title="Anthropic SDK" icon="a" href="/integrations/anthropic-sdk">
    Python / Node,使用 `/v1/messages`
  </Card>

  <Card title="google-genai" icon="g" href="/integrations/google-sdk">
    Python / JS,使用 Gemini 原生协议
  </Card>
</CardGroup>

## 直接 cURL

<Card title="cURL 速查表" icon="terminal" href="/integrations/curl-examples">
  常见任务的 cURL 模板:对话、流式、视觉、工具、嵌入、图像。
</Card>

## 通用提示

<AccordionGroup>
  <Accordion title="模型 ID 找不到怎么办?">
    在客户端 **模型** 设置中手动填写 OpenPAI 控制台展示的模型 ID。
    部分客户端的下拉菜单是写死的 OpenAI 模型,需要切换到 **自定义模型** 模式。
  </Accordion>

  <Accordion title="某些应用要求 base_url 不带 `/v1`">
    OpenPAI 同时接受带 `/v1` 与不带的请求。

    * OpenAI SDK 类客户端:`https://openp.ai/v1`
    * Anthropic / Google 客户端:`https://openp.ai`
  </Accordion>

  <Accordion title="是否需要 CORS / 浏览器直接调用?">
    OpenPAI 默认开启 CORS,允许浏览器端直接调用。
    但 **强烈不建议** 把 API Key 暴露在前端,应通过自己的后端转发。
  </Accordion>
</AccordionGroup>
