UI Kit 演示
文档提示
在指南或参考文档中使用 DocsTip 展示有用的提示。
内容模式切换
响应示例
curl https://api.openai.com/v1/responses \
-H "Authorization: Bearer $OPENAI_API_KEY"代码示例
示例
javascript
1
2
3
4
5
6
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const response = await client.responses.create({
model: "gpt-4.1-mini",
input: "Say hello",
});示例
javascript
1
2
3
4
5
6
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const response = await client.responses.create({
model: "gpt-4.1-mini",
input: "Say hello",
});你好
代码示例
示例
javascript
1
2
3
4
5
6
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const response = await client.responses.create({
model: "gpt-4.1-mini",
input: "Say hello",
});示例
javascript
1
2
3
4
5
6
const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const response = await client.responses.create({
model: "gpt-4.1-mini",
input: "Say hello",
});代码对比
之前
1
curl https://api.openai.com/v1/responses之后
1
curl https://api.openai.com/v1/responses内容切换器
您可以选择在我们 Node
Node SDK
1
2
3
import OpenAI from "openai";
const client = new OpenAI();Python
Python SDK
1
2
3
from openai import OpenAI
client = OpenAI()深入解析
深入探讨
为什么流式传输很重要
延迟示例
网络
最终用户到 API 的延迟
服务器
处理提示 Token 的时间
服务器
采样/生成 Token 的时间
网络
API 到最终用户的延迟
波形组件
展开器
可展开部分
Image

Icon
图标项
Realtime 快速入门
启动 Realtime 会话并检查事件。














































