💡 About
此接口兼容 OpenAI Responses API 格式,这是 OpenAI 推出的新一代 API 格式。适用于:
- Cherry Studio 等支持 Responses API 格式的客户端
- 使用 OpenAI SDK 的
responses.create() 方法
- 需要简化的 input/instructions 参数格式的场景
Base URL: https://api.mountsea.ai/chat,与 OpenAI Chat Completions API 共用相同的 Base URL。
💡 Quick Examples
from openai import OpenAI
client = OpenAI(
api_key="your-api-key",
base_url="https://api.mountsea.ai/chat"
)
# Basic response
response = client.responses.create(
model="gpt-5.1",
instructions="You are a helpful assistant.",
input="Hello! What can you help me with?"
)
print(response.output_text)
With message array input:response = client.responses.create(
model="gpt-5.1",
input=[
{
"role": "user",
"content": "Tell me a joke about programming"
}
]
)
print(response.output_text)
Streaming:stream = client.responses.create(
model="gpt-5.1",
instructions="You are a helpful assistant.",
input="Tell me a story",
stream=True
)
for event in stream:
if hasattr(event, 'delta'):
print(event.delta, end="")
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'your-api-key',
baseURL: 'https://api.mountsea.ai/chat'
});
// Basic response
const response = await client.responses.create({
model: 'gpt-5.1',
instructions: 'You are a helpful assistant.',
input: 'Hello! What can you help me with?'
});
console.log(response.output_text);
With message array input:const response = await client.responses.create({
model: 'gpt-5.1',
input: [
{
role: 'user',
content: 'Tell me a joke about programming'
}
]
});
console.log(response.output_text);
Streaming:const stream = await client.responses.create({
model: 'gpt-5.1',
instructions: 'You are a helpful assistant.',
input: 'Tell me a story',
stream: true
});
for await (const event of stream) {
if (event.type === 'response.output_text.delta') {
process.stdout.write(event.delta);
}
}
curl https://api.mountsea.ai/chat/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"model": "gpt-5.1",
"instructions": "You are a helpful assistant.",
"input": "Hello! What can you help me with?"
}'
With message array input:curl https://api.mountsea.ai/chat/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-api-key" \
-d '{
"model": "gpt-5.1",
"input": [
{"role": "user", "content": "Tell me a joke"}
]
}'
Non-streaming Response
{
"id": "resp_xxx",
"object": "response",
"created_at": 1234567890,
"model": "gpt-5.1",
"output": [
{
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! I can help you with all sorts of things..."
}
]
}
],
"usage": {
"input_tokens": 30,
"output_tokens": 15,
"total_tokens": 45
}
}
📱 Cherry Studio 配置
使用 Cherry Studio 接入 Responses API:
| 配置项 | 值 |
|---|
| 服务商名称 | MountSea AI |
| API 地址 | https://api.mountsea.ai/chat |
| API Key | 你的 API Key |
| 模型名称 | 例如 gpt-5.1、claude-sonnet-4-6 等 |
🔧 Responses API vs Chat Completions API
| 特性 | Chat Completions | Responses API |
|---|
| 端点 | /v1/chat/completions | /v1/responses |
| 输入格式 | messages 数组 | input (字符串或数组) |
| 系统提示 | messages 中 role=system | instructions 参数 |
| 响应格式 | choices[0].message.content | output_text |
| 流式响应 | ✅ | ✅ |
| Function Calling | ✅ | ✅ |
两种 API 格式都能访问所有模型。如果你使用的客户端支持 Chat Completions 格式,推荐使用 Chat Completions。如果客户端使用 Responses 格式(如部分版本的 Cherry Studio),则使用此接口。
🔧 API Reference
The interactive API form below is auto-generated from OpenAPI spec.