curl --request POST \
--url https://api.poyo.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.5",
"input": "Write a product tagline in one sentence.",
"max_output_tokens": 120
}
'{
"id": "resp_9876543210",
"object": "response",
"created_at": 1677652288,
"status": "completed",
"model": "gpt-5.5",
"output": [
{
"id": "msg_123",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Launch faster with a smarter AI workspace built for teams."
}
]
}
],
"usage": {
"input_tokens": 12,
"output_tokens": 14,
"total_tokens": 26
}
}{
"error": {
"message": "Model not found: no-such-model",
"type": "invalid_request_error",
"code": "model_not_found"
}
}模型
OpenAI
通过 Responses 或 Chat Completions 接口调用 OpenAI GPT-6、GPT-5.6 和 GPT-5 系列模型。
POST
/
v1
/
responses
curl --request POST \
--url https://api.poyo.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gpt-5.5",
"input": "Write a product tagline in one sentence.",
"max_output_tokens": 120
}
'{
"id": "resp_9876543210",
"object": "response",
"created_at": 1677652288,
"status": "completed",
"model": "gpt-5.5",
"output": [
{
"id": "msg_123",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Launch faster with a smarter AI workspace built for teams."
}
]
}
],
"usage": {
"input_tokens": 12,
"output_tokens": 14,
"total_tokens": 26
}
}{
"error": {
"message": "Model not found: no-such-model",
"type": "invalid_request_error",
"code": "model_not_found"
}
}OpenAI GPT 模型覆盖聊天、编程、推理和 Agent 工作流。本页 Playground 使用 Responses,所有 GPT 模型都支持该格式。
模型
- gpt-6.1-sol — GPT-6.1 Sol。支持 Responses 和 Chat Completions。
- gpt-6.1-terra — GPT-6.1 Terra,适用于视觉推理、计算机操作和自然写作的快速模型。支持 Responses 和 Chat Completions。
- gpt-6-astra — GPT-6 Astra,适用于高级推理、编程和 Agent 工作流。支持 Responses 和 Chat Completions。
- gpt-6-sol — GPT-6 Sol。支持 Responses 和 Chat Completions。
- gpt-6-luna — GPT-6 Luna,GPT-6 的低成本档位。支持 Responses 和 Chat Completions。
- gpt-5-6-sol — GPT-5.6 Sol,适用于前沿编程和 Agent 工作流。仅支持 Responses。
- gpt-5-6-terra — GPT-5.6 Terra。仅支持 Responses。
- gpt-5-6-luna — GPT-5.6 Luna,适用于高吞吐量自动化。仅支持 Responses。
- gpt-5.5 — GPT-5.5。支持 Responses 和 Chat Completions。
- gpt-5.4 — GPT-5.4。支持 Responses 和 Chat Completions。
- gpt-5.2 — GPT-5.2。支持 Responses 和 Chat Completions。
示例
- 基础文本响应 — 纯字符串
input加max_output_tokens。 - 图像理解 — 包含
input_text和input_image的结构化input。 - 网页搜索 —
tools中使用web_search_preview。 - 流式响应 —
stream: true,以 SSE 返回。
注意事项
gpt-5-6-sol、gpt-5-6-terra和gpt-5-6-luna只接受/v1/responses。- 网页搜索等工具是否可用取决于所选模型。
- 全部模型及其支持的格式见 LLM 模型。
授权
所有 API 接口都需要 Bearer Token 认证。
创建 API Key:登录 PoYo,进入 仪表盘 → API 密钥(poyo.ai/zh/dashboard/api-key),点击创建 Key。
在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
OpenAI 模型 ID。gpt-5-6-sol、gpt-5-6-terra 和 gpt-5-6-luna 仅支持 Responses。
可用选项:
gpt-6.1-sol, gpt-6.1-terra, gpt-6-astra, gpt-6-sol, gpt-6-luna, gpt-5-6-sol, gpt-5-6-terra, gpt-5-6-luna, gpt-5.5, gpt-5.4, gpt-5.2 纯文本输入或结构化输入项数组。
示例:
"Write a product tagline in one sentence."
引导模型响应的系统或开发者指令。
模型可用的工具。工具支持情况取决于所选模型。
Show child attributes
Show child attributes
控制模型如何选择工具。
示例:
"auto"
生成的最大输出 token 数。
必填范围:
x >= 1示例:
200
用于兼容旧版的最大输出 token 字段。
必填范围:
x >= 1示例:
200
是否以 SSE 格式流式输出。
示例:
false
支持时,是否存储该响应。
示例:
false
推理配置,所选模型支持时可用。
示例:
{ "effort": "medium" }
文本输出配置,例如支持时的结构化输出格式选项。
请求的自定义元数据键值对。
Show child attributes
Show child attributes
用于继续对话的上一个响应 ID。
支持时,需要额外包含的响应字段。
是否允许模型并行调用多个工具。
长上下文的截断行为,支持时可用。
示例:
"auto"
最终用户标识符,用于滥用监控和请求追踪。
支持时,是否以后台模式运行响应。
服务层级选择,支持时可用。
示例:
"auto"
提示词对象,所选模型支持时可用。
控制输出的随机性,范围 0-2。
必填范围:
0 <= x <= 2示例:
1
核采样参数,范围 0-1。
必填范围:
0 <= x <= 1示例:
1