Skip to content
NEW GPT-5.5 / Claude 4.6 已上线,立即体验 →
zh-guides 集成食谱 5 min read

使用 OpenAI SDK 接入

1. 安装 SDK:pip install openai(Python)或 npm i openai(Node.js)
2. 将 base_url 设为 https://api.onefast.ai/v1
3. 将 api_key 设为你的 Key
4. 调用 client.chat.completions.create(model=...)——model 填任意模型 ID

> 整个 OpenAI 生态(LangChain、LlamaIndex、Dify、FastGPT、OneAPI 等)都可用同样方式接入。